diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2024-02-18 17:07:19 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2024-02-18 17:11:32 +0100 |
commit | c903a8e6945452ea93c2aa36d85d2557ea754d7d (patch) | |
tree | f91fabad036aba9656a9380ed0b1be000dcaeb97 | |
parent | be7db9612d0f11e081d627adb7f28775b2824218 (diff) | |
download | Ishtar-c903a8e6945452ea93c2aa36d85d2557ea754d7d.tar.bz2 Ishtar-c903a8e6945452ea93c2aa36d85d2557ea754d7d.zip |
✨ Operation: improve sheet (#5753)
-rw-r--r-- | archaeological_operations/templates/ishtar/sheet_operation.html | 54 | ||||
-rw-r--r-- | changelog/en/changelog_2022-06-15.md | 1 | ||||
-rw-r--r-- | changelog/fr/changelog_2023-01-25.md | 1 |
3 files changed, 31 insertions, 25 deletions
diff --git a/archaeological_operations/templates/ishtar/sheet_operation.html b/archaeological_operations/templates/ishtar/sheet_operation.html index 93ea999e4..2d276b67c 100644 --- a/archaeological_operations/templates/ishtar/sheet_operation.html +++ b/archaeological_operations/templates/ishtar/sheet_operation.html @@ -126,38 +126,42 @@ role="tabpanel" aria-labelledby="{{window_id}}-general-tab"> <div class="clearfix"> - <div class="card float-left col-12 col-md-6 col-lg-4"> + <div class="card float-left col-12 col-md-6 col-lg-4 pb-2"> {% include "ishtar/blocks/window_image.html" %} - <div class="card-body"> - <div class="row"> - <div class="col main"> - {% if item.year or item.operation_code %} - {{item.year|default:''}}-{{item.operation_code|default:''}}{% endif %}<br> - {% if item.code_patriarche %}{% if PROFILE.operation_prefix %}{{PROFILE.operation_prefix}}{% endif %}{{item.code_patriarche}}{% endif %} - {% if item.complete_identifier %}<p class="window-refs" - title="{% trans 'Complete identifier' %}"> - <strong>{{ item.complete_identifier }}</strong></p>{% endif %} - </div> - <div class="col text-muted"> + <div class="row p-0 m-0 my-2"> + <div class="col main text-center"> + <span class="text-muted"> {% include "ishtar/blocks/sheet_external_id.html" %} - </div> - </div> - <div class="card-text"> - <p class='window-refs' title="{% trans 'Towns' %}"> - {% if next %} - {{ item|m2m_listing:'towns'|join:" ; "|default:'' }} - {% else %} - {{ item.cached_towns_label }} - {% endif %} - </p> - <p class='window-refs' title="{% trans 'Name' %}">{{item.common_name|default:''}}</p> + </span> + {% with PROFILE.operation_prefix|add:item.code_patriarche as ope_code %} + {% if not item.code_patriarche and item.year and item.operation_code %} + {{item.year|default:''}}-{{item.operation_code|default:''}} + {% else %} + {{ope_code}} + {% endif %} + {% if item.complete_identifier != ope_code %}<p class="window-refs" + title="{% trans 'Complete identifier' %}"> + <strong>{{ item.complete_identifier }}</strong></p>{% endif %} + {% endwith %} </div> </div> + <div class="row p-0 m-0"> + {% if item.year %}<span class="col-4"><strong>{% trans "Year" %}</strong></span><span class="col-8">{{ item.year|unlocalize }}</span>{% endif %} + <span class="col-4"><strong>{% trans "Towns" %}</strong></span><span class="col-8"> + {% if next %} + {{ item|m2m_listing:'towns'|join:" ; "|default:'' }} + {% else %} + {{ item.cached_towns_label }} + {% endif %} + </span> + {% if item.common_name %}<span class="col-4"><strong>{% trans "Name" %}</strong></span><span class="col-8">{{ item.common_name }}</span>{% endif %} + {% if item.address %}<span class="col-4"><strong>{% trans "Address / Locality" %}</strong></span><span class="col-8">{{ item.address }}</span>{% endif %} + </div> </div> <div class="row"> {% trans "Excavation dates (start/end)" as date_label %} - {% if not is_external %} + {% if item.start_date or item.end_date %}{% if not is_external %} {% with start_date=item.start_date|date:"DATE_FORMAT"|default:"-" %} {% with end_date=item.excavation_end_date|date:"DATE_FORMAT"|default:"-" %} {% with dates=start_date|add:" / "|add:end_date %} @@ -169,7 +173,7 @@ {% with dates=start_date|add:" / "|add:end_date %} {% field_flex_2 date_label dates %} {% endwith %}{% endwith %}{% endwith %} - {% endif %} + {% endif %}{% endif %} <dl class="col-12 col-md-6 col-lg-3 flex-wrap"> <dt> {% trans "State" %} diff --git a/changelog/en/changelog_2022-06-15.md b/changelog/en/changelog_2022-06-15.md index 7a55d7770..ee44f0cbd 100644 --- a/changelog/en/changelog_2022-06-15.md +++ b/changelog/en/changelog_2022-06-15.md @@ -14,6 +14,7 @@ v4.0.XX - 2099-12-31 - Context record - identification type changes to hierarchical (#5739) - cultural attribution field (#5740) +- Operation: improve sheet (#5753) #### Imports ##### - pre-import forms diff --git a/changelog/fr/changelog_2023-01-25.md b/changelog/fr/changelog_2023-01-25.md index 6dd9add62..435b1d024 100644 --- a/changelog/fr/changelog_2023-01-25.md +++ b/changelog/fr/changelog_2023-01-25.md @@ -13,6 +13,7 @@ v4.0.XX - 2099-12-31 - Unité d'enregistrement : - type d'identification passe en hiérarchique (#5739) - ajout de l'attribution culturelle (#5740) +- Operation : amélioration de la fiche (#5753) #### Imports ##### |