diff --git a/contracts/templates/contracts/view_contract.html b/contracts/templates/contracts/view_contract.html index 4d2e96b35dda3ba5f464240ea36648c0c9395cd4..5f847120f2901d2b12917e2295f7a131fd86e732 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>