From a498cd10ac20770c020bce05f15e320a0cae9c96 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Fri, 24 Nov 2017 23:13:11 +0100 Subject: UI: work on sheets --- .../blocks/window_tables/administrativacts.html | 10 +- .../blocks/window_tables/archaeologicalsites.html | 41 +++-- .../ishtar/blocks/window_tables/parcels.html | 23 +-- .../templates/ishtar/sheet_operation.html | 192 ++++++++++++--------- 4 files changed, 152 insertions(+), 114 deletions(-) (limited to 'archaeological_operations') diff --git a/archaeological_operations/templates/ishtar/blocks/window_tables/administrativacts.html b/archaeological_operations/templates/ishtar/blocks/window_tables/administrativacts.html index 4c41ed89e..6b651092b 100644 --- a/archaeological_operations/templates/ishtar/blocks/window_tables/administrativacts.html +++ b/archaeological_operations/templates/ishtar/blocks/window_tables/administrativacts.html @@ -1,14 +1,15 @@ {% load i18n %}

{{caption}}

-
-
- +
+ + + {% for act in data %} @@ -19,6 +20,5 @@ {% empty %} {% endfor %} +
{% trans "Ref." %} {% trans "Type" %} {% trans "Date" %} {% trans "Object" %}
{{act.full_ref}}
{% trans "No administrative act associated" %}
-
-
diff --git a/archaeological_operations/templates/ishtar/blocks/window_tables/archaeologicalsites.html b/archaeological_operations/templates/ishtar/blocks/window_tables/archaeologicalsites.html index d570b9db2..26b1915da 100644 --- a/archaeological_operations/templates/ishtar/blocks/window_tables/archaeologicalsites.html +++ b/archaeological_operations/templates/ishtar/blocks/window_tables/archaeologicalsites.html @@ -1,24 +1,23 @@ {% load i18n %}

{{caption}}

-
-
- - - - - - - - {% for archaeosite in data %} - - - - - - - {% empty %} - - {% endfor %} +
{% trans "Ref." %}{% trans "Name" %}{% trans "Periods" %}{% trans "Remains" %}
{{archaeosite.reference}}{{archaeosite.name}}{% for period in archaeosite.periods.all %}{{period}}{% include "blocks/comma_list.html" %}{% endfor %}{% for remain in archaeosite.remains.all %}{{remain}}{% include "blocks/comma_list.html" %}{% endfor %}
{% trans "No archaeological site associated" %}
+ + + + + + + + + {% for archaeosite in data %} + + + + + + + {% empty %} + + {% endfor %} +
{% trans "Ref." %}{% trans "Name" %}{% trans "Periods" %}{% trans "Remains" %}
{{archaeosite.reference}}{{archaeosite.name}}{% for period in archaeosite.periods.all %}{{period}}{% include "blocks/comma_list.html" %}{% endfor %}{% for remain in archaeosite.remains.all %}{{remain}}{% include "blocks/comma_list.html" %}{% endfor %}
{% trans "No archaeological site associated" %}
-
-
diff --git a/archaeological_operations/templates/ishtar/blocks/window_tables/parcels.html b/archaeological_operations/templates/ishtar/blocks/window_tables/parcels.html index 37be138b1..c52e5cd76 100644 --- a/archaeological_operations/templates/ishtar/blocks/window_tables/parcels.html +++ b/archaeological_operations/templates/ishtar/blocks/window_tables/parcels.html @@ -1,15 +1,16 @@ {% load i18n %}

{{ parcels_label }}

-
-
- - - - - - - {##} - +
{% trans "Town" %}{% trans "Year" %}{% trans "Section" %}{% trans "Parcels" %}{% trans "Owner" %}
+ + + + + + + {##} + + + {% for parcel in item.grouped_parcels %} @@ -21,5 +22,5 @@ {% empty %} {% endfor %} +
{% trans "Town" %}{% trans "Year" %}{% trans "Section" %}{% trans "Parcels" %}{% trans "Owner" %}
{{parcel.town}}
{% trans "No parcel" %}
-
diff --git a/archaeological_operations/templates/ishtar/sheet_operation.html b/archaeological_operations/templates/ishtar/sheet_operation.html index 934a3ee19..8fbac5aa1 100644 --- a/archaeological_operations/templates/ishtar/sheet_operation.html +++ b/archaeological_operations/templates/ishtar/sheet_operation.html @@ -10,7 +10,7 @@ {% block content %}
-
+
{% if item.image %} @@ -35,90 +35,128 @@
-

{% trans "General"%}

- - {% field_li "Old code" item.old_code %} - {% include "ishtar/blocks/sheet_creation_section.html" %} - {% trans "Begining date" as begining_date_label %} - {% field_li begining_date_label item.start_date %} - {% field_li "Excavation end date" item.excavation_end_date|default:"-" %} - {% field_li_detail "Head scientist" item.scientist %} - {% field_li_detail "In charge" item.in_charge %} - {% field_li_multiple "Collaborators" item.collaborators %} - {% field_li_detail "Operator" item.operator %} -
  • {% if item.is_active %}{%trans "Active file"%}

    - {% else %}{%trans "Closed operation"%}
  • {% endif %} - {% if item.closing.date %}
  • {{ item.closing.date }} {%trans "by" %} {{ item.closing.user }}
  • {% endif %} - {% field_li "Type" item.operation_type %} - {% if item.surface %}
  • {{ item.surface }} m2 ({{ item.surface_ha }} ha)
  • {% endif %} - {% if item.cost %}
  • {{ item.cost }} €{% if item.cost_by_m2 %}, ({{ item.cost_by_m2 }} €/m2){%endif%}
  • {%endif%} - {% if item.duration %}
  • {{ item.duration }} {%trans "Day"%}s
  • {%endif%} - {% field_li_multiple "Remains" item.remains %} - {% field_li_multiple "Periods" item.periods %} - {% if item.QUALITY_DICT %}{% field_li "Record quality" item.record_quality|from_dict:item.QUALITY_DICT %}{% endif %} - {% if item.history_object and item.history_object.QUALITY_DICT %}{% field_li "Record quality" item.record_quality|from_dict:item.history_object.QUALITY_DICT %}{% endif %} - {% field_li "Report delivery date" item.report_delivery_date %} - {% field_li "Report processing" item.report_processing %} - {% field_li "Deadline for submission of the documentation" item.documentation_deadline %} - {% field_li "Documentation received" item.documentation_received %} - {% field_li "Deadline for submission of the finds" item.finds_deadline %} - {% field_li "Finds received" item.finds_received %} - {% field_li_detail "Associated file" item.associated_file %} - {% field_li "Responsible for planning service" item.associated_file.responsible_town_planning_service.full_address %} - {% if item.associated_file.town_planning_service %} - {% field_li "Planning service organization" item.associated_file.town_planning_service.full_address %} - {% else %} - {% field_li "Planning service organization" item.associated_file.responsible_town_planning_service.attached_to.full_address %} - {% endif %} - {% field_li "Permit type" item.associated_file.permit_type %} - {% field_li "Permit reference" item.associated_file.permit_reference %} - {% field_li "General contractor" item.associated_file.general_contractor.full_address %} - {% if item.associated_file.corporation_general_contractor %} - {% field_li "General contractor organization" item.associated_file.corporation_general_contractor.full_address %} - {% else%} - {% field_li "General contractor organization" item.associated_file.general_contractor.attached_to.full_address %} - {% endif %} - - {% field "Comment" item.comment "
    " "
    " %} - {% field "Abstract" item.abstract "
    " "
    " %} - {% field "Comment about scientific documentation" item.scientific_documentation_comment "
    " "
    " %} - - {% include "ishtar/blocks/sheet_json.html" %} -

    -
    +

    {% trans "General"%}

    +
    + {% field_flex "Old code" item.old_code %} + {% include "ishtar/blocks/sheet_creation_section.html" %} + {% trans "Begining date" as begining_date_label %} + {% field_flex begining_date_label item.start_date|date:"DATE_FORMAT" %} + {% field_flex "Excavation end date" item.excavation_end_date|date:"DATE_FORMAT"|default:"-" %} + {% field_flex_detail "Head scientist" item.scientist %} + {% field_flex_detail "In charge" item.in_charge %} + {% field_flex_multiple "Collaborators" item.collaborators %} + {% field_flex_detail "Operator" item.operator %} +
    +
    {%trans "State"%}
    +
    + {% if item.is_active %}{%trans "Active file"%} + {% else %}{%trans "Closed operation"%}{% endif %} +
    +
    + {% if item.closing.date %} +
    +
    {%trans "Closing date"%}
    +
    + {{ item.closing.date }} {%trans "by" %} {{ item.closing.user }} +
    +
    + {% endif %} + {% field_flex "Type" item.operation_type %} + {% if item.surface %} +
    +
    {%trans "Surface"%}
    +
    + {{ item.surface }} m2 ({{ item.surface_ha }} ha) +
    +
    + {% endif %} + {% if item.cost %} +
    +
    {%trans "Cost" %}
    +
    + {{ item.cost }} €{% if item.cost_by_m2 %}, ({{ item.cost_by_m2 }} €/m2){%endif%} +
    +
    + {%endif%} + {% if item.duration %} +
    +
    {%trans "Duration"%}
    +
    + {{ item.duration }} {% trans "days" %} +
    +
    + {%endif%} + {% field_flex_multiple "Remains" item.remains %} + {% field_flex_multiple "Periods" item.periods %} + {% if item.QUALITY_DICT %}{% field_flex "Record quality" item.record_quality|from_dict:item.QUALITY_DICT %}{% endif %} + {% if item.history_object and item.history_object.QUALITY_DICT %}{% field_flex "Record quality" item.record_quality|from_dict:item.history_object.QUALITY_DICT %}{% endif %} + {% field_flex "Report delivery date" item.report_delivery_date %} + {% field_flex "Report processing" item.report_processing %} + {% field_flex "Deadline for submission of the documentation" item.documentation_deadline %} + {% field_flex "Documentation received" item.documentation_received %} + {% field_flex "Deadline for submission of the finds" item.finds_deadline %} + {% field_flex "Finds received" item.finds_received %} + {% field_flex_detail "Associated file" item.associated_file %} + {% field_flex "Responsible for planning service" item.associated_file.responsible_town_planning_service.full_address %} + {% if item.associated_file.town_planning_service %} + {% field_flex "Planning service organization" item.associated_file.town_planning_service.full_address %} + {% else %} + {% field_flex "Planning service organization" item.associated_file.responsible_town_planning_service.attached_to.full_address %} + {% endif %} + {% field_flex "Permit type" item.associated_file.permit_type %} + {% field_flex "Permit reference" item.associated_file.permit_reference %} + {% field_flex "General contractor" item.associated_file.general_contractor.full_address %} + {% if item.associated_file.corporation_general_contractor %} + {% field_flex "General contractor organization" item.associated_file.corporation_general_contractor.full_address %} + {% else%} + {% field_flex "General contractor organization" item.associated_file.general_contractor.attached_to.full_address %} + {% endif %} +
    +
    + {% field_flex_full "Comment" item.comment "
    " "
    " %} + {% field_flex_full "Abstract" item.abstract "
    " "
    " %} + {% field_flex_full "Comment about scientific documentation" item.scientific_documentation_comment "
    " "
    " %} + {% include "ishtar/blocks/sheet_json.html" %} +
    {% if item.virtual_operation %} -

    {% trans "This operation is virtual." %}

    + {% endif %} {% if not item.code_patriarche %} -

    {%trans "Patriarche OA code not yet recorded!"%}

    + {% endif %} - -{% endif %} -

    {{rel.relation_type}}

    {% endif %} +

    {{rel.relation_type}}

    +
    {% endifchanged %} +
    + + + {{rel.right_record}} +
    +{% if forloop.last %} +
    {% endif %} {% endfor %} {% endif %} @@ -175,18 +213,18 @@

    {% trans "Administrative acts" %}

    {% trans "Parcels" %}

    {% trans "Context records" %}