From 781d7824ca939d3794d3ab098ea8a2311fc2c643 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Sun, 21 Jan 2018 21:05:28 +0100 Subject: Arcaheological file: adapt forms, models and sheet --- .../templates/ishtar/blocks/window_file_nav.html | 9 +- .../templates/ishtar/sheet_file.html | 195 +++++++++++++-------- 2 files changed, 122 insertions(+), 82 deletions(-) (limited to 'archaeological_files/templates') diff --git a/archaeological_files/templates/ishtar/blocks/window_file_nav.html b/archaeological_files/templates/ishtar/blocks/window_file_nav.html index f8b6ddb8a..d464c4af2 100644 --- a/archaeological_files/templates/ishtar/blocks/window_file_nav.html +++ b/archaeological_files/templates/ishtar/blocks/window_file_nav.html @@ -1,11 +1,8 @@ {% extends "ishtar/blocks/window_nav.html" %} {% load i18n %} {% block extra_actions %} - - - - - -
{%trans "Add an operation for this file" %} +
+ {% trans "operation" %} {% endblock %} diff --git a/archaeological_files/templates/ishtar/sheet_file.html b/archaeological_files/templates/ishtar/sheet_file.html index 6eda1124a..20684baf9 100644 --- a/archaeological_files/templates/ishtar/sheet_file.html +++ b/archaeological_files/templates/ishtar/sheet_file.html @@ -1,102 +1,153 @@ {% extends "ishtar/sheet.html" %} {% load i18n window_ope_tables window_field window_header %} -{% block head_title %}{% trans "Archaeological file" %}{% endblock %} - -{% block content %} +{% block head_title %}{% trans "Archaeological file" %} - {{item.full_internal_ref|default:''}}{% endblock %} +{% block toolbar %} {% if can_add_operation %} {% window_file_nav item window_id previous next %} {% else %} {% window_nav item window_id 'show-file' 'file_modify' 'show-historized-file' 'revert-file' previous next 1 %} {% endif %} -

{{item.full_internal_ref|default:''}}

-

{{item.internal_reference|default:''}}

-

{{item.name|default:''}}

-{% include "ishtar/blocks/sheet_external_id.html" %} +{% endblock %} + +{% block content %} + +
+
+
+ {% if item.image %} + + {% endif%} +
+

+

{{item.full_internal_ref|default:''}}

+

{{item.internal_reference|default:''}}

+

{{item.name|default:''}}

+ {% include "ishtar/blocks/sheet_external_id.html" %} +

+
+
+
+
+

{% trans "General"%}

- -{% field "Comment" item.comment "
" "
" %} - -{% include "ishtar/blocks/sheet_json.html" %} + {% field_flex_detail "In charge" item.in_charge %} +
+
{%trans "State"%}
+
+ {% if item.is_active %}{%trans "Active file"%}{% else %}{%trans "Closed file"%}{% endif %} +
+
+ {% if item.closing %} +
+
{%trans "Closing date"%}
+
+ {{ item.closing.date }} {%trans "by" %} {{ item.closing.user.full_label }} +
+
+ {% endif %} + {% field_flex "Type" item.file_type %} + {% field_flex_detail "Related file" item.related_file %} + {% field_flex_full "Comment" item.comment "
" "
" %} + {% include "ishtar/blocks/sheet_json.html" %} +

{% trans "Localisation"%}

-{% if item.towns.count %}

{{ item.towns.all|join:", " }}

{% endif %} -{% if item.departments.count %}

{{ item.departments.all|join:", " }}

{% endif %} -{% if item.address %} -

{{ item.address }}

-{% if item.address_complement %}

{{ item.address_complement }}

{%endif%} -{% if item.postal_code %}

{{ item.postal_code }}

{%endif%} -{% endif %} -{% if item.total_surface %}

{{ item.total_surface }} m2 ({{ item.total_surface_ha }} ha)

{%endif%} - +
+ {% field_flex_multiple "Towns" item.towns %} + {% field_flex_multiple "Departments" item.departments %} + {% field_flex "Main address" item.address %} + {% field_flex "Complement" item.address_complement %} + {% field_flex "Postal code" item.postal_code %} + {% if item.total_surface %} +
+
{%trans "Surface"%}
+
+ {{ item.total_surface }} m2 ({{ item.total_surface_ha }} ha) +
+
+ {% endif %} +
{% if item.is_preventive %}

{% trans "Preventive archaeological file"%}

- -{% else %} + {% if item.mh_register != None %} + {% field_flex "Sur Monument Historique classé" item.mh_register|yesno %} + {% endif %} -

{% trans "Research archaeology"%}

-{% if item.departments.count %}

{% for department in item.departments.all %}{% if forloop.counter0 %}, {% endif %}{{ department }}{% endfor %}

{% endif %} -{% if item.scientist %}

{{ item.scientist }}

{% endif %} -{% if item.requested_operation_type %}

{{ item.requested_operation_type }}

{% endif %} -{% if item.organization %}

{{ item.organization }}

{% endif %} -{% if item.cira_advised != None %}

{{ item.cira_advised|yesno }}

{% endif %} -{% if item.mh_register != None %}

{{ item.mh_register|yesno }}

{% endif %} -{% if item.mh_listing != None %}

{{ item.mh_listing|yesno }}

{% endif %} -{% if item.classified_area != None %}

{{ item.classified_area|yesno }}

{% endif %} -{% if item.protected_area != None %}

{{ item.protected_area|yesno }}

{% endif %} -{% if item.research_comment %}

{{ item.research_comment }}

{% endif %} + {% if item.mh_listing != None %} + {% field_flex "Sur Monument Historique inscrit" item.mh_listing|yesno %} + {% endif %} + + {% if item.classified_area != None %} + {% field_flex "Classified area" item.classified_area|yesno %} + {% endif %} + + {% if item.protected_area != None %} + {% field_flex "Protected area" item.protected_area|yesno %} + {% endif %} + + {% field_flex_full "Comment" item.research_comment "
" "
" %} + {% endif %} @@ -109,9 +160,7 @@ {% table_administrativact administrativeacts_label item.administrative_act.all %}

{%trans "Associated operations"%}

-
-
- +
@@ -136,13 +185,9 @@ {% endfor %}
{% trans "Ref." %} Code Patriarche
{% trans "No operation associated to this archaeological file" %}
-
-

{%trans "Admninistrative acts linked to associated operations"%}

-
-
- +
@@ -160,8 +205,6 @@ {% endfor %}
{% trans "Year" %} {% trans "Ref." %}
{% trans "No administrative act linked to operations" %}
-
-
{% endif %} {% endblock %} -- cgit v1.2.3