summaryrefslogtreecommitdiff
path: root/ishtar_common/templates/ishtar/sheet_person.html
blob: c1fe0504e7297eb28a28ef99e8ad782ba8cc2423 (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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
{% extends "ishtar/sheet.html" %}
{% load i18n window_field window_tables window_header %}

{% block head_title %}<strong>{% trans "Person"%}</strong> - {{item}}{% endblock %}

{% block toolbar %}
{% window_nav item window_id 'show-person' 'person_modify' %}
{% endblock %}

{% block content %}

<div class="row">
    {% field_flex "Title" item.full_title %}
    {% field_flex "Name" item.name %}
    {% field_flex "Surname" item.surname %}
    {% field_flex "Raw name" item.raw_name %}
    {% field_flex_detail "Created by" item.history_creator.ishtaruser.person %}
    {% field_flex "Email" item.email %}
    {% field_flex "Type(s)" item.person_types_list %}
    {% if ADMIN %}
    {% field_flex "Profile(s)" item.profiles_list %}
    {% endif %}
</div>

{% if item.phone or item.phone2 or item.phone3 or item.mobile_phone %}
<table class='table table-striped'>
  <caption>{% trans "Phone" %}</caption>
  <tr>
    <th>{% trans "Phone type" %}</th>
    <th>{% trans "Number" %}</th>
  </tr>
  {% if item.phone or item.phone_desc %}<tr>
    <td>{% if item.phone_desc %}{{item.phone_desc}}{% else %}&ndash;{% endif %}</td>
    <td>{% if item.phone %}{{item.phone}}{% else %}&ndash;{% endif %}</td>
  </tr>{% endif %}
  {% if item.phone2 or item.phone_desc2 %}<tr>
    <td>{% if item.phone_desc2 %}{{item.phone_desc2}}{% else %}&ndash;{% endif %}</td>
    <td>{% if item.phone2 %}{{item.phone2}}{% else %}&ndash;{% endif %}</td>
  </tr>{% endif %}
  {% if item.phone3 or item.phone_desc3 %}<tr>
    <td>{% if item.phone_desc3 %}{{item.phone_desc3}}{% else %}&ndash;{% endif %}</td>
    <td>{% if item.phone3 %}{{item.phone3}}{% else %}&ndash;{% endif %}</td>
  </tr>{% endif %}
  {% if item.mobile_phone %}<tr>
    <td>{% trans "Mobile phone" %}</td>
    <td>{{item.mobile_phone}}</td>
  </tr>{% endif %}
</table>
{% endif %}

{% if item.address or item.postal_code or item.town %}
<h3>{% trans "Business address" %}</h3>
<div class="row">
    {% field_flex "Address" item.address %}
    {% field_flex "Address complement" item.address_complement %}
    {% field_flex "Postal code" item.postal_code %}
    {% field_flex "Town" item.town %}
</div>{% endif %}

{% if item.alt_address or item.alt_postal_code or item.alt_town %}
<h3>{% trans "Other address" %}</h3>
<div class="row">
    {% field_flex "Address" item.alt_address %}
    {% field_flex "Address complement" item.alt_address_complement %}
    {% field_flex "Postal code" item.alt_postal_code %}
    {% field_flex "Town" item.alt_town %}
</div>{% endif %}


{% if item.attached_to %}<h3>{% trans "Associated organization"%}</h3>
<div class="row">
    {% field_flex_detail "Name" item.attached_to %}
    {% field_flex "Address" item.attached_to.address %}
    {% field_flex "Address complement" item.attached_to.address_complement %}
    {% field_flex "Postal code" item.attached_to.postal_code %}
    {% field_flex "Town" item.attached_to.town %}
    {% field_flex "Phone" item.attached_to.phone %}
    {% field_flex "Mobile phone" item.attached_to.mobile_phone %}
</div>{% endif %}


{% trans "Associated operations as scientist" as ao %}
{% if item.operation_scientist_responsability.count %}
{% dynamic_table_document ao 'operations' 'scientist' item.pk '' output %}
{% endif %}
{% trans "Associated operations as responsible" as ao %}
{% if item.operation_responsability.count %}
{% dynamic_table_document ao 'operations' 'in_charge' item.pk '' output %}
{% endif %}

{% trans "In charge of archaeological files" as af %}
{% if item.file_responsability.count %}
{% dynamic_table_document af 'files' 'in_charge' item.pk '' output %}
{% endif %}

{% trans "General contractor of archaeological files" as af %}
{% if item.general_contractor_files.count %}
{% dynamic_table_document af 'files' 'general_contractor' item.pk '' output %}
{% endif %}

{% trans "Responsible for planning service of archaeological files" as af %}
{% if item.responsible_town_planning_service_files.count %}
{% dynamic_table_document af 'files' 'responsible_town_planning_service' item.pk '' output %}
{% endif %}

{% if item.operation_docs_q.count %}
{% trans "Documents associated to operations" as operation_docs %}
{% dynamic_table_document operation_docs 'operation_docs' 'person' item.pk '' output %}
{% endif %}

{% if item.contextrecord_docs_q.count %}
{% trans "Documents associated to context records" as context_records %}
{% dynamic_table_document context_records 'context_records_docs' 'person' item.pk '' output %}
{% endif %}

{% if item.find_docs_q.count %}
{% trans "Documents associated to finds" as finds_docs %}
{% dynamic_table_document finds_docs 'finds_docs' 'person' item.pk '' output %}
{% endif %}


{% endblock %}