summaryrefslogtreecommitdiff
path: root/ishtar_common/templates
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2019-06-27 17:20:43 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2019-06-27 17:20:43 +0200
commit3d766fae8dd27b097eadd66993a091aa32af1aec (patch)
tree9201a1616398d4145fe3836821c3ccca788d817d /ishtar_common/templates
parent7186a3adae39105729e31d0c7b594fcbcbdfd091 (diff)
downloadIshtar-3d766fae8dd27b097eadd66993a091aa32af1aec.tar.bz2
Ishtar-3d766fae8dd27b097eadd66993a091aa32af1aec.zip
Warehouse: link warehouse to an organization - manage address dependencies
Diffstat (limited to 'ishtar_common/templates')
-rw-r--r--ishtar_common/templates/ishtar/blocks/sheet_address_section.html8
-rw-r--r--ishtar_common/templates/ishtar/sheet_organization.html19
2 files changed, 23 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
index a42cd6cca..80dbc07a4 100644
--- a/ishtar_common/templates/ishtar/blocks/sheet_address_section.html
+++ b/ishtar_common/templates/ishtar/blocks/sheet_address_section.html
@@ -1,10 +1,10 @@
{% load i18n %}
-{% if item.address or item.address_complement or item.postal_code or item.town or item.precise_town%}
+{% if item.get_address or item.get_address_complement or item.get_postal_code or item.get_town or item.get_precise_town%}
<dl class="{% if full %}col-12 col-lg-6{% else %}col-12 col-md-6 col-lg-4 d-flex row{% endif %} flex-wrap">
<dt>{% trans "Address" %}</dt>
<dd>
- <pre>{% if item.address %}{{item.address}}{% endif %}{% if item.address_complement %}
-{{item.address_complement}}{% endif %}{% if item.postal_code or item.town or item.precise_town %}
-{{item.postal_code}} {% if item.precise_town %}{{item.precise_town}}{% else %}{{item.town}}{% endif %}{% endif %}</pre>
+ <pre>{% if item.get_address %}{{item.get_address}}{% endif %}{% if item.get_address_complement %}
+{{item.get_address_complement}}{% endif %}{% if item.get_postal_code or item.get_town or item.get_precise_town %}
+{{item.get_postal_code}} {% if item.get_precise_town %}{{item.get_precise_town}}{% else %}{{item.get_town}}{% endif %}{% endif %}</pre>
</dd>
</dl>{% endif %}
diff --git a/ishtar_common/templates/ishtar/sheet_organization.html b/ishtar_common/templates/ishtar/sheet_organization.html
index 37f7a76ce..798ae7a9b 100644
--- a/ishtar_common/templates/ishtar/sheet_organization.html
+++ b/ishtar_common/templates/ishtar/sheet_organization.html
@@ -37,6 +37,25 @@
{% endfor %}
</table>
+{% if item.warehouses.count %}
+<h3>{%trans "Warehouses"%}</h3>
+
+<table class='table table-striped'>
+ <tr>
+ <th class='link'>&nbsp;</th>
+ <th>{% trans "Name" %}</th>
+ <th>{% trans "Type" %}</th>
+ </tr>
+ {% for warehouse in item.warehouses.all %}
+ <tr>
+ <td class='link'><a class='display_details' href="#" onclick='load_window("{% url "show-warehouse" warehouse.pk "" %}")'><i class="fa fa-info-circle" aria-hidden="true"></i></a></td>
+ <td class='string'>{{warehouse.name|default:""}}</td>
+ <td class='string'>{{warehouse.warehouse_type}}</td>
+ </tr>
+ {% endfor %}
+</table>
+{% endif %}
+
{% trans "General contractor organization of archaeological files" as af %}
{% if item.general_contractor_files.count %}
{% dynamic_table_document af 'files' 'corporation_general_contractor' item.pk '' output %}