summaryrefslogtreecommitdiff
path: root/archaeological_finds/templates
diff options
context:
space:
mode:
Diffstat (limited to 'archaeological_finds/templates')
-rw-r--r--archaeological_finds/templates/ishtar/sheet_find.html43
-rw-r--r--archaeological_finds/templates/ishtar/sheet_findsource.html3
-rw-r--r--archaeological_finds/templates/ishtar/sheet_treatment.html13
-rw-r--r--archaeological_finds/templates/ishtar/sheet_treatmentfile.html16
-rw-r--r--archaeological_finds/templates/ishtar/sheet_treatmentfilesource.html3
-rw-r--r--archaeological_finds/templates/ishtar/sheet_treatmentsource.html3
6 files changed, 51 insertions, 30 deletions
diff --git a/archaeological_finds/templates/ishtar/sheet_find.html b/archaeological_finds/templates/ishtar/sheet_find.html
index b088f3161..912bf1b93 100644
--- a/archaeological_finds/templates/ishtar/sheet_find.html
+++ b/archaeological_finds/templates/ishtar/sheet_find.html
@@ -15,27 +15,15 @@
<p class='window-refs'>{% for base_find in item.base_finds.all %}{% if forloop.counter0 %} &ndash; {% endif %}{{base_find.short_id}}{% endfor %}</p>
<p class="window-refs">{{ item.administrative_index|default:"" }}</p>
<p class="window-refs">{{ item.contextrecord|default:"" }}</p>
-
+{% include "ishtar/blocks/sheet_external_id.html" %}
<ul class='form-flex'>
-{% field_li "Previous ID" item.previous_id %}
-
- <li><label>{%trans "Creation:"%}</label>
- <span class='value'>
- {{item.history_creator.ishtaruser.person}}<br/>
- <small><em>{{item.history_creation_date|date:"DATETIME_FORMAT"}}</em></small>
- </span>
- </li>
- {% if item.history_creation_date != item.last_edition_date %}
- <li><label>{%trans "Modification:"%}</label>
- <span class='value'>
- {{item.history_modifier.ishtaruser.person}}<br/>
- <small><em>{% firstof item.history_date|date:"DATETIME_FORMAT" item.history.all.0.history_date|date:"DATETIME_FORMAT" %}</em></small>
- </span>
- </li>
- {% endif %}
-{% field_li "Administrative index" item.administrative_index %}
+ {% field_li "Previous ID" item.previous_id %}
+
+ {% include "ishtar/blocks/sheet_creation_section.html" %}
+ {% trans "Administrative index" as admin_index_label %}
+ {% field_li admin_index_label item.administrative_index %}
{% field_li_multiple "Material types" item.material_types %}
{% field_li "Dating" item.dating %}
{% field_li "Length (cm)" item.length %}
@@ -154,7 +142,7 @@
</a>
</td>
<td class='string'>{{ treatment.year }} - {{treatment.index}}</td>
- <td class='string'>{{ treatment.label }}</td>
+ <td class='string'>{{ treatment.label|default_if_none:"-" }}</td>
<td class='string'>{{ treatment.treatment_types_lbl }}</td>
<td class='string'>{{ treatment.treatment_state|default_if_none:"-" }}</td>
<td class='item-list'>{% for item in items %}<span>{{item}} {{ item|link_to_window}}</span>{% endfor %}</td>
@@ -176,9 +164,16 @@
<h3>{% trans "Associated base finds"%}</h3>
{% for base_find in item.base_finds.all %}
+<p class='window-refs'>{{base_find.complete_id }}</p>
+<p class='window-refs'>{{base_find.short_id }}</p>
+{% if base_find.external_id %}
+<p class='window-refs external-id'>
+ <small title="{% trans 'Internal ID' %}">
+ <i class="fa fa-key" aria-hidden="true"></i>
+ {{base_find.external_id|default:''}}
+ </small>
+</p>{% endif %}
<ul class='form-flex'>
-{% field_li "Complete ID" base_find.complete_id %}
-{% field_li "Short ID" base_find.short_id %}
{% with item.history_creation_date|date:"SHORT_DATETIME_FORMAT" as creation_date %}
{% with item.history_creator.ishtaruser.full_label|add:"<br/><i>"|add:creation_date|add:"</i>" as creator %}
{% field_li "Created by" creator|safe %}
@@ -228,6 +223,7 @@
<table id='{{window_id}}-docs'>
<caption>{%trans "Documents"%}</caption>
<tr>
+ <th>&nbsp;</th>
<th>{% trans "Title" %}</th>
<th>{% trans "Type" %}</th>
<th>{% trans "Authors" %}</th>
@@ -235,8 +231,11 @@
</tr>
{% for doc in item.source.all %}
<tr>
+ <td><a class="display_details" href="#"
+ onclick="load_window('{% url 'show-findsource' doc.id %}/');"><i class="fa fa-info-circle" aria-hidden="true"></i>
+ </a></td>
<td class='string'>{{ doc.title }}</td>
- <td class='string'>{{doc.source_type}}</td>
+ <td class='string'>{{ doc.source_type }}</td>
<td class='string'>{{ doc.authors.all|join:", " }}</td>
<td class='string'>{% if doc.associated_url %}<a href='{{doc.associated_url}}' target="_blank">{{doc.associated_url}}</a>{% endif %}</td>
</tr>
diff --git a/archaeological_finds/templates/ishtar/sheet_findsource.html b/archaeological_finds/templates/ishtar/sheet_findsource.html
index 69d14d161..fedb20911 100644
--- a/archaeological_finds/templates/ishtar/sheet_findsource.html
+++ b/archaeological_finds/templates/ishtar/sheet_findsource.html
@@ -8,5 +8,6 @@
{% endblock %}
{% block related %}
-{% field "Related find" item.owner '' item.owner|link_to_window %}
+{% trans "Related find" as related_item_label %}
+{% field related_item_label item.owner '' item.owner|link_to_window %}
{% endblock %}
diff --git a/archaeological_finds/templates/ishtar/sheet_treatment.html b/archaeological_finds/templates/ishtar/sheet_treatment.html
index 633fa1829..9d6c75425 100644
--- a/archaeological_finds/templates/ishtar/sheet_treatment.html
+++ b/archaeological_finds/templates/ishtar/sheet_treatment.html
@@ -1,10 +1,10 @@
{% extends "ishtar/sheet.html" %}
-{% load i18n window_field from_dict link_to_window window_tables window_header humanize %}
+{% load i18n window_field from_dict link_to_window window_tables window_ope_tables window_header humanize %}
{% load url from future %}
{% block head_title %}{% trans "Treatment" %}{% endblock %}
{% block content %}
-{% window_nav item window_id 'show-treatment' 'treatment_modify' %}
+{% window_nav item window_id 'show-treatment' 'treatment_modify' 'show-historized-treatment' 'revert-treatment' previous next 1 %}
{% if item.image %}
<a href='{{item.image.url}}' rel="prettyPhoto" title="{{item.label}}" class='photo'><img src='{{item.thumbnail.url}}'/></a>
@@ -56,5 +56,14 @@
{% trans "Related operations" as related_operations %}
{% dynamic_table_document related_operations 'operations' 'related_treatment' item.pk 'TABLE_COLS' output %}
+{% if item.source.count %}
+{% trans "Associated documents" as associated_docs %}
+{% dynamic_table_document associated_docs 'treatments_docs' 'treatment' item.pk '' output %}
+{% endif %}
+
+{% if item.administrative_act.count %}
+{% trans "Administrative acts" as admact_lbl %}
+{% table_administrativact admact_lbl item.administrative_act.all %}
+{% endif %}
{% endblock %}
diff --git a/archaeological_finds/templates/ishtar/sheet_treatmentfile.html b/archaeological_finds/templates/ishtar/sheet_treatmentfile.html
index 097f5defd..b84f60883 100644
--- a/archaeological_finds/templates/ishtar/sheet_treatmentfile.html
+++ b/archaeological_finds/templates/ishtar/sheet_treatmentfile.html
@@ -1,10 +1,10 @@
{% extends "ishtar/sheet.html" %}
-{% load i18n window_field from_dict link_to_window window_tables window_header humanize %}
+{% load i18n window_field from_dict link_to_window window_tables window_ope_tables window_header humanize %}
{% load url from future %}
{% block head_title %}{% trans "Treatment request" %}{% endblock %}
{% block content %}
-{% window_nav item window_id 'show-treatmentfile' 'treatmentfile_modify' %}
+{% window_nav item window_id 'show-treatmentfile' 'treatmentfile_modify' 'show-historized-treatmentfile' 'revert-treatmentfile' previous next 1 %}
<p class="window-refs">{{ item.name|default:"" }}</p>
{% if item.internal_reference %}
@@ -42,9 +42,19 @@
{% field "Contact" item.applicant.address_lbl %}
{% endif %}
-{% trans "Treatments" as treatments %}
{% if item.treatments.count %}
+{% trans "Treatments" as treatments %}
{% dynamic_table_document treatments 'treatments' 'file' item.pk '' output '' 'treatment' %}
{% endif %}
+{% if item.source.count %}
+{% trans "Associated documents" as associated_docs %}
+{% dynamic_table_document associated_docs 'treatmentfiles_docs' 'treatment_file' item.pk '' output %}
+{% endif %}
+
+{% if item.administrative_act.count %}
+{% trans "Administrative acts" as admact_lbl %}
+{% table_administrativact admact_lbl item.administrative_act.all %}
+{% endif %}
+
{% endblock %}
diff --git a/archaeological_finds/templates/ishtar/sheet_treatmentfilesource.html b/archaeological_finds/templates/ishtar/sheet_treatmentfilesource.html
index e558296a8..17cc14b5b 100644
--- a/archaeological_finds/templates/ishtar/sheet_treatmentfilesource.html
+++ b/archaeological_finds/templates/ishtar/sheet_treatmentfilesource.html
@@ -8,5 +8,6 @@
{% endblock %}
{% block related %}
-{% field "Related treatment request" item.owner '' item.owner|link_to_window %}
+{% trans "Related treatment request" as related_item_label %}
+{% field related_item_label item.owner '' item.owner|link_to_window %}
{% endblock %}
diff --git a/archaeological_finds/templates/ishtar/sheet_treatmentsource.html b/archaeological_finds/templates/ishtar/sheet_treatmentsource.html
index 0825810ad..70e69c704 100644
--- a/archaeological_finds/templates/ishtar/sheet_treatmentsource.html
+++ b/archaeological_finds/templates/ishtar/sheet_treatmentsource.html
@@ -8,5 +8,6 @@
{% endblock %}
{% block related %}
-{% field "Related treatment" item.owner '' item.owner|link_to_window %}
+{% trans "Related treatment" as related_item_label %}
+{% field related_item_label item.owner '' item.owner|link_to_window %}
{% endblock %}