diff options
5 files changed, 82 insertions, 102 deletions
diff --git a/archaeological_finds/templates/ishtar/sheet_find.html b/archaeological_finds/templates/ishtar/sheet_find.html index d26cbcc76..6bfe9eee3 100644 --- a/archaeological_finds/templates/ishtar/sheet_find.html +++ b/archaeological_finds/templates/ishtar/sheet_find.html @@ -27,6 +27,8 @@ {% with associated_treatment_files_count=item.associated_treatment_files_count %} {% with can_view_container=permission_view_own_container|or_:permission_view_container %} +{% with dating_list=item|m2m_listing:"datings" %} +{% with display_datations=dating_list %} {% with display_warehouse_treatments=item.container|or_:item.container_ref|or_:item.upstream_treatment|or_:item.downstream_treatment|or_:non_modif_treatments_count|or_:associated_treatment_files_count %} {% with can_view_documents=permission_view_own_document|or_:permission_view_document %} {% with can_change=permission_change_own_find|or_:permission_change_find %} @@ -50,6 +52,15 @@ {% trans "Archaeological context" %} </a> </li> + {% if display_datations or can_change %} + <li class="nav-item"> + <a class="nav-link" id="{{window_id}}-datations-tab" + data-toggle="tab" href="#{{window_id}}-datations" role="tab" + aria-controls="{{window_id}}-datations" aria-selected="false"> + {% trans "Periods / Datings" %} + </a> + </li> + {% endif %} <li class="nav-item"> <a class="nav-link" id="{{window_id}}-warehouse-tab" data-toggle="tab" href="#{{window_id}}-warehouse" role="tab" @@ -139,6 +150,7 @@ {% field_flex_full "Decoration" item.decoration "<pre>" "</pre>" %} {% field_flex_full "Inscription" item.inscription "<pre>" "</pre>" %} {% field_flex "Manufacturing place" item.manufacturing_place %} + {% field_flex_multiple_obj "Cultural attributions" item 'cultural_attributions' %} {% field_flex_multiple_obj "Communicability" item 'communicabilities' %} {% field_flex_full _("General comment") item.comment "<pre>" "</pre>" %} </div> @@ -200,54 +212,6 @@ </div> {% endif %} - {% with dating_list=item|m2m_listing:"datings" %} - {% if dating_list or item.dating_comment or item.cultural_attributions_count %} - <h3>{% trans "Dating" %}</h3> - {% if item.cultural_attributions_count %} - <div class='row'> - {% field_flex_multiple_obj "Cultural attributions" item 'cultural_attributions' %} - </div> - {% endif %} - {% if dating_list %} - <table id='{{window_id}}-datings' class="table table-striped"> - <tr> - <th>{% trans "Chronological period" %}</th> - <th>{% trans "Start date" %}</th> - <th>{% trans "End date" %}</th> - <th>{% trans "Dating type" %}</th> - <th>{% trans "Quality" %}</th> - <th>{% trans "Precise on this dating" %}</th> - </tr> - {% for dating in dating_list %} - <tr> - <td> - {{dating.period}} - </td> - <td> - {{dating.start_date|default_if_none:"-"}} - </td> - <td> - {{dating.end_date|default_if_none:"-"}} - </td> - <td> - {{dating.dating_type|default_if_none:"-"}} - </td> - <td> - {{dating.quality|default_if_none:"-"}} - </td> - <td> - {{dating.precise_dating|default_if_none:"-"}} - </td> - </tr> - {% endfor %} - </table> - {% endif %} - <div class='row'> - {% field_flex_full "Comment on dating" item.dating_comment "<pre>" "</pre>" %} - </div> - {% endif %} - {% endwith %} - {% if not is_external %} {% if item.history_creator or item.last_edition_date or item.created %} <h3>{% trans "Sheet" %}</h3> @@ -309,6 +273,28 @@ </div> </div> + {% if display_datations or can_change %} + <div class="tab-pane fade" id="{{window_id}}-datations" + role="tabpanel" aria-labelledby="{{window_id}}-datations-tab"> + <h3>{% trans "Periods / Datings" %}</h3> + {% field_flex_multiple_obj _("Periods") item 'periods' %} + {% with url_dating="find-dating" %} + {% include "ishtar/blocks/sheet_dating_list.html" %} + {% endwith %} + {% if item.cultural_attributions_count or item.taq or item.taq_estimated or item.tpq or item.tpq_estimated or datings_comment %} + <h3>{% trans "Dating complements" %}</h3> + <div class='row'> + {% field_flex_multiple_obj "Cultural attributions" item 'cultural_attributions' %} + {% field_flex "TAQ" item.taq %} + {% field_flex "Estimated TAQ" item.taq_estimated %} + {% field_flex "TPQ" item.tpq %} + {% field_flex "Estimated TPQ" item.tpq_estimated %} + {% field_flex_full "Comment on datings" item.datings_comment "<pre>" "</pre>" has_image %} + </div> + {% endif %} + </div> + {% endif %} + {% include "ishtar/sheet_find_treatments.html" %} {% if display_documents %} @@ -346,7 +332,7 @@ {% endif %} </div> -{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %} +{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %} <script type='text/javascript'> $( "#{{window_id}}-tabs" ).on( "tabsactivate", function( event, ui ) { diff --git a/archaeological_finds/templates/ishtar/sheet_find_treatments.html b/archaeological_finds/templates/ishtar/sheet_find_treatments.html index b024f3f47..a8c7dc5be 100644 --- a/archaeological_finds/templates/ishtar/sheet_find_treatments.html +++ b/archaeological_finds/templates/ishtar/sheet_find_treatments.html @@ -9,9 +9,9 @@ </div> {% endif %} {% endcomment %} - {% if item.integrities_count or item.remarkabilities_count or item.conservatory_states_count or item.conservatory_comment or item.alterations.count or item.alteration_causes.count or item.recommended_treatments.count or item.appraisal_date or item.treatment_emergency or item.insurance_value or item.estimated_value %} <h3>{% trans "Preservation" %}</h3> <div class='row'> + {% if item.integrities_count or item.remarkabilities_count or item.conservatory_states_count or item.conservatory_comment or item.alterations.count or item.alteration_causes.count or item.recommended_treatments.count or item.appraisal_date or item.treatment_emergency or item.insurance_value or item.estimated_value %} {% field_flex_multiple_obj _("Integrity") item 'integrities' %} {% field_flex_multiple_obj _("Remarkability") item 'remarkabilities' %} {% field_flex_multiple_obj _("Conservatory states") item 'conservatory_states' %} @@ -23,8 +23,10 @@ {% field_flex _("Insurance value") item.insurance_value|default_if_none:''|intcomma '' ' '|add:CURRENCY %} {% field_flex _("Appraisal date") item.appraisal_date %} {% field_flex_full _("Conservatory comment") item.conservatory_comment "<pre>" "</pre>" %} - </div> + {% else %} + <em>{% trans "Not specified." %}</em> {% endif %} + </div> {% if item.container or item.container_ref %} {% if can_view_container %} <h3>{% trans "Warehouse - container" %}</h3> diff --git a/archaeological_finds/templates/ishtar/sheet_museum_find.html b/archaeological_finds/templates/ishtar/sheet_museum_find.html index 312bf3d0b..1886f2b7b 100644 --- a/archaeological_finds/templates/ishtar/sheet_museum_find.html +++ b/archaeological_finds/templates/ishtar/sheet_museum_find.html @@ -28,6 +28,8 @@ {% with can_view_container=permission_view_own_container|or_:permission_view_container %} {% with display_warehouse_treatments=item.container|or_:item.container_ref|or_:item.upstream_treatment|or_:item.downstream_treatment|or_:non_modif_treatments_count|or_:associated_treatment_files_count %} +{% with dating_list=item|m2m_listing:"datings" %} +{% with display_datations=dating_list %} {% with can_view_documents=permission_view_own_document|or_:permission_view_document %} {% with can_change=permission_change_own_find|or_:permission_change_find %} {% with has_documents=item|safe_or:"documents.count|documents_list"|safe_and_not:"documents_not_available" %} @@ -50,6 +52,15 @@ {% trans "Archaeological context" %} </a> </li> + {% if display_datations or can_change %} + <li class="nav-item"> + <a class="nav-link" id="{{window_id}}-datations-tab" + data-toggle="tab" href="#{{window_id}}-datations" role="tab" + aria-controls="{{window_id}}-datations" aria-selected="false"> + {% trans "Periods / Datings" %} + </a> + </li> + {% endif %} <li class="nav-item"> <a class="nav-link" id="{{window_id}}-warehouse-tab" data-toggle="tab" href="#{{window_id}}-warehouse" role="tab" @@ -139,6 +150,7 @@ {% field_flex_full "Decoration" item.decoration "<pre>" "</pre>" %} {% field_flex_full "Inscription" item.inscription "<pre>" "</pre>" %} {% field_flex "Manufacturing place" item.manufacturing_place %} + {% field_flex_multiple_obj "Cultural attributions" item 'cultural_attributions' %} {% field_flex_multiple_obj "Communicability" item 'communicabilities' %} {% field_flex_full _("General comment") item.comment "<pre>" "</pre>" %} </div> @@ -200,54 +212,6 @@ </div> {% endif %} - {% with dating_list=item|m2m_listing:"datings" %} - {% if dating_list or item.dating_comment or item.cultural_attributions_count %} - <h3>{% trans "Dating" %}</h3> - {% if item.cultural_attributions_count %} - <div class='row'> - {% field_flex_multiple_obj "Cultural attributions" item 'cultural_attributions' %} - </div> - {% endif %} - {% if dating_list %} - <table id='{{window_id}}-datings' class="table table-striped"> - <tr> - <th>{% trans "Chronological period" %}</th> - <th>{% trans "Start date" %}</th> - <th>{% trans "End date" %}</th> - <th>{% trans "Dating type" %}</th> - <th>{% trans "Quality" %}</th> - <th>{% trans "Precise on this dating" %}</th> - </tr> - {% for dating in dating_list %} - <tr> - <td> - {{dating.period}} - </td> - <td> - {{dating.start_date|default_if_none:"-"}} - </td> - <td> - {{dating.end_date|default_if_none:"-"}} - </td> - <td> - {{dating.dating_type|default_if_none:"-"}} - </td> - <td> - {{dating.quality|default_if_none:"-"}} - </td> - <td> - {{dating.precise_dating|default_if_none:"-"}} - </td> - </tr> - {% endfor %} - </table> - {% endif %} - <div class='row'> - {% field_flex_full "Comment on dating" item.dating_comment "<pre>" "</pre>" %} - </div> - {% endif %} - {% endwith %} - {% if not is_external %} {% if item.history_creator or item.last_edition_date or item.created %} <h3>{% trans "Sheet" %}</h3> @@ -309,6 +273,28 @@ </div> </div> + {% if display_datations or can_change %} + <div class="tab-pane fade" id="{{window_id}}-datations" + role="tabpanel" aria-labelledby="{{window_id}}-datations-tab"> + <h3>{% trans "Periods / Datings" %}</h3> + {% field_flex_multiple_obj _("Periods") item 'periods' %} + {% with url_dating="find-dating" %} + {% include "ishtar/blocks/sheet_dating_list.html" %} + {% endwith %} + {% if item.cultural_attributions_count or item.taq or item.taq_estimated or item.tpq or item.tpq_estimated or datings_comment %} + <h3>{% trans "Dating complements" %}</h3> + <div class='row'> + {% field_flex_multiple_obj "Cultural attributions" item 'cultural_attributions' %} + {% field_flex "TAQ" item.taq %} + {% field_flex "Estimated TAQ" item.taq_estimated %} + {% field_flex "TPQ" item.tpq %} + {% field_flex "Estimated TPQ" item.tpq_estimated %} + {% field_flex_full "Comment on datings" item.datings_comment "<pre>" "</pre>" has_image %} + </div> + {% endif %} + </div> + {% endif %} + {% include "ishtar/sheet_find_treatments.html" %} {% if display_documents %} @@ -346,7 +332,7 @@ {% endif %} </div> -{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %} +{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %} <script type='text/javascript'> $( "#{{window_id}}-tabs" ).on( "tabsactivate", function( event, ui ) { diff --git a/ishtar_common/templates/ishtar/blocks/sheet_dating_list.html b/ishtar_common/templates/ishtar/blocks/sheet_dating_list.html index 468da6bf6..73cb6f1a7 100644 --- a/ishtar_common/templates/ishtar/blocks/sheet_dating_list.html +++ b/ishtar_common/templates/ishtar/blocks/sheet_dating_list.html @@ -49,7 +49,7 @@ {% endif %} </tr> {% empty %}<tr> - <td colspan='9'>{% trans "No datation attached." %}</td> + <td colspan='9'><em>{% trans "No datation attached." %}</em></td> </tr>{% endfor %} </table> {% if can_change %}<div class="text-center mb-2"> diff --git a/ishtar_common/templates/ishtar/blocks/sheet_json.html b/ishtar_common/templates/ishtar/blocks/sheet_json.html index 35b681d8e..cbfc8813a 100644 --- a/ishtar_common/templates/ishtar/blocks/sheet_json.html +++ b/ishtar_common/templates/ishtar/blocks/sheet_json.html @@ -6,6 +6,12 @@ {% field_flex label value %} {% if forloop.last %}</div>{% endif %} {% empty %} -{% trans "No data" %} +<div class='row'> + <div class="col-12"><em>{% trans "No data" %}</em></div> +</div> {% endfor %} +{% empty %} +<div class='row'> + <div class="col-12"><em>{% trans "No data" %}</em></div> +</div> {% endfor %} |
