diff options
Diffstat (limited to 'archaeological_finds/templates/ishtar/sheet_exhibition.html')
-rw-r--r-- | archaeological_finds/templates/ishtar/sheet_exhibition.html | 133 |
1 files changed, 133 insertions, 0 deletions
diff --git a/archaeological_finds/templates/ishtar/sheet_exhibition.html b/archaeological_finds/templates/ishtar/sheet_exhibition.html new file mode 100644 index 000000000..cd37bac4b --- /dev/null +++ b/archaeological_finds/templates/ishtar/sheet_exhibition.html @@ -0,0 +1,133 @@ +{% extends "ishtar/sheet.html" %} +{% load i18n l10n ishtar_helpers window_field from_dict link_to_window window_tables window_ope_tables window_header humanize %} + +{% block head_title %}<strong><i class="fa fa-users" aria-hidden="true"></i> {% trans "Exhibition" %}</strong> - {{ item.name|default:"" }} [{{item.year|unlocalize}}]{% endblock %} + +{% block toolbar %} +{% window_nav item window_id 'show-exhibition' 'exhibition-modify' 'exhibition-show-historized' 'exhibition-revert' previous next 1 %} +{% endblock %} + +{% block content %} +{% with perm_documents=permission_view_own_document|or_:permission_view_document %} +{% with perm_change_basket=permission_view_own_find|or_:permission_view_find %} +{% with has_documents=item|safe_or:"documents.count|documents_list" %} +{% with display_documents=perm_documents|and_:has_documents %} + +{% if output != "ODT" and output != "PDF"%} +<ul class="nav nav-tabs" id="{{window_id}}-tabs" role="tablist"> + <li class="nav-item"> + <a class="nav-link active" id="{{window_id}}-exhibition-tab" + data-toggle="tab" href="#{{window_id}}-exhibition" role="tab" + aria-controls="{{window_id}}-exhibition" aria-selected="true"> + {% trans "Exhibition" %} + </a> + </li> + {% for loan in item.treatment_files.all %} + <li class="nav-item"> + <a class="nav-link" id="{{window_id}}-loan{{forloop.counter}}-tab" + data-toggle="tab" href="#{{window_id}}-loan{{forloop.counter}}" role="tab" + aria-controls="{{window_id}}-loan{{forloop.counter}}" aria-selected="true"> + {{loan.name}} + </a> + </li> + {% endfor %} +</ul> +{% endif %} + +<div class="tab-content" id="{{window_id}}-tab-content"> + <div class="tab-pane fade show active" id="{{window_id}}-exhibition" + role="tabpanel" aria-labelledby="{{window_id}}-exhibition-tab"> + + {% with has_image=item.images.count %} + {% if has_image %} + <div class="clearfix"> + <div class="card float-left col-12 col-md-6 col-lg-4"> + {% include "ishtar/blocks/window_image.html" %} + </div> + {% endif %} + <div class="row"> + {% field_flex _("Name") item.name %} + {% field_flex _("Type") item.exhibition_type %} + {% field_flex _("Year") item.year %} + {% field_flex_detail _("Responsible") item.in_charge %} + {% field_flex_full "Comment" item.comment "<pre>" "</pre>" %} + {% include "ishtar/blocks/sheet_json.html" %} + </div> + {% if has_image %} + </div> + {% endif %} + {% endwith %} + + {% if item.associated_basket %} + <h3>{% trans "Associated basket" %}</h3> + <div class="row"> + {% field_flex_detail _("Associated basket") item.associated_basket %} + + {% if perm_change_basket %} + <p class="col-12 col-md-6 col-lg-3 flex-wrap"> + <a class="wait-button btn btn-success" href="/find_basket_modification_add/{{item.associated_basket.pk}}/?back_url={% url 'display-exhibition' item.pk %}" title="{% trans 'Manage basket' %}"> + <i class="fa fa-shopping-basket"></i> {% trans "manage items of this basket" %} + </a> + </p> + {% endif %} + + </div> + {% dynamic_table_document finds 'finds' 'basket_id' item.associated_basket.pk 'TABLE_COLS' output %} + {% endif %} + + + {% if display_documents %} + {% trans "Associated documents" as associated_docs %} + {% dynamic_table_document associated_docs 'documents' 'treatment_files' item.pk '' output %} + {% endif %} + + {% if item.administrative_act.count %} + {% trans "Administrative acts" as admact_lbl %} + {% table_administrativact admact_lbl item.administrative_act.all %} + {% endif %} + + {% if not is_external %} + {% if item.history_creator or item.last_edition_date or item.created %} + <h3>{% trans "Sheet"%}</h3> + <div class="row"> + {% include "ishtar/blocks/sheet_creation_section.html" %} + </div> + {% endif %} + {% endif %} + </div> + {% for loan in item.treatment_files.all %} + <div class="tab-pane fade" id="{{window_id}}-loan{{forloop.counter}}" + role="tabpanel" aria-labelledby="{{window_id}}-loan{{forloop.counter}}-tab"> + <div class="row"> + {% with loan.exhibition_start_date|date:"SHORT_DATE_FORMAT" as exhibition_start_date %} + <dl class="col-12 col-md-6 col-lg-3 flex-wrap"> + <dt>{% trans "Dates" %}</dt> + <dd>{{loan.exhibition_start_date|date:"SHORT_DATE_FORMAT"}} / {{loan.exhibition_end_date|date:"SHORT_DATE_FORMAT"}}</dd> + </dl> + {% endwith %} + {% field_flex_detail _("Beneficiary of the loan") loan.applicant_organisation %} + {% field_flex_detail _("Scientific manager of the exhibition") loan.in_charge %} + {% field_flex_detail _("Exhibition location") loan.exhibition_location %} + {% field_flex_detail _("Insurance provider") loan.insurance_provider %} + </div> + <h3>{% trans "Associated basket" %}</h3> + <div class="row"> + {% field_flex_detail _("Associated basket") loan.associated_basket %} + + {% if perm_change_basket %} + <p class="col-12 col-md-6 col-lg-3 flex-wrap"> + <a class="wait-button btn btn-success" href="/find_basket_modification_add/{{loan.associated_basket.pk}}/?back_url={% url 'display-exhibition' loan.pk %}" title="{% trans 'Manage basket' %}"> + <i class="fa fa-shopping-basket"></i> {% trans "manage items of this basket" %} + </a> + </p> + {% endif %} + + </div> + {% dynamic_table_document finds 'finds' 'basket_id' loan.associated_basket.pk 'TABLE_COLS' output %} + + </div> + {% endfor %} +</div> + +{% endwith %}{% endwith %}{% endwith %}{% endwith %} +{% endblock %} |