From e7e161c2e610b442b4d72d9d749687ff87b993f9 Mon Sep 17 00:00:00 2001
From: Étienne Loks
Date: Tue, 29 Aug 2017 14:50:44 +0200
Subject: Sheet: add a specific sheet_address_section (refs #3401)
---
ishtar_common/templates/ishtar/blocks/sheet_address_section.html | 6 ++++++
ishtar_common/templates/ishtar/sheet_organization.html | 5 +----
2 files changed, 7 insertions(+), 4 deletions(-)
create mode 100644 ishtar_common/templates/ishtar/blocks/sheet_address_section.html
(limited to 'ishtar_common')
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 %}
+{% 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 %}
+
{% 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' %}
{{item.name}}
{{ item.history_creator.ishtaruser.person }}
-{% if item.address %} {{item.address}}
{% endif %}
-{% if item.address_complement %} {{item.address_complement}}
{% endif %}
-{% if item.postal_code %} {{item.postal_code}}
{% endif %}
-{% if item.town %} {{item.town}}
{% endif %}
+{% include "ishtar/blocks/sheet_address_section.html" %}
{% if item.phone %} {{item.phone}}
{% endif %}
{% if item.mobile_phone %} {{item.mobile_phone}}
{% endif %}
--
cgit v1.2.3