summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@peacefrogs.net>2013-05-06 20:07:44 +0200
committerÉtienne Loks <etienne.loks@peacefrogs.net>2013-05-06 20:07:44 +0200
commitc0a4eb610acf30296fc4d9dadc4bd58fd1da67a9 (patch)
treea8526b98c9cd95b21e75081671ab7a66d6f40b39
parent9525965615bbdd7922720b5a125adf6c76827feb (diff)
downloadIshtar-c0a4eb610acf30296fc4d9dadc4bd58fd1da67a9.tar.bz2
Ishtar-c0a4eb610acf30296fc4d9dadc4bd58fd1da67a9.zip
Minor improve on sheet display
-rw-r--r--archaeological_files/templates/ishtar/sheet_file.html8
-rw-r--r--archaeological_operations/templates/ishtar/sheet_operation.html4
2 files changed, 6 insertions, 6 deletions
diff --git a/archaeological_files/templates/ishtar/sheet_file.html b/archaeological_files/templates/ishtar/sheet_file.html
index 7f45777a0..7d708c23f 100644
--- a/archaeological_files/templates/ishtar/sheet_file.html
+++ b/archaeological_files/templates/ishtar/sheet_file.html
@@ -16,7 +16,7 @@
<div class='tool'>{%trans "Export as:"%} <a href='{% url show-file item.pk "odt" %}'>{%trans "OpenOffice.org file"%}</a>, <a href='{% url show-file item.pk "pdf" %}'>{%trans "PDF file"%}</a></div>
<h3>{% trans "General"%}</h3>
<p><label>{%trans "Year:"%}</label> <span class='value'>{{ item.year }}</span></p>
-<p><label>{%trans "Numerical reference:"%}</label> <span class='value'>{{ item.numeric_reference }}</span></p>
+{% if item.numeric_reference %}<p><label>{%trans "Numerical reference:"%}</label> <span class='value'>{{ item.numeric_reference }}</span></p>{% endif %}
{% if item.name %}
<p><label>{%trans "File's name:"%}</label> <span class='value'>{{ item.name }}</span></p>
{% endif %}
@@ -42,12 +42,12 @@
<h3>{% trans "Localisation"%}</h3>
<p><label>{%trans "Towns:"%}</label> <span class='value'>{{ item.towns.all|join:", " }}</span></p>
-
+{% if item.address %}
<p><label>{%trans "Main address:"%}</label> <span class='value'>{{ item.address }}</span></p>
{% if item.address_complement %}<p><label>{%trans "Complement:"%}</label> <span class='value'>{{ item.address_complement }}</span></p>{%endif%}
{% if item.postal_code %}<p><label>{%trans "Postal code:"%}</label> <span class='value'>{{ item.postal_code }}</span></p>{%endif%}
-
-<p><label>{%trans "Surface:"%}</label>{% if item.total_surface %} <span class='value'>{{ item.total_surface }} m<sup>2</sup> ({{ item.total_surface_ha }} ha)</span>{%endif%}</p>
+{% endif %}
+{% if item.total_surface %}<p><label>{%trans "Surface:"%}</label> <span class='value'>{{ item.total_surface }} m<sup>2</sup> ({{ item.total_surface_ha }} ha)</span></p>{%endif%}
diff --git a/archaeological_operations/templates/ishtar/sheet_operation.html b/archaeological_operations/templates/ishtar/sheet_operation.html
index 6fdcfe62d..3a6a20e74 100644
--- a/archaeological_operations/templates/ishtar/sheet_operation.html
+++ b/archaeological_operations/templates/ishtar/sheet_operation.html
@@ -45,10 +45,10 @@
<h3>{% trans "Localisation"%}</h3>
<p><label>{%trans "Towns:"%}</label> <span class='value'>{{ item.towns.all|join:", " }}</span></p>
-<p><label>{%trans "Main address:"%}</label> <span class='value'>{{ item.associated_file.address }}</span></p>
+{% if item.associated_file.address %}<p><label>{%trans "Main address:"%}</label> <span class='value'>{{ item.associated_file.address }}</span></p>
{% if item.associated_file.address_complement %}<p><label>{%trans "Complement:"%}</label> <span class='value'>{{ item.associated_file.address_complement }}</span></p>{%endif%}
{% if item.associated_file.postal_code %}<p><label>{%trans "Postal code:"%}</label> <span class='value'>{{ item.associated_file.postal_code }}</span></p>{%endif%}
-
+{%endif%}
{% comment %}
<p><label>{%trans "Lambert X:"%}</label> <span class='value'>{{ item.lambert_x }}</span></p>
<p><label>{%trans "Lambert Y:"%}</label> <span class='value'>{{ item.lambert_y }}</span></p>