From 5ab07d5bc3c222b416cc88f961ec6c0383722e15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Valenta?= <git@imaniti.org> Date: Thu, 30 Mar 2023 12:08:35 +0200 Subject: [PATCH] view created_on, updated_on and created_by in admin --- .../templates/contracts/view_contract.html | 69 +++++++++++-------- 1 file changed, 41 insertions(+), 28 deletions(-) diff --git a/contracts/templates/contracts/view_contract.html b/contracts/templates/contracts/view_contract.html index 4d2e96b..5f84712 100644 --- a/contracts/templates/contracts/view_contract.html +++ b/contracts/templates/contracts/view_contract.html @@ -262,16 +262,16 @@ </tbody> </table> - {% with contract.issues.all as issues %} - {% if issues or user.can_view_confidential and contract.notes %} - <table class="table table-auto w-full table--striped table--bordered mb-10"> - <tbody> - <tr> - <td colspan="2" class="text-lg font-bold"> - <i class="ico--question mr-3"></i>Doplňující informace - </td> - </tr> + <table class="table table-auto w-full table--striped table--bordered mb-10"> + <tbody> + <tr> + <td colspan="2" class="text-lg font-bold"> + <i class="ico--question mr-3"></i>Doplňující informace + </td> + </tr> + {% if user.can_view_confidential %} + {% with contract.issues.all as issues %} {% if issues %} <tr> <td class="w-1/5 !p-2.5">{% if not user.can_view_confidential %}Poznámky{% else %}Problémy{% endif %}</td> @@ -286,26 +286,39 @@ </td> </tr> {% endif %} + {% endwith %} - {% if user.can_view_confidential and contract.notes %} - <tr> - <td class="w-1/5 !p-2.5 !bg-red-100"> - <div class="flex items-center"> - {% include "contracts/includes/private_info_icon.html" %} - <span class="text-red-600">Interní poznámky</span> - </div> - </td> - <td class="w-4/5 !p-1.5 !bg-red-100"> - <div class="prose max-w-none text-red-600"> - {{ contract.notes|markdownify|safe }} - </div> - </td> - </tr> - {% endif %} - </tbody> - </table> - {% endif %} - {% endwith %} + {% if ontract.notes %} + <tr> + <td class="w-1/5 !p-2.5 !bg-red-100"> + <div class="flex items-center"> + {% include "contracts/includes/private_info_icon.html" %} + <span class="text-red-600">Interní poznámky</span> + </div> + </td> + <td class="w-4/5 !p-1.5 !bg-red-100"> + <div class="prose max-w-none text-red-600"> + {{ contract.notes|markdownify|safe }} + </div> + </td> + </tr> + {% endif %} + {% endif %} + + <tr> + <td class="w-1/5 !p-2.5">Čas vytvoření</td> + <td class="w-4/5 !p-2.5">{{ contract.created_on }}</td> + </tr> + <tr> + <td class="w-1/5 !p-2.5">Čas poslední aktualizace</td> + <td class="w-4/5 !p-2.5">{{ contract.updated_on }}</td> + </tr> + <tr> + <td class="w-1/5 !p-2.5">Nahráno uživatelem</td> + <td class="w-4/5 !p-2.5">{{ contract.created_by }}</td> + </tr> + </tbody> + </table> <h2 class="text-xl font-bold mb-5"><i class="ico--pencil mr-3"></i>Podpisy</h2> -- GitLab