diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2022-11-09 13:37:16 +0100 | 
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2022-12-12 12:23:19 +0100 | 
| commit | 3ca500ee0c72869fa3e235c4e97a0a02d33c00ab (patch) | |
| tree | 9af3183e25986575bb8e24881af5893ae00c6907 | |
| parent | 4cfc9ec3f5992faab860e3933a5d76bd9ac30dbe (diff) | |
| download | Ishtar-3ca500ee0c72869fa3e235c4e97a0a02d33c00ab.tar.bz2 Ishtar-3ca500ee0c72869fa3e235c4e97a0a02d33c00ab.zip | |
Sheet find: always display period tab
| -rw-r--r-- | archaeological_finds/templates/ishtar/sheet_find.html | 22 | 
1 files changed, 12 insertions, 10 deletions
| diff --git a/archaeological_finds/templates/ishtar/sheet_find.html b/archaeological_finds/templates/ishtar/sheet_find.html index b13ff5c96..1ccfbad8e 100644 --- a/archaeological_finds/templates/ishtar/sheet_find.html +++ b/archaeological_finds/templates/ishtar/sheet_find.html @@ -26,7 +26,6 @@  {% with non_modif_treatments_count=item.non_modif_treatments_count %}  {% with associated_treatment_files_count=item.associated_treatment_files_count %} -{% with display_datings=item.integrities.count|or_:item.remarkabilities.count|or_:item.conservatory_state|or_:item.conservatory_comment|or_:item.alterations.count|or_:item.alteration_causes.count|or_:item.preservation_to_considers.count|or_:item.appraisal_date|or_:item.treatment_emergency|or_:item.insurance_value|or_:item.estimated_value|or_:item.m2m_listing_datings|or_:item.dating_comment|or_:item.cultural_attributions.count %}  {% 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 display_documents=can_view_documents|and_:item.documents_count %} @@ -48,7 +47,6 @@              {% trans "Identification / Description / Dimensions" %}          </a>      </li> -    {% if display_datings %}      <li class="nav-item">          <a class="nav-link" id="{{window_id}}-preservation-tab"             data-toggle="tab" href="#{{window_id}}-preservation" role="tab" @@ -56,7 +54,6 @@              {% trans "Datings / Preservation" %}          </a>      </li> -    {% endif %}      {% if display_warehouse_treatments %}      <li class="nav-item">          <a class="nav-link" id="{{window_id}}-warehouse-tab" @@ -224,9 +221,9 @@            {% include "ishtar/blocks/sheet_creation_section.html" %}        </div>    </div> -  {% if display_datings %}    <div class="tab-pane fade" id="{{window_id}}-preservation"         role="tabpanel" aria-labelledby="{{window_id}}-preservation-tab"> +      {% with dating_list=item|m2m_listing:"datings" %}        {% if item.integrities_count or item.remarkabilities_count or item.conservatory_state or item.conservatory_comment or item.alterations.count or item.alteration_causes.count or item.preservation_to_considers.count or item.appraisal_date or item.treatment_emergency or item.insurance_value or item.estimated_value %}        <h3>{% trans "Preservation" %}</h3>        <div class='row'> @@ -242,9 +239,12 @@            {% field_flex "Appraisal date" item.appraisal_date %}            {% field_flex_full "Conservatory comment" item.conservatory_comment "<pre>" "</pre>" %}        </div> +      {% elif not dating_list and not item.dating_comment and not item.cultural_attributions_count %} +      <div class="alert alert-info" role="alert"> +          {% trans "No datation or preservation info." %} +      </div>        {% endif %} - -      {% if item.m2m_listing_datings or item.dating_comment or item.cultural_attributions_count %} +      {% if dating_list or item.dating_comment or item.cultural_attributions_count %}        <h3>{% trans "Dating" %}</h3>        {% if item.cultural_attributions_count %}        <div class='row'> @@ -260,7 +260,7 @@                <th>{% trans "Quality" %}</th>                <th>{% trans "Precise dating" %}</th>            </tr> -          {% for dating in item.m2m_listing_datings %} +          {% for dating in dating_list %}            <tr>                <td>                    {{dating.period}} @@ -283,10 +283,12 @@            </tr>            {% endfor %}        </table> -      {% field_flex_full "Comment on dating" item.dating_comment "<pre>" "</pre>" %} +      <div class='row'> +          {% field_flex_full "Comment on dating" item.dating_comment "<pre>" "</pre>" %} +      </div>        {% endif %} +      {% endwith %}    </div> -  {% endif %}    {% if display_warehouse_treatments %}    <div class="tab-pane fade" id="{{window_id}}-warehouse"         role="tabpanel" aria-labelledby="{{window_id}}-warehouse-tab"> @@ -558,7 +560,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 %}  {% endblock %} | 
