summaryrefslogtreecommitdiff
path: root/ishtar_common/templates
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2024-06-07 13:34:38 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2024-06-07 15:45:15 +0200
commitd55a5ec58047dc53118dce1d3aecbeb398cf57de (patch)
treed940054e928f217004cb4694027c3b4ff44fcb29 /ishtar_common/templates
parent5f6514859cc06841d7bfb0919f98b72168eeade9 (diff)
downloadIshtar-d55a5ec58047dc53118dce1d3aecbeb398cf57de.tar.bz2
Ishtar-d55a5ec58047dc53118dce1d3aecbeb398cf57de.zip
🐛 Sheet: add missing fields, improve layout (refs #5863, #5864, #5865, #5866, #5867, #5868, #5869, #5870, #5871, #5872)
Diffstat (limited to 'ishtar_common/templates')
-rw-r--r--ishtar_common/templates/ishtar/blocks/sheet_address_section.html2
-rw-r--r--ishtar_common/templates/ishtar/blocks/sheet_dating_list.html33
-rw-r--r--ishtar_common/templates/ishtar/sheet_document.html30
3 files changed, 49 insertions, 16 deletions
diff --git a/ishtar_common/templates/ishtar/blocks/sheet_address_section.html b/ishtar_common/templates/ishtar/blocks/sheet_address_section.html
index 80dbc07a4..5f577c9c9 100644
--- a/ishtar_common/templates/ishtar/blocks/sheet_address_section.html
+++ b/ishtar_common/templates/ishtar/blocks/sheet_address_section.html
@@ -5,6 +5,6 @@
<dd>
<pre>{% if item.get_address %}{{item.get_address}}{% endif %}{% if item.get_address_complement %}
{{item.get_address_complement}}{% endif %}{% if item.get_postal_code or item.get_town or item.get_precise_town %}
-{{item.get_postal_code}} {% if item.get_precise_town %}{{item.get_precise_town}}{% else %}{{item.get_town}}{% endif %}{% endif %}</pre>
+{{item.get_postal_code}} {% if item.get_precise_town %}{{item.get_precise_town.name}}{% else %}{{item.get_town}}{% endif %}{% endif %}</pre>
</dd>
</dl>{% endif %}
diff --git a/ishtar_common/templates/ishtar/blocks/sheet_dating_list.html b/ishtar_common/templates/ishtar/blocks/sheet_dating_list.html
new file mode 100644
index 000000000..6135bbf77
--- /dev/null
+++ b/ishtar_common/templates/ishtar/blocks/sheet_dating_list.html
@@ -0,0 +1,33 @@
+{% load i18n %}
+<table id='{{window_id}}-datings' class="table table-striped">
+ <tr>
+ <th>{% trans "Chronological period" %}</th>
+ <th>{% trans "Start date" %}</th>
+ <th>{% trans "End date" %}</th>
+ <th>{% trans "Dating type" %}</th>
+ <th>{% trans "Quality" %}</th>
+ <th>{% trans "Precise on this dating" %}</th>
+ </tr>
+ {% for dating in dating_list %}
+ <tr>
+ <td>
+ {{dating.period}}
+ </td>
+ <td>
+ {{dating.start_date|default_if_none:"-"}}
+ </td>
+ <td>
+ {{dating.end_date|default_if_none:"-"}}
+ </td>
+ <td>
+ {{dating.dating_type|default_if_none:"-"}}
+ </td>
+ <td>
+ {{dating.quality|default_if_none:"-"}}
+ </td>
+ <td>
+ {{dating.precise_dating|default_if_none:"-"}}
+ </td>
+ </tr>
+ {% endfor %}
+</table>
diff --git a/ishtar_common/templates/ishtar/sheet_document.html b/ishtar_common/templates/ishtar/sheet_document.html
index 258243a24..2ffcc451b 100644
--- a/ishtar_common/templates/ishtar/sheet_document.html
+++ b/ishtar_common/templates/ishtar/sheet_document.html
@@ -46,12 +46,14 @@
{% field_flex "Type" item.source_type_html "" "" 1 %}
{% include "ishtar/blocks/sheet_creation_section.html" %}
- {% if item.format_type or item.support_type or item.scale or item.shooting_angle %}
+ {% if item.format_type or item.support_type or item.scale or item.shooting_angle or item.duplicate != None or item.item_number != 1 %}
<h4 class="col-12">{% trans "Format" %}</h4>
{% field_flex "Format" item.format_type %}
{% field_flex "Support" item.support_type %}
{% field_flex "Scale" item.scale %}
{% field_flex "Shooting angle" item.shooting_angle %}
+ {% if item.duplicate != None %}{% field_flex "Has a duplicate" item.duplicate %}{% endif %}
+ {% if item.item_number != 1 %}{% field_flex "Item number" item.item_number %}{% endif %}
{% endif %}
{% if item.associated_file or item.associated_url or item.tags.count %}
@@ -99,12 +101,10 @@
{% field_flex_detail "Pages" item.source_page_range %}
{% endif %}
- {% if item.container or item.container_ref or item.item_number != 1 or item.duplicate %}
+ {% if item.container or item.container_ref %}
<h4 class="col-12">{% trans "Container" %}</h4>
{% field_flex_detail "Container" item.container 2 %}
{% field_flex_detail "Reference container" item.container_ref 2 %}
- {% if item.item_number != 1 %}{% field_flex "Item number" item.item_number %}{% endif %}
- {% if item.duplicate %}{% field_flex "Has a duplicate" item.duplicate %}{% endif %}
{% endif %}
{% if item.description or item.comment or item.additional_information %}
@@ -122,17 +122,17 @@
{% if item.has_related %}
<h3>{% trans "Related items" %}</h3>
{% field_flex_full _("Files") item.files|add_links %}
-{% field_flex_full "Administrative acts" item.administrativeacts|add_links %}
-{% field_flex_full "Sites" item.sites|add_links %}
-{% field_flex_full "Operations" item.operations|add_links %}
-{% field_flex_full "Context records" item.context_records|add_links %}
-{% field_flex_full "Finds" item.finds|add_links %}
-{% field_flex_full "Treatments" item.treatments|add_links %}
-{% field_flex_full "Treatment files" item.treatment_files|add_links %}
-{% field_flex_full "Warehouses" item.warehouses|add_links %}
-{% field_flex_full "Containers" item.containers|add_links %}
-{% field_flex_full "Towns" item.towns|add_links %}
-{% field_flex_full "Areas" item.areas|add_links %}
+{% field_flex_full _("Administrative acts") item.administrativeacts|add_links %}
+{% field_flex_full _("Sites") item.sites|add_links %}
+{% field_flex_full _("Operations") item.operations|add_links %}
+{% field_flex_full _("Context records") item.context_records|add_links %}
+{% field_flex_full _("Finds") item.finds|add_links %}
+{% field_flex_full _("Treatments") item.treatments|add_links %}
+{% field_flex_full _("Treatment files") item.treatment_files|add_links %}
+{% field_flex_full _("Warehouses") item.warehouses|add_links %}
+{% field_flex_full _("Containers") item.containers|add_links %}
+{% field_flex_full _("Towns") item.towns|add_links %}
+{% field_flex_full _("Areas") item.areas|add_links %}
{% endif %}
{{ item.coins_tag|default:""|safe }}
{% endblock %}