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

{% 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>

{% field "Name" item.name %}
{% field "Surname" item.surname %}
{% field "Raw name" item.raw_name %}
{% field "Created by" item.history_creator.ishtaruser.full_label %}
{% field "Email" item.email %}
{% field "Type(s)" item.person_types_list %}
{% field "Address" item.address %}
{% field "Address complement" item.address_complement %}
{% field "Postal code" item.postal_code %}
{% field "Town" item.town %}
{% field "Phone" item.phone %}
{% field "Mobile phone" item.mobile_phone %}

{% 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 %}


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


{% trans "Associated archaelogical files" as af %}
{% if item.file_responsability.count %}
{% dynamic_table_document af 'files' 'file_responsability' item.pk %}
{% endif %}

<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 %}