From ec9d1cfbe855cf3d33a5880315114aac709a9e83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Valenta?= <git@imaniti.org> Date: Sun, 16 Apr 2023 15:48:01 +0200 Subject: [PATCH] conditional filing area display --- .../templates/contracts/view_contract.html | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/contracts/templates/contracts/view_contract.html b/contracts/templates/contracts/view_contract.html index bac64a3..0dfb845 100644 --- a/contracts/templates/contracts/view_contract.html +++ b/contracts/templates/contracts/view_contract.html @@ -186,14 +186,16 @@ <td class="w-1/5 !p-2.5">Stav</td> <td class="w-4/5 !p-2.5">{{ contract.get_paper_form_state_display }}</td> </tr> - <tr> - <td class="w-1/5 !p-2.5">Spisovna</td> - <td class="w-4/5 !pl-2.5 !py-1 !pr-1"> - <div class="flex gap-3 items-center"> - {% include "contracts/includes/tag.html" with url=contract.filing_area.url icon="ico--drawer" content=contract.filing_area.name %} - </div> - </td> - </tr> + {% if contract.filing_area %} + <tr> + <td class="w-1/5 !p-2.5">Spisovna</td> + <td class="w-4/5 !pl-2.5 !py-1 !pr-1"> + <div class="flex gap-3 items-center"> + {% include "contracts/includes/tag.html" with url=contract.filing_area.url icon="ico--drawer" content=contract.filing_area.name %} + </div> + </td> + </tr> + {% endif %} </tbody> </table> -- GitLab