summaryrefslogtreecommitdiff
path: root/ishtar_common/templates/ishtar/sheet_organization.html
blob: f3761a514d12e006f02c52f188f7f9701c15d377 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
{% extends "ishtar/sheet.html" %}
{% load i18n window_header window_field window_tables %}

{% block head_title %}<strong>{% trans "Organization" %}</strong> - {{item.name}}{% endblock %}

{% block toolbar %}
{% window_nav item window_id 'show-organization' 'organization_modify' %}
{% endblock %}

{% block content %}
<div class="row">
  {% field_flex "Name" item.name %}
  {% field_flex "Type" item.organization_type %}
  {% field_flex_url "Web address" item.url %}
  {% field_flex_detail "Created by" item.history_creator.ishtaruser.person %}
  {% include "ishtar/blocks/sheet_address_section.html" %}
  {% field_flex "Phone" item.phone %}
  {% field_flex "Mobile phone" item.mobile_phone %}
</div>

<h3>{%trans "Person in the organization"%}</h3>

<table class='table table-striped'>
  <tr>
    <th>{% trans "Name" %}</th>
    <th>{% trans "Surname" %}</th>
    <th>{% trans "Type" %}</th>
    <th class='link'>&nbsp;</th>
  </tr>
  {% for person in item.members.all %}
  <tr>
    <td class='string'>{{person.name|default:""}}</td>
    <td class='string'>{{person.surname|default:""}}</td>
    <td>{% for type in person.person_types.all %}{% if forloop.counter0 %}, {% endif %}{{type.label}}{% endfor %}</td>
    <td class='link'><a class='display_details' href="#" onclick='load_window("{% url "show-person" person.pk "" %}")'><i class="fa fa-info-circle" aria-hidden="true"></i></a></td>
  </tr>
  {% empty %}
  <tr><td colspan="8" class='no_items'>{% trans "No person in this organization" %}</td></tr>
  {% 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 %}
{% endif %}

{% trans "Planning service of archaeological files" as af %}
{% if item.planning_service_files.count %}
{% dynamic_table_document af 'files' 'planning_service' item.pk '' output %}
{% endif %}

{% if item.publish.count %}
{% trans "Publications" as publications %}
{% dynamic_table_document publications 'documents' 'publisher__pk' item.pk '' output %}
{% endif %}

{% endblock %}