summaryrefslogtreecommitdiff
path: root/archaeological_operations/templates/ishtar/sheet_administrativeact.html
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2020-12-04 16:12:23 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2021-02-28 12:15:22 +0100
commit78b76b596213369146488cb9964ae877502c5aab (patch)
tree9367c07079dc213b09d6dff6719fe3bb49aa3e67 /archaeological_operations/templates/ishtar/sheet_administrativeact.html
parentd4d22c491fd57a383e9cb3a03686d27f7e9d13ee (diff)
downloadIshtar-78b76b596213369146488cb9964ae877502c5aab.tar.bz2
Ishtar-78b76b596213369146488cb9964ae877502c5aab.zip
Add documents to administrative acts (refs #4999)
Diffstat (limited to 'archaeological_operations/templates/ishtar/sheet_administrativeact.html')
-rw-r--r--archaeological_operations/templates/ishtar/sheet_administrativeact.html83
1 files changed, 54 insertions, 29 deletions
diff --git a/archaeological_operations/templates/ishtar/sheet_administrativeact.html b/archaeological_operations/templates/ishtar/sheet_administrativeact.html
index f0026807c..843d5fc8d 100644
--- a/archaeological_operations/templates/ishtar/sheet_administrativeact.html
+++ b/archaeological_operations/templates/ishtar/sheet_administrativeact.html
@@ -1,5 +1,5 @@
{% extends "ishtar/sheet.html" %}
-{% load i18n window_header window_field %}
+{% load i18n window_header window_field window_tables link_to_window %}
{% block head_title %}<strong>{% trans "Administrative act" %}</strong> - {{item.full_ref}}{% endblock %}
@@ -20,37 +20,62 @@
{% block content %}
-<h3>{% trans "General"%}</h3>
-<div class="row">
- {% field_flex "Year" item.year %}
- {% field_flex "Index" item.index %}
- {% field_flex "Internal reference" item.ref_sra %}
- {% field_flex "Type" item.act_type %}
- {% field_flex "Object" item.act_object %}
- {% field_flex_detail "Signatory" item.signatory %}
- {% field_flex "Signature date" item.signature_date %}
- {% field_flex "In charge" item.in_charge %}
- {% field_flex "Archaeological preventive operator" item.operator %}
- {% field_flex_detail "Associated file" item.associated_file %}
- {% field_flex_detail "Operation" item.operation %}
- {% field_flex_detail "Treatment" item.treatment %}
- {% field_flex_detail "Treatment request" item.treatment_file %}
-
- {% if item.operation and item.operation.surface %}
- <div class="col-12 col-md-6 col-lg-4 d-flex flex-wrap row">
- <dt class="col-5">{% trans "Surface"%}</dt>
- <dd class='col-7'>
- {{ item.operation.surface }} m<sup>2</sup> ({{ item.operation.surface_ha }} ha)
- </dd>
+{% with pdf_attached=item.pdf_attached %}
+{% if pdf_attached %}
+<p class="text-center col-12 p-2">
+ <a href="{{pdf_attached}}" target="_blank">
+ {% trans "View PDF" %}
+ <i class="fa fa-external-link" aria-hidden="true"></i>
+ </a>
+</p>
+{% endif %}
+{% endwith %}
+
+<div class="clearfix">
+ {% if item.images.count %}
+ <div class="card float-left col-12 col-md-6 col-lg-4">
+ {% include "ishtar/blocks/window_image.html" %}
</div>
{% endif %}
- {% field_flex_detail "Created by" item.history_creator.ishtaruser.person %}
+ <h3>{% trans "General"%}</h3>
+ <div class="row">
+ {% field_flex "Year" item.year %}
+ {% field_flex "Index" item.index %}
+ {% field_flex "Internal reference" item.ref_sra %}
+ {% field_flex "Type" item.act_type %}
+ {% field_flex "Object" item.act_object %}
+ {% field_flex_detail "Signatory" item.signatory %}
+ {% field_flex "Signature date" item.signature_date %}
+ {% field_flex "In charge" item.in_charge %}
+ {% field_flex "Archaeological preventive operator" item.operator %}
+ {% field_flex_detail "Associated file" item.associated_file %}
+ {% field_flex_detail "Operation" item.operation %}
+ {% field_flex_detail "Treatment" item.treatment %}
+ {% field_flex_detail "Treatment request" item.treatment_file %}
+
+ {% if item.operation and item.operation.surface %}
+ <div class="col-12 col-md-6 col-lg-4 d-flex flex-wrap row">
+ <dt class="col-5">{% trans "Surface"%}</dt>
+ <dd class='col-7'>
+ {{ item.operation.surface }} m<sup>2</sup> ({{ item.operation.surface_ha }} ha)
+ </dd>
+ </div>
+ {% endif %}
+ {% field_flex_detail "Created by" item.history_creator.ishtaruser.person %}
- {% comment %}{% if item.general_contractor.attached_to %}<p>
- <label>{% trans "General contractor organisation"%}</label>
- <span class='value'>{{ item.general_contractor.attached_to }}</span></p>{% endif %} <!-- Contractor's organisation displayed as concat of Name/Adress/postal_code/city -->
- {% if item.general_contractor %}<p><label>{%trans "General contractor"%}</label> <span class='value'>{{ item.general_contractor.full_label }}</span></p>{% endif %}
- {% endcomment %}
+ {% comment %}{% if item.general_contractor.attached_to %}<p>
+ <label>{% trans "General contractor organisation"%}</label>
+ <span class='value'>{{ item.general_contractor.attached_to }}</span></p>{% endif %} <!-- Contractor's organisation displayed as concat of Name/Adress/postal_code/city -->
+ {% if item.general_contractor %}<p><label>{%trans "General contractor"%}</label> <span class='value'>{{ item.general_contractor.full_label }}</span></p>{% endif %}
+ {% endcomment %}
+ </div>
</div>
+ {% if item.documents.count %}
+ <div class="row spacer">
+ <div class="col-12">
+ {% dynamic_table_document 'Documents' 'documents' 'administrativeacts' item.pk '' output %}
+ </div>
+ </div>
+ {% endif %}
{% endblock %}