diff options
Diffstat (limited to 'archaeological_operations/templates/ishtar/sheet_operation.html')
-rw-r--r-- | archaeological_operations/templates/ishtar/sheet_operation.html | 353 |
1 files changed, 215 insertions, 138 deletions
diff --git a/archaeological_operations/templates/ishtar/sheet_operation.html b/archaeological_operations/templates/ishtar/sheet_operation.html index e46db74c7..0052dde7b 100644 --- a/archaeological_operations/templates/ishtar/sheet_operation.html +++ b/archaeological_operations/templates/ishtar/sheet_operation.html @@ -1,97 +1,162 @@ {% extends "ishtar/sheet.html" %} {% load i18n window_tables window_header window_ope_tables window_field from_dict %} -{% block head_title %}{% trans "Operation" %}{% endblock %} +{% 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-lg-4 col-lg-4 offset-md-3 col-md-6 offset-sm-1 col-sm-10 col-12"> + <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> -{% if item.image %} -<a href='{{item.image.url}}' rel="prettyPhoto" title="{{item.label}}" class='photo'><img src='{{item.thumbnail.url}}'/></a> -{% endif%} +<h3>{% trans "General"%}</h3> + +<div class="row"> + {% field_flex "Old code" item.old_code %} + {% include "ishtar/blocks/sheet_creation_section.html" %} + {% trans "Begining date" as begining_date_label %} + {% field_flex begining_date_label item.start_date|date:"DATE_FORMAT" %} + {% field_flex "Excavation end date" item.excavation_end_date|date:"DATE_FORMAT"|default:"-" %} + {% field_flex_detail "Head scientist" item.scientist %} + {% field_flex_detail "In charge" item.in_charge %} + {% field_flex_multiple "Collaborators" item.collaborators %} + {% field_flex_detail "Operator" item.operator %} + <div class="col-12 col-md-6 col-lg-4 d-flex flex-wrap row"> + <dt class="col-5">{%trans "State"%}</dt> + <dd class='col-7'> + {% if item.is_active %}{%trans "Active file"%} + {% else %}{%trans "Closed operation"%}{% endif %} + </dd> + </div> + {% if item.closing.date %} + <div class="col-12 col-md-6 col-lg-4 d-flex flex-wrap row"> + <dt class="col-5">{%trans "Closing date"%}</dt> + <dd class='col-7'> + {{ item.closing.date }} <strong>{%trans "by" %}</strong> {{ item.closing.user }} + </dd> + </div> + {% endif %} + {% field_flex "Type" item.operation_type %} + {% if item.surface %} + <div class="col-12 col-md-6 col-lg-4 d-flex flex-wrap row"> + <dt class="col-5">{%trans "Surface"%}</dt> + <dd class='col-7'> + {{ item.surface }} m<sup>2</sup> ({{ item.surface_ha }} ha) + </dd> + </div> + {% endif %} + {% if item.cost %} + <div class="col-12 col-md-6 col-lg-4 d-flex flex-wrap row"> + <dt class="col-5">{%trans "Cost" %}</dt> + <dd class='col-7'> + {{ item.cost }} €{% if item.cost_by_m2 %}, ({{ item.cost_by_m2 }} €/m<sup>2</sup>){%endif%} + </dd> + </div> + {%endif%} + {% if item.duration %} + <div class="col-12 col-md-6 col-lg-4 d-flex flex-wrap row"> + <dt class="col-5">{%trans "Duration"%}</dt> + <dd class='col-7'> + {{ item.duration }} {% trans "days" %} + </dd> + </div> + {%endif%} + {% field_flex_multiple "Remains" item.remains %} + {% field_flex_multiple "Periods" item.periods %} + {% if item.QUALITY_DICT %}{% field_flex "Record quality" item.record_quality|from_dict:item.QUALITY_DICT %}{% endif %} + {% if item.history_object and item.history_object.QUALITY_DICT %}{% field_flex "Record quality" item.record_quality|from_dict:item.history_object.QUALITY_DICT %}{% endif %} + {% field_flex "Report delivery date" item.report_delivery_date %} + {% field_flex "Report processing" item.report_processing %} + {% field_flex "Deadline for submission of the documentation" item.documentation_deadline %} + {% field_flex "Documentation received" item.documentation_received %} + {% field_flex "Deadline for submission of the finds" item.finds_deadline %} + {% field_flex "Finds received" item.finds_received %} + {% field_flex_detail "Associated file" item.associated_file %} + {% field_flex "Responsible for planning service" item.associated_file.responsible_town_planning_service.full_address %} + {% if item.associated_file.town_planning_service %} + {% field_flex "Planning service organization" item.associated_file.town_planning_service.full_address %} + {% else %} + {% field_flex "Planning service organization" item.associated_file.responsible_town_planning_service.attached_to.full_address %} + {% endif %} + {% field_flex "Permit type" item.associated_file.permit_type %} + {% field_flex "Permit reference" item.associated_file.permit_reference %} + {% field_flex "General contractor" item.associated_file.general_contractor.full_address %} + {% if item.associated_file.corporation_general_contractor %} + {% field_flex "General contractor organization" item.associated_file.corporation_general_contractor.full_address %} + {% else%} + {% field_flex "General contractor organization" item.associated_file.general_contractor.attached_to.full_address %} + {% endif %} +</div> +<div class="row"> + {% field_flex_full "Comment" item.comment "<pre>" "</pre>" %} + {% field_flex_full "Abstract" item.abstract "<pre>" "</pre>" %} + {% field_flex_full "Comment about scientific documentation" item.scientific_documentation_comment "<pre>" "</pre>" %} + + {% include "ishtar/blocks/sheet_json.html" %} +</div> {% if item.virtual_operation %} -<p class='alert'><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> {% trans "This operation is virtual." %}</p> +<div class="alert alert-warning" role="alert"> + {% trans "This operation is virtual." %} +</div> {% 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> +<div class="alert alert-warning" role="alert"> + {% trans "Patriarche OA code not yet recorded!"%} +</div> {% endif %} -<p class='window-refs'>{% if item.year or item.operation_code %}{{item.year|default:''}}-{{item.operation_code|default:''}}{% endif %}{% if item.code_patriarche %} – 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 }} €{% if item.cost_by_m2 %}, ({{ item.cost_by_m2 }} €/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 %} <h3>{% trans "Localisation"%}</h3> -<ul class='form-flex'> -{% field_li "Towns" item.towns_codes|join:" ; " %} -{% field_li "Main address" item.associated_file.address %} -{% field_li "Complement" item.associated_file.address_complement %} -{% field_li "Postal code" item.associated_file.postal_code %} -</ul> +<div class="row"> + {% field_flex_full "Towns" item.towns_codes|join:" ; " %} + {% field_flex "Main address" item.associated_file.address %} + {% field_flex "Complement" item.associated_file.address_complement %} + {% field_flex "Postal code" item.associated_file.postal_code %} +</div> {% endif %} {% if item.right_relations.count %} <h3>{% trans "Relations"%}</h3> {% for rel in item.right_relations.all %} {% ifchanged rel.relation_type %} -{% if forloop.counter0 %}</ul>{% endif %} -<h4>{{rel.relation_type}}</h4><ul>{% endifchanged %} -<li><a href="#" onclick="load_window('/show-operation/{{rel.right_record.pk}}/');" class="display_details"><i class="fa fa-info-circle" aria-hidden="true"></i></a> {{rel.right_record}}</li> -{% if forloop.last %}</ul>{% endif %} +<h4>{{rel.relation_type}}</h4> +<div class="row">{% endifchanged %} + <div class="col-12"> + <a href="#" onclick="load_window('/show-operation/{{rel.right_record.pk}}/');" class="display_details"> + <i class="fa fa-info-circle" aria-hidden="true"></i> + </a> {{rel.right_record}} + </div> +{% if forloop.last %} +</div>{% endif %} {% endfor %} {% endif %} @@ -147,95 +212,107 @@ <small class="centered"><em>{% trans "These numbers are updated hourly" %}</em></small> <h4>{% trans "Administrative acts" %}</h4> -<ul class='form-flex'> -{% field_li "Number of administrative acts" item.nb_acts %} -{% field_li "Number of indexed administrative acts" item.nb_indexed_acts %} -</ul> +<div class='row'> +{% field_flex_2 "Number of administrative acts" item.nb_acts %} +{% field_flex_2 "Number of indexed administrative acts" item.nb_indexed_acts %} +</div> <h4>{% trans "Parcels" %}</h4> -<ul class='form-flex'> -{% field_li "Number of parcels" item.nb_parcels %} -</ul> +<div class='row'> +{% field_flex_2 "Number of parcels" item.nb_parcels %} +</div> <h4>{% trans "Context records" %}</h4> -<ul class='form-flex'> -{% field_li "Number of context records" item.nb_context_records %} -</ul> -<ul class='form-flex'> +<div class='row'> +{% field_flex_2 "Number of context records" item.nb_context_records %} +</div> +<div class='row'> {% if item.nb_context_records_by_type %} -<li><table class='clean-table small'> - <tr><th>{% trans "Type" %}</th><th>{% trans "Number" %}</th></tr> -{% for label, nb in item.nb_context_records_by_type %} - <tr><td>{{label}}</td><td>{{nb}}</td></tr> -{% endfor %} -</table></li> + <div class="col-12 col-md-6 col-lg-4"> + <table> + <tr><th>{% trans "Type" %}</th><th>{% trans "Number" %}</th></tr> + {% for label, nb in item.nb_context_records_by_type %} + <tr><td>{{label}}</td><td>{{nb}}</td></tr> + {% endfor %} + </table> + </div> {% endif %} {% if item.nb_context_records_by_periods %} -<li><table class='clean-table small'> - <tr><th>{% trans "Period" %}</th><th>{% trans "Number" %}</th></tr> -{% for label, nb in item.nb_context_records_by_periods %} - <tr><td>{{label}}</td><td>{{nb}}</td></tr> -{% endfor %} -</table></li> + <div class="col-12 col-md-6 col-lg-4"> + <table> + <tr><th>{% trans "Period" %}</th><th>{% trans "Number" %}</th></tr> + {% for label, nb in item.nb_context_records_by_periods %} + <tr><td>{{label}}</td><td>{{nb}}</td></tr> + {% endfor %} + </table> + </div> {% endif %} -</ul> +</div> <h4>{% trans "Finds" %}</h4> -<ul class='form-flex'> -{% field_li "Number of finds" item.nb_finds %} -</ul> -<ul class='form-flex'> +<div class='row'> +{% field_flex_2 "Number of finds" item.nb_finds %} +</div> +<div class='row'> {% if item.nb_finds_by_material_type %} -<li><table class='clean-table small'> - <tr><th>{% trans "Material type" %}</th><th>{% trans "Number" %}</th></tr> -{% for label, nb in item.nb_finds_by_material_type %} - <tr><td>{{label}}</td><td>{{nb}}</td></tr> -{% endfor %} -</table></li> + <div class="col-12 col-md-6 col-lg-4"> + <table> + <tr><th>{% trans "Material type" %}</th><th>{% trans "Number" %}</th></tr> + {% for label, nb in item.nb_finds_by_material_type %} + <tr><td>{{label}}</td><td>{{nb}}</td></tr> + {% endfor %} + </table> + </div> {% endif %} {% if item.nb_finds_by_types %} -<li><table class='clean-table small'> - <tr><th>{% trans "Object type" %}</th><th>{% trans "Number" %}</th></tr> -{% for label, nb in item.nb_finds_by_types %} - <tr><td>{{label}}</td><td>{{nb}}</td></tr> -{% endfor %} -</table></li> + <div class="col-12 col-md-6 col-lg-4"> + <table> + <tr><th>{% trans "Object type" %}</th><th>{% trans "Number" %}</th></tr> + {% for label, nb in item.nb_finds_by_types %} + <tr><td>{{label}}</td><td>{{nb}}</td></tr> + {% endfor %} + </table> + </div> {% endif %} {% if item.nb_finds_by_periods %} -<li><table class='clean-table small'> - <tr><th>{% trans "Period" %}</th><th>{% trans "Number" %}</th></tr> -{% for label, nb in item.nb_finds_by_periods %} - <tr><td>{{label}}</td><td>{{nb}}</td></tr> -{% endfor %} -</table></li> + <div class="col-12 col-md-6 col-lg-4"> + <table> + <tr><th>{% trans "Period" %}</th><th>{% trans "Number" %}</th></tr> + {% for label, nb in item.nb_finds_by_periods %} + <tr><td>{{label}}</td><td>{{nb}}</td></tr> + {% endfor %} + </table> + </div> {% endif %} -</ul> +</div> <h4>{% trans "Sources" %}</h4> -<ul class='form-flex'> -{% field_li "Number of sources" item.nb_documents %} -</ul> -<ul class='form-flex'> +<div class='row'> +{% field_flex "Number of sources" item.nb_documents %} +</div> +<div class='row'> {% if item.nb_documents_by_types %} -<li><table class='clean-table small'> - <tr><th>{% trans "Type" %}</th><th>{% trans "Number" %}</th></tr> -{% for label, nb in item.nb_documents_by_types %} - <tr><td>{{label}}</td><td>{{nb}}</td></tr> -{% endfor %} -</table></li> + <div class="col-12 col-md-6 col-lg-4"> + <table class="table"> + <tr><th>{% trans "Type" %}</th><th>{% trans "Number" %}</th></tr> + {% for label, nb in item.nb_documents_by_types %} + <tr><td>{{label}}</td><td>{{nb}}</td></tr> + {% endfor %} + </table> + </div> {% endif %} -</ul> +</div> {% if item.nb_stats_finds_by_ue %} <h4>{% trans "Finds by context records" %}</h4> -<ul class='form-flex'> -{% field_li "Mean" item.nb_stats_finds_by_ue.mean %} -{% field_li "Min" item.nb_stats_finds_by_ue.min %} -{% field_li "Max" item.nb_stats_finds_by_ue.max %} -{% field_li "Mode" item.nb_stats_finds_by_ue.mode %} -</ul> +<div class='row'> +{% field_flex_2 "Mean" item.nb_stats_finds_by_ue.mean %} +{% field_flex_2 "Min" item.nb_stats_finds_by_ue.min %} +{% field_flex_2 "Max" item.nb_stats_finds_by_ue.max %} +{% field_flex_2 "Mode" item.nb_stats_finds_by_ue.mode %} +</div> {% endif %} {% endif %} -{% endblock %} +{% endblock %}
\ No newline at end of file |