diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2024-11-28 17:58:55 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2025-02-19 14:45:56 +0100 |
commit | d0760b4da854e1dadb4ff130468a4c6d185b1abc (patch) | |
tree | 464aab890c5d8ea8b51f6ad3558446b3c8018036 /archaeological_finds/templates | |
parent | f10b03c55ece933e4277cdf1e7d4acfba9fdd7ed (diff) | |
download | Ishtar-d0760b4da854e1dadb4ff130468a4c6d185b1abc.tar.bz2 Ishtar-d0760b4da854e1dadb4ff130468a4c6d185b1abc.zip |
✨ exhibition: forms/sheets
Diffstat (limited to 'archaeological_finds/templates')
5 files changed, 176 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 %} diff --git a/archaeological_finds/templates/ishtar/sheet_exhibition_pdf.html b/archaeological_finds/templates/ishtar/sheet_exhibition_pdf.html new file mode 100644 index 000000000..6540e1d58 --- /dev/null +++ b/archaeological_finds/templates/ishtar/sheet_exhibition_pdf.html @@ -0,0 +1,14 @@ +{% extends "ishtar/sheet_exhibition.html" %} +{% block header %} +{% endblock %} +{% block main_head %} +{{ block.super }} +<div id="pdfheader"> + Ishtar – {{APP_NAME}} – {{item}} +</div> +{% endblock %} +{%block head_sheet%}{%endblock%} +{%block main_foot%} +</body> +</html> +{%endblock%} diff --git a/archaeological_finds/templates/ishtar/sheet_exhibition_window.html b/archaeological_finds/templates/ishtar/sheet_exhibition_window.html new file mode 100644 index 000000000..e6a8dcc5b --- /dev/null +++ b/archaeological_finds/templates/ishtar/sheet_exhibition_window.html @@ -0,0 +1,3 @@ +{% extends "ishtar/sheet_exhibition.html" %} +{% block main_head %}{%endblock%} +{% block main_foot %}{%endblock%} diff --git a/archaeological_finds/templates/ishtar/wizard/exhibition.html b/archaeological_finds/templates/ishtar/wizard/exhibition.html new file mode 100644 index 000000000..e60126632 --- /dev/null +++ b/archaeological_finds/templates/ishtar/wizard/exhibition.html @@ -0,0 +1,13 @@ +{% extends "ishtar/wizard/search.html" %} +{% load i18n %} +{% block wizard_top_button %} +{% if permission_add_exhibition %} +<div class="row mb-3"> + <div class="col"> + <a href="{% url "exhibition-create" %}" class="btn btn-success"> + <i class="fa fa-plus" aria-hidden="true"></i> {% trans "new exhibition" %} + </a> + </div> +</div> +{% endif %} +{% endblock %} diff --git a/archaeological_finds/templates/ishtar/wizard/wizard_find_creation.html b/archaeological_finds/templates/ishtar/wizard/wizard_find_creation.html new file mode 100644 index 000000000..65806e303 --- /dev/null +++ b/archaeological_finds/templates/ishtar/wizard/wizard_find_creation.html @@ -0,0 +1,13 @@ +{% extends "ishtar/wizard/default_wizard.html" %} +{% load i18n l10n %} +{% block wizard_top_button %} +{% if no_context_cr %} +<div class="row mb-3"> + <div class="col"> + <a href="/find_create/{{no_context_cr|unlocalize}}/" class="btn btn-success"> + <i class="fa fa-plus" aria-hidden="true"></i> {% trans "find without context" %} + </a> + </div> +</div> +{% endif %} +{% endblock %} |