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) --- archaeological_warehouse/templates/ishtar/sheet_warehouse.html | 1 + ishtar_common/templates/ishtar/blocks/sheet_address_section.html | 6 ++++++ ishtar_common/templates/ishtar/sheet_organization.html | 5 +---- 3 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 ishtar_common/templates/ishtar/blocks/sheet_address_section.html diff --git a/archaeological_warehouse/templates/ishtar/sheet_warehouse.html b/archaeological_warehouse/templates/ishtar/sheet_warehouse.html index eb31392e4..3d39f9845 100644 --- a/archaeological_warehouse/templates/ishtar/sheet_warehouse.html +++ b/archaeological_warehouse/templates/ishtar/sheet_warehouse.html @@ -14,6 +14,7 @@ {% field_li "Person in charge" item.person_in_charge %} {% include "ishtar/blocks/sheet_creation_section.html" %} +{% include "ishtar/blocks/sheet_address_section.html" %} {% field "Comment" item.comment "
" "
" %} {% if item.containers.count %} 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