summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2024-02-18 17:07:19 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2024-04-16 16:41:51 +0200
commit81fdb4ba9532de6ef770b3c4a4e75ee49f2ada5c (patch)
tree63d0f8001a80d8c5af61832e5cfc6e7aa9f2270f
parent5f28fa65526a778659c68b090417f0fb03142047 (diff)
downloadIshtar-81fdb4ba9532de6ef770b3c4a4e75ee49f2ada5c.tar.bz2
Ishtar-81fdb4ba9532de6ef770b3c4a4e75ee49f2ada5c.zip
✨ Operation: improve sheet (#5753)
-rw-r--r--archaeological_operations/templates/ishtar/sheet_operation.html54
-rw-r--r--changelog/en/changelog_2022-06-15.md1
-rw-r--r--changelog/fr/changelog_2023-01-25.md1
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 e8e0d14a7..cee9450e1 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 7ace2d486..3e02cc0ff 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 #####