summaryrefslogtreecommitdiff
path: root/ishtar_common/templates
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2017-08-29 14:50:44 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2017-08-29 14:51:37 +0200
commite7e161c2e610b442b4d72d9d749687ff87b993f9 (patch)
tree413ba34f39b460d24fbd49b75e6769d84c02bbb1 /ishtar_common/templates
parentafe97dd3964f003c4c55d5abfe8f8ed523e6a1c1 (diff)
downloadIshtar-e7e161c2e610b442b4d72d9d749687ff87b993f9.tar.bz2
Ishtar-e7e161c2e610b442b4d72d9d749687ff87b993f9.zip
Sheet: add a specific sheet_address_section (refs #3401)
Diffstat (limited to 'ishtar_common/templates')
-rw-r--r--ishtar_common/templates/ishtar/blocks/sheet_address_section.html6
-rw-r--r--ishtar_common/templates/ishtar/sheet_organization.html5
2 files changed, 7 insertions, 4 deletions
diff --git a/ishtar_common/templates/ishtar/blocks/sheet_address_section.html b/ishtar_common/templates/ishtar/blocks/sheet_address_section.html
new file mode 100644
index 000000000..917258173
--- /dev/null
+++ b/ishtar_common/templates/ishtar/blocks/sheet_address_section.html
@@ -0,0 +1,6 @@
+{% load i18n %}
+{% if item.address or item.address_complement or item.postal_code or item.town %}
+<p><label>{% trans "Address" %}</label><pre>{% if item.address %}{{item.address}}{% endif %}{% if item.address_complement %}
+{{item.address_complement}}{% endif %}{% if item.postal_code or item.town %}
+{{item.postal_code}} {{item.town}}{% endif %}</pre>
+</p>{% endif %}
diff --git a/ishtar_common/templates/ishtar/sheet_organization.html b/ishtar_common/templates/ishtar/sheet_organization.html
index 66048095b..411aa2de3 100644
--- a/ishtar_common/templates/ishtar/sheet_organization.html
+++ b/ishtar_common/templates/ishtar/sheet_organization.html
@@ -7,10 +7,7 @@
{% window_nav item window_id 'show-organization' 'organization_modify' %}
<p><label>{% trans "Name" %}</label> <span class='value'>{{item.name}}</span></p>
<p><label>{%trans "Created by:"%}</label> <span class='value'>{{ item.history_creator.ishtaruser.person }}</span></p>
-{% if item.address %}<p><label>{% trans "Address" %}</label> <span class='value'>{{item.address}}</span></p> {% endif %}
-{% if item.address_complement %}<p><label>{% trans "Address 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 %}
-{% if item.town %}<p><label>{% trans "Town" %}</label> <span class='value'>{{item.town}}</span></p> {% endif %}
+{% include "ishtar/blocks/sheet_address_section.html" %}
{% if item.phone %}<p><label>{% trans "Phone" %}</label> <span class='value'>{{item.phone}}</span></p> {% endif %}
{% if item.mobile_phone %}<p><label>{% trans "Mobile phone" %}</label> <span class='value'>{{item.mobile_phone}}</span></p> {% endif %}