diff options
Diffstat (limited to 'archaeological_files')
-rw-r--r-- | archaeological_files/templates/ishtar/sheet_file.html | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/archaeological_files/templates/ishtar/sheet_file.html b/archaeological_files/templates/ishtar/sheet_file.html index 989c2cdfd..58a8e5a78 100644 --- a/archaeological_files/templates/ishtar/sheet_file.html +++ b/archaeological_files/templates/ishtar/sheet_file.html @@ -1,5 +1,5 @@ {% extends "ishtar/sheet.html" %} -{% load i18n window_ope_tables window_field window_header %} +{% load i18n ishtar_helpers window_ope_tables window_field window_header window_tables %} {% block head_title %}<strong>{% trans "Archaeological file" %}</strong> - {{item.full_internal_ref|default:''}}{% endblock %} @@ -13,18 +13,21 @@ {% endblock %} {% block content %} +{% with can_view_documents=permission_view_own_document|or_:permission_view_document %} +{% with has_documents=item.documents.count %} +{% with display_documents=can_view_documents|and_:has_documents %} <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"> {% include "ishtar/blocks/window_image.html" %} <div class="card-body"> - <p class="card-text"> + <div class="card-text"> <p class='window-refs'>{{item.full_internal_ref|default:''}}</p> <p class='window-refs'>{{item.internal_reference|default:''}}</p> <p class='window-refs'>{{item.name|default:''}}</p> {% include "ishtar/blocks/sheet_external_id.html" %} - </p> + </div> </div> </div> </div> @@ -206,4 +209,14 @@ </table> {% endif %} + +{% trans "Document for this archaeological file" as fle_docs %} +{% if permission_view_own_document or permission_view_document %} +{% if item.documents.count %} +{% dynamic_table_document fle_docs 'documents' 'files' item.pk '' output %} +{% endif %} +{% endif %} + + +{% endwith %} {% endwith %} {% endwith %} {% endblock %} |