summaryrefslogtreecommitdiff
path: root/archaeological_finds
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2026-02-25 18:48:47 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2026-03-10 11:11:46 +0100
commitcf79dba86c82fed9f3fd7ae6bab82fe3ee955cda (patch)
tree3cb7c70ee9535e8d25a84759cfc53fa37c8a15e6 /archaeological_finds
parent27fff0a390ea490047f0cfced48bad92f70401d1 (diff)
downloadIshtar-cf79dba86c82fed9f3fd7ae6bab82fe3ee955cda.tar.bz2
Ishtar-cf79dba86c82fed9f3fd7ae6bab82fe3ee955cda.zip
🚧 Statement condition: templates
Diffstat (limited to 'archaeological_finds')
-rw-r--r--archaeological_finds/templates/ishtar/blocks/sheet_statement_condition.html49
-rw-r--r--archaeological_finds/templates/ishtar/sheet_find_treatments.html16
2 files changed, 61 insertions, 4 deletions
diff --git a/archaeological_finds/templates/ishtar/blocks/sheet_statement_condition.html b/archaeological_finds/templates/ishtar/blocks/sheet_statement_condition.html
new file mode 100644
index 000000000..1ccff7326
--- /dev/null
+++ b/archaeological_finds/templates/ishtar/blocks/sheet_statement_condition.html
@@ -0,0 +1,49 @@
+{% load i18n window_field %}
+<div class="p-2{% if even %} odd{% endif %}">
+ <div class="row">
+ <div class="offset-md-2 col-md-8">
+ <h4>
+ {{statement_condition.statement_condition_type.full_label}} - {{statement_condition.date|date:"SHORT_DATE_FORMAT"}} ({{statement_condition.applied_label|lower}})
+ </h4>
+ </div>
+ {% if can_change and statement_condition.last %}
+ <div class="col-md-2 text-right">
+ <div class="btn-group btn-group-sm" role="group" aria-label="Actions">
+ {% if statement_condition.applied == "D" %}
+ <a class="btn-qa btn btn-success" href="#" data-target="{% url 'find-statement-condition-modify' item.pk statement_condition.pk %}" title="{% trans 'Modify' %}">
+ <i class="fa fa-pencil"></i>
+ </a>
+ {% endif %}
+ <a class="wait-button btn btn-success" href="/document/create/?find=41468" title="Ajouter un document / une image">
+ <i class="fa fa-plus"></i> doc./image
+ </a>
+ {% if statement_condition.applied == "D" %}
+ <a class="btn btn-danger wait-button" href="#" data-target="{% url 'find-statement-condition-delete' statement_condition.pk %}" title="{% trans 'Delete' %}">
+ <i class="fa fa-trash" aria-hidden="true"></i>
+ </a>
+ {% endif %}
+ </div>
+ </div>
+ {% endif %}
+ </div>
+
+ <div class="row">
+ {% field_flex _("Verification officer") statement_condition.verification_officer %}
+ {% field_flex _("Campaign/observation number") statement_condition.campaign_number %}
+ {% field_flex _("Report number") statement_condition.report_number %}
+ {% field_flex_multiple_obj _("Follow-up actions") statement_condition "follow_up_actions" %}
+ {% field_flex_full _("Observations") statement_condition.observations %}
+ </div>
+ {% if statement_condition.diff %}
+ <hr>
+ <div class="row">
+ {% for label, value in statement_condition.diff.items %}
+ <dl class="col-12 col-md-6 col-lg-3 flex-wrap">
+ <dt>{{label}}</dt>
+ <dd>{{value}}</dd>
+ </dl>
+ {% endfor %}
+ </div>
+ {% endif %}
+</div>
+
diff --git a/archaeological_finds/templates/ishtar/sheet_find_treatments.html b/archaeological_finds/templates/ishtar/sheet_find_treatments.html
index a8c7dc5be..49e70d5f8 100644
--- a/archaeological_finds/templates/ishtar/sheet_find_treatments.html
+++ b/archaeological_finds/templates/ishtar/sheet_find_treatments.html
@@ -9,9 +9,9 @@
</div>
{% endif %}
{% endcomment %}
+ {% if item.integrities_count or item.remarkabilities_count or item.conservatory_states_count or item.conservatory_comment or item.alterations.count or item.alteration_causes.count or item.recommended_treatments.count or item.appraisal_date or item.treatment_emergency or item.insurance_value or item.estimated_value %}
<h3>{% trans "Preservation" %}</h3>
<div class='row'>
- {% if item.integrities_count or item.remarkabilities_count or item.conservatory_states_count or item.conservatory_comment or item.alterations.count or item.alteration_causes.count or item.recommended_treatments.count or item.appraisal_date or item.treatment_emergency or item.insurance_value or item.estimated_value %}
{% field_flex_multiple_obj _("Integrity") item 'integrities' %}
{% field_flex_multiple_obj _("Remarkability") item 'remarkabilities' %}
{% field_flex_multiple_obj _("Conservatory states") item 'conservatory_states' %}
@@ -23,10 +23,9 @@
{% field_flex _("Insurance value") item.insurance_value|default_if_none:''|intcomma '' ' '|add:CURRENCY %}
{% field_flex _("Appraisal date") item.appraisal_date %}
{% field_flex_full _("Conservatory comment") item.conservatory_comment "<pre>" "</pre>" %}
- {% else %}
- <em>{% trans "Not specified." %}</em>
- {% endif %}
</div>
+ {% endif %}
+
{% if item.container or item.container_ref %}
{% if can_view_container %}
<h3>{% trans "Warehouse - container" %}</h3>
@@ -49,8 +48,17 @@
{% trans "Container information not available." %}
</div>
{% endif %}
+ {% endif %}
+ {% if item.statement_conditions.exists %}
+ <h3>{% trans "Statements of condition" %}</h3>
+ {% for statement_condition in item.statement_conditions_list %}
+ {% with even=forloop.counter|divisibleby:2 %}
+ {% include "ishtar/blocks/sheet_statement_condition.html" %}
+ {% endwith %}
+ {% endfor %}
{% endif %}
+
{% if item.upstream_treatment or item.downstream_treatment or non_modif_treatments_count %}
{% if item.upstream_treatment %}