summaryrefslogtreecommitdiff
path: root/ishtar_common/templates/ishtar/sheet_person.html
blob: b6bf99d561dd40423c6fd4b37cf671fcedafbd7f (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
{% extends "ishtar/sheet.html" %}
{% load i18n %}

{% block head_sheet %}
{{block.super}}
<h1>{% trans "Person"%}</h1>
{% endblock %}

{% block content %}
<div class='tool'>{%trans "Export as:"%} <a href='{% url show-person item.pk "odt" %}'>{%trans "OpenOffice.org file"%}</a>, <a href='{% url show-person item.pk "pdf" %}'>{%trans "PDF file"%}</a></div>

<p><label>{% trans "Name" %}</label> <span class='value'>{{item.name}}</span></p>
<p><label>{% trans "Surname" %}</label> <span class='value'>{{item.surname}}</span></p>
<p><label>{%trans "Created by:"%}</label> <span class='value'>{{ item.history_creator.ishtaruser.full_label }}</span></p>
{% if item.email %}<p><label>{% trans "Email" %}</label> <span class='value'>{{item.email}}</span></p>{% endif %}
<p><label>{% trans "Type(s)" %}</label> <span class='value'>{{item.person_types_list}}</span></p>
{% if item.address %}<p><label>{% trans "Address" %}</label> <span class='value'>{{item.address}}</span></p> {% endif %}
{% if item.address_complement %}<p><label>{% trans "Address complement" %}</label> <span class='value'>{{item.address_complement}}</span></p> {% endif %}
{% if item.postal_code %}<p><label>{% trans "Postal code" %}</label> <span class='value'>{{item.postal_code}}</span></p> {% endif %}
{% if item.town %}<p><label>{% trans "Town" %}</label> <span class='value'>{{item.town}}</span></p> {% endif %}
{% if item.phone %}<p><label>{% trans "Phone" %}</label> <span class='value'>{{item.phone}}</span></p> {% endif %}
{% if item.mobile_phone %}<p><label>{% trans "Mobile phone" %}</label> <span class='value'>{{item.mobile_phone}}</span></p> {% endif %}


{% if item.organization %}<h3>{% trans "Associated organization"%}</h3>
<p><label>{% trans "Name" %}</label> <span class='value'>{{item.organization}}</span></p>
{% if item.organization.address %}<p><label>{% trans "Address" %}</label> <span class='value'>{{item.organization.address}}</span></p> {% endif %}
{% if item.organization.address_complement %}<p><label>{% trans "Address complement" %}</label> <span class='value'>{{item.organization.address_complement}}</span></p> {% endif %}
{% if item.organization.postal_code %}<p><label>{% trans "Postal code" %}</label> <span class='value'>{{item.organization.postal_code}}</span></p> {% endif %}
{% if item.organization.town %}<p><label>{% trans "Town" %}</label> <span class='value'>{{item.organization.town}}</span></p> {% endif %}
{% if item.organization.phone %}<p><label>{% trans "Phone" %}</label> <span class='value'>{{item.organization.phone}}</span></p> {% endif %}
{% if item.organization.mobile_phone %}<p><label>{% trans "Mobile phone" %}</label> <span class='value'>{{item.organization.mobile_phone}}</span></p> {% endif %}
{% endif %}


<table>
  <caption>{%trans "Associated operations"%}</caption>
  <tr>
    <th>{% trans "Year" %}</th>
    <th>{% trans "Ref." %}</th>
    <th>Code Patriarche</th>
    <th>{% trans "Type" %}</th>
    <th>{% trans "In charge" %}</th>
    <th>{% trans "Start date" %}</th>
    <th>{% trans "Excavation end date" %}</th>
    <th class='link'>&nbsp;</th>
  </tr>
  {% for operation in item.operation_scientific_responsability.all %}
  <tr>
    <td>{{operation.year|default:""}}</td>
    <td>{{operation.operation_code|default:""}}</td>
    <td>{{operation.code_patriarche|default:""}}</td>
    <td class='string'>{{operation.operation_type}}</td>
    <td class='string'>{{operation.in_charge|default:""}}</td>
    <td>{{operation.start_date|default:""}}</td>
    <td>{{operation.excavation_end_date|default:""}}</td>
    <td class='link'><a href="#" class='display_details' onclick='load_window("{%url show-operation operation.pk ''%}")'>{% trans "Details" %}</a></td>
  </tr>
  {% empty %}
  <tr><td colspan="8" class='no_items'>{% trans "No operation associated to this person" %}</td></tr>
  {% endfor %}
</table>

<table>
  <caption>{%trans "Associated archaelogical files"%}</caption>
  <tr>
    <th>{% trans "Ref." %}</th>
    <th>{% trans "Year" %}</th>
    <th>{% trans "Internal ref." %}</th>
    <th>{% trans "File type" %}</th>
    <th>Type de saisine</th>
    <th>{% trans "Towns" %}</th>
    <th class='link'>&nbsp;</th>
  </tr>
  {% for file in item.file_responsability.all %}
  <tr>
    <td>{{file.numeric_reference}}</td>
    <td>{{file.year}}</td>
    <td>{{file.internal_reference}}</td>
    <td>{{file.file_type}}</td>
    <td>{{file.saisine_type}}</td>
    <td class='string'>{{file.town_list}}</td>
    <td class='link'><a href="#" onclick='load_window("{%url show-file file.pk ''%}")'>{% trans "Details" %}</a></td>
  </tr>
  {% empty %}
  <tr><td colspan="8" class='no_items'>{% trans "No archaelogical file associated to this person" %}</td></tr>
  {% endfor %}
</table>

<table>
  <caption>{%trans "Documents"%}</caption>
  <tr>
    <th>{% trans "Year" %}</th>
    <th>{% trans "Title" %}</th>
    <th>{% trans "Type" %}</th>
    <th>{% trans "Link" %}</th>
  </tr>
  {% for author in item.author.all %}
  {% for doc in author.related_sources %}
  <tr>
    <td class='string'>{{ doc.creation_date|date:"Y"}}</td>
    <td class='string'>{{ doc.title }}</td>
    <td class='string'>{{ doc.source_type }}</td>
    <td class='string'>{% if doc.associated_url  %}<a href='{{doc.associated_url}}'>{% trans "Link"%}</a>{% endif %}</td>
  </tr>
  {% empty %}
  <tr><td colspan="4" class='no_items'>{% trans "No document associated to this person" %}</td></tr>
  {% endfor %}
  {% endfor %}
</table>


{% endblock %}