From d9112d6231e45671cf4eda59ff93035a0bcc72af Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 25 Feb 2016 12:57:00 +0100 Subject: Change archaeological sites form (more robust) --- .../blocks/window_tables/archaeologicalsites.html | 20 ++++++++++++++++++++ .../templates/ishtar/sheet_operation.html | 7 +++++++ 2 files changed, 27 insertions(+) create mode 100644 archaeological_operations/templates/ishtar/blocks/window_tables/archaeologicalsites.html (limited to 'archaeological_operations/templates') diff --git a/archaeological_operations/templates/ishtar/blocks/window_tables/archaeologicalsites.html b/archaeological_operations/templates/ishtar/blocks/window_tables/archaeologicalsites.html new file mode 100644 index 000000000..d72291c5b --- /dev/null +++ b/archaeological_operations/templates/ishtar/blocks/window_tables/archaeologicalsites.html @@ -0,0 +1,20 @@ +{% load i18n %} + + + + + + + + + {% for archaeosite in data %} + + + + + + + {% empty %} + + {% endfor %} +
{{caption}}
{% trans "Ref." %}{% trans "Name" %}{% trans "Periods" %}{% trans "Remains" %}
{{archaeosite.reference}}{{archaeosite.name}}{% for period in archaeosite.periods.all %}{{period}}{% include "blocks/comma_list.html" %}{% endfor %}{% for remain in archaeosite.remains.all %}{{remain}}{% include "blocks/comma_list.html" %}{% endfor %}
{% trans "No archaeological site associated" %}
diff --git a/archaeological_operations/templates/ishtar/sheet_operation.html b/archaeological_operations/templates/ishtar/sheet_operation.html index 87cf53b27..14210046b 100644 --- a/archaeological_operations/templates/ishtar/sheet_operation.html +++ b/archaeological_operations/templates/ishtar/sheet_operation.html @@ -96,8 +96,10 @@ {% field "Comment" item.comment "
" "
" %} +{% if item.towns.count %}

{% trans "Localisation"%}

{{ item.towns.all|join:", " }}

+{% endif %} {% if item.associated_file.address %}

{{ item.associated_file.address }}

{% if item.associated_file.address_complement %}

{{ item.associated_file.address_complement }}

{%endif%} @@ -120,6 +122,11 @@ {% endfor %} {% endif %} +{% if item.archaeological_sites.count %} +{% trans "Archaeological sites" as archaeologicalsites_label %} +{% table_archaeologicalsites archaeologicalsites_label item.archaeological_sites.all %} +{% endif %} + {% trans "Associated parcels" as parcels_label %} {% include "ishtar/blocks/window_tables/parcels.html" %} -- cgit v1.2.3