summaryrefslogtreecommitdiff
path: root/archaeological_operations/templates/ishtar/sheet_operation.html
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2017-11-16 20:07:38 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2017-11-16 20:07:38 +0100
commit1e71763dc8583af4d67d18a410434b945c3229b2 (patch)
treebf8f68252d44211155dd1bf7257a26ada6ae8a8d /archaeological_operations/templates/ishtar/sheet_operation.html
parente2d6f4cf7647b22ab2d8c8798f9339760e178533 (diff)
downloadIshtar-1e71763dc8583af4d67d18a410434b945c3229b2.tar.bz2
Ishtar-1e71763dc8583af4d67d18a410434b945c3229b2.zip
UI: improve sheets
Diffstat (limited to 'archaeological_operations/templates/ishtar/sheet_operation.html')
-rw-r--r--archaeological_operations/templates/ishtar/sheet_operation.html141
1 files changed, 84 insertions, 57 deletions
diff --git a/archaeological_operations/templates/ishtar/sheet_operation.html b/archaeological_operations/templates/ishtar/sheet_operation.html
index 53d1d407d..934a3ee19 100644
--- a/archaeological_operations/templates/ishtar/sheet_operation.html
+++ b/archaeological_operations/templates/ishtar/sheet_operation.html
@@ -3,75 +3,102 @@
{% block head_title %}{% trans "Operation:" %} {{item.short_label}}{% endblock %}
-{% block content %}
+{% block toolbar %}
{% window_nav item window_id 'show-operation' 'operation_modify' 'show-historized-operation' 'revert-operation' previous next 1 %}
+{% endblock %}
+
+{% block content %}
+
+<div class="row">
+ <div class="offset-md-4 col-sm-4">
+ <div class="card">
+ {% if item.image %}
+ <img class='card-img-top' src="{{item.thumbnail.url}}">
+ {% endif%}
+ <div class="card-body">
+ <div class="row">
+ <div class="col main">
+ {% if item.year or item.operation_code %}
+ {{item.year|default:''}}-{{item.operation_code|default:''}}{% endif %}<br>
+ {% if item.code_patriarche %}OA{{item.code_patriarche}}{% endif %}
+ </div>
+ <div class="col text-muted">
+ {% include "ishtar/blocks/sheet_external_id.html" %}
+ </div>
+ </div>
+ <p class="card-text">
+ <p class='window-refs' title="{% trans 'Name' %}">{{item.common_name|default:''}}</p>
+ <p class='window-refs' title="{% trans 'Address' %}">{{item.address|default:''}}</p>
+ </p>
+ </div>
+ </div>
+ </div>
+</div>
+
+ <h3>{% trans "General"%}</h3>
+
+ {% field_li "Old code" item.old_code %}
+ {% include "ishtar/blocks/sheet_creation_section.html" %}
+ {% trans "Begining date" as begining_date_label %}
+ {% field_li begining_date_label item.start_date %}
+ {% field_li "Excavation end date" item.excavation_end_date|default:"-" %}
+ {% field_li_detail "Head scientist" item.scientist %}
+ {% field_li_detail "In charge" item.in_charge %}
+ {% field_li_multiple "Collaborators" item.collaborators %}
+ {% field_li_detail "Operator" item.operator %}
+ <li><label>{%trans "State:"%}</label> <span class='value'>{% if item.is_active %}{%trans "Active file"%}</span></p>
+ {% else %}{%trans "Closed operation"%}</span></li> {% endif %}
+ {% if item.closing.date %}<li><label>{%trans "Closing date"%}</label> <span class='value'>{{ item.closing.date }} <strong>{%trans "by" %}</strong> {{ item.closing.user }}</span></li>{% endif %}
+ {% field_li "Type" item.operation_type %}
+ {% if item.surface %}<li><label>{%trans "Surface"%}</label> <span class='value'>{{ item.surface }} m<sup>2</sup> ({{ item.surface_ha }} ha)</span></li>{% endif %}
+ {% if item.cost %}<li><label>{%trans "Cost"%}</label> <span class='value'>{{ item.cost }} &euro;{% if item.cost_by_m2 %}, ({{ item.cost_by_m2 }} &euro;/m<sup>2</sup>){%endif%}</span></li>{%endif%}
+ {% if item.duration %}<li><label>{%trans "Duration"%}</label> <span class='value'>{{ item.duration }} {%trans "Day"%}s</span></li>{%endif%}
+ {% field_li_multiple "Remains" item.remains %}
+ {% field_li_multiple "Periods" item.periods %}
+ {% if item.QUALITY_DICT %}{% field_li "Record quality" item.record_quality|from_dict:item.QUALITY_DICT %}{% endif %}
+ {% if item.history_object and item.history_object.QUALITY_DICT %}{% field_li "Record quality" item.record_quality|from_dict:item.history_object.QUALITY_DICT %}{% endif %}
+ {% field_li "Report delivery date" item.report_delivery_date %}
+ {% field_li "Report processing" item.report_processing %}
+ {% field_li "Deadline for submission of the documentation" item.documentation_deadline %}
+ {% field_li "Documentation received" item.documentation_received %}
+ {% field_li "Deadline for submission of the finds" item.finds_deadline %}
+ {% field_li "Finds received" item.finds_received %}
+ {% field_li_detail "Associated file" item.associated_file %}
+ {% field_li "Responsible for planning service" item.associated_file.responsible_town_planning_service.full_address %}
+ {% if item.associated_file.town_planning_service %}
+ {% field_li "Planning service organization" item.associated_file.town_planning_service.full_address %}
+ {% else %}
+ {% field_li "Planning service organization" item.associated_file.responsible_town_planning_service.attached_to.full_address %}
+ {% endif %}
+ {% field_li "Permit type" item.associated_file.permit_type %}
+ {% field_li "Permit reference" item.associated_file.permit_reference %}
+ {% field_li "General contractor" item.associated_file.general_contractor.full_address %}
+ {% if item.associated_file.corporation_general_contractor %}
+ {% field_li "General contractor organization" item.associated_file.corporation_general_contractor.full_address %}
+ {% else%}
+ {% field_li "General contractor organization" item.associated_file.general_contractor.attached_to.full_address %}
+ {% endif %}
+ </ul>
+ {% field "Comment" item.comment "<pre>" "</pre>" %}
+ {% field "Abstract" item.abstract "<pre>" "</pre>" %}
+ {% field "Comment about scientific documentation" item.scientific_documentation_comment "<pre>" "</pre>" %}
+
+ {% include "ishtar/blocks/sheet_json.html" %}
+ </p>
+ </div>
+
-{% if item.image %}
-<a href='{{item.image.url}}' rel="prettyPhoto" title="{{item.label}}" class='photo'><img src='{{item.thumbnail.url}}'/></a>
-{% endif%}
{% if item.virtual_operation %}
<p class='alert'><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> {% trans "This operation is virtual." %}</p>
{% endif %}
+
{% if not item.code_patriarche %}
<p class='alert'><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> {%trans "Patriarche OA code not yet recorded!"%}</p>
{% endif %}
-<p class='window-refs'>{% if item.year or item.operation_code %}{{item.year|default:''}}-{{item.operation_code|default:''}}{% endif %}{% if item.code_patriarche %} &ndash; OA{{item.code_patriarche}}{% endif %}
-</p>
-<p class='window-refs' title="{% trans 'Name' %}">{{item.common_name|default:''}}</p>
-<p class='window-refs' title="{% trans 'Address' %}">{{item.address|default:''}}</p>
-{% include "ishtar/blocks/sheet_external_id.html" %}
-<h3>{% trans "General"%}</h3>
<ul class='form-flex'>
- {% field_li "Old code" item.old_code %}
- {% include "ishtar/blocks/sheet_creation_section.html" %}
- {% trans "Begining date" as begining_date_label %}
- {% field_li begining_date_label item.start_date %}
- {% field_li "Excavation end date" item.excavation_end_date|default:"-" %}
- {% field_li_detail "Head scientist" item.scientist %}
- {% field_li_detail "In charge" item.in_charge %}
- {% field_li_multiple "Collaborators" item.collaborators %}
- {% field_li_detail "Operator" item.operator %}
-<li><label>{%trans "State:"%}</label> <span class='value'>{% if item.is_active %}{%trans "Active file"%}</span></p>
-{% else %}{%trans "Closed operation"%}</span></li> {% endif %}
-{% if item.closing.date %}<li><label>{%trans "Closing date"%}</label> <span class='value'>{{ item.closing.date }} <strong>{%trans "by" %}</strong> {{ item.closing.user }}</span></li>{% endif %}
-{% field_li "Type" item.operation_type %}
-{% if item.surface %}<li><label>{%trans "Surface"%}</label> <span class='value'>{{ item.surface }} m<sup>2</sup> ({{ item.surface_ha }} ha)</span></li>{% endif %}
-{% if item.cost %}<li><label>{%trans "Cost"%}</label> <span class='value'>{{ item.cost }} &euro;{% if item.cost_by_m2 %}, ({{ item.cost_by_m2 }} &euro;/m<sup>2</sup>){%endif%}</span></li>{%endif%}
-{% if item.duration %}<li><label>{%trans "Duration"%}</label> <span class='value'>{{ item.duration }} {%trans "Day"%}s</span></li>{%endif%}
-{% field_li_multiple "Remains" item.remains %}
-{% field_li_multiple "Periods" item.periods %}
-{% if item.QUALITY_DICT %}{% field_li "Record quality" item.record_quality|from_dict:item.QUALITY_DICT %}{% endif %}
-{% if item.history_object and item.history_object.QUALITY_DICT %}{% field_li "Record quality" item.record_quality|from_dict:item.history_object.QUALITY_DICT %}{% endif %}
-{% field_li "Report delivery date" item.report_delivery_date %}
-{% field_li "Report processing" item.report_processing %}
-{% field_li "Deadline for submission of the documentation" item.documentation_deadline %}
-{% field_li "Documentation received" item.documentation_received %}
-{% field_li "Deadline for submission of the finds" item.finds_deadline %}
-{% field_li "Finds received" item.finds_received %}
-{% field_li_detail "Associated file" item.associated_file %}
-{% field_li "Responsible for planning service" item.associated_file.responsible_town_planning_service.full_address %}
-{% if item.associated_file.town_planning_service %}
- {% field_li "Planning service organization" item.associated_file.town_planning_service.full_address %}
-{% else %}
- {% field_li "Planning service organization" item.associated_file.responsible_town_planning_service.attached_to.full_address %}
-{% endif %}
-{% field_li "Permit type" item.associated_file.permit_type %}
-{% field_li "Permit reference" item.associated_file.permit_reference %}
-{% field_li "General contractor" item.associated_file.general_contractor.full_address %}
-{% if item.associated_file.corporation_general_contractor %}
- {% field_li "General contractor organization" item.associated_file.corporation_general_contractor.full_address %}
-{% else%}
- {% field_li "General contractor organization" item.associated_file.general_contractor.attached_to.full_address %}
-{% endif %}
-</ul>
-{% field "Comment" item.comment "<pre>" "</pre>" %}
-{% field "Abstract" item.abstract "<pre>" "</pre>" %}
-{% field "Comment about scientific documentation" item.scientific_documentation_comment "<pre>" "</pre>" %}
-
-{% include "ishtar/blocks/sheet_json.html" %}
{% if not next %}
{% if item.towns.count %}