From 3f038c77f4017a1ef7c1fbed8f5dc5daef2371c7 Mon Sep 17 00:00:00 2001
From: Étienne Loks
Date: Thu, 4 Apr 2013 18:12:56 +0200
Subject: Rename and move sheets templates
---
.../templates/ishtar/sheet_contextrecord.html | 135 +++++++++++++++
.../ishtar/sheet_contextrecord_window.html | 3 +
.../templates/ishtar/sheet_file.html | 132 +++++++++++++++
.../templates/ishtar/sheet_file_pdf.html | 18 ++
.../templates/ishtar/sheet_file_window.html | 3 +
.../templates/ishtar/sheet_operation.html | 183 +++++++++++++++++++++
.../templates/ishtar/sheet_operation_pdf.html | 18 ++
.../templates/ishtar/sheet_operation_window.html | 3 +
ishtar_common/templates/ishtar/sheet.html | 30 ++++
ishtar_common/templates/sheet.html | 30 ----
ishtar_common/templates/sheet_contextrecord.html | 135 ---------------
.../templates/sheet_contextrecord_window.html | 3 -
ishtar_common/templates/sheet_file.html | 132 ---------------
ishtar_common/templates/sheet_file_pdf.html | 18 --
ishtar_common/templates/sheet_file_window.html | 3 -
ishtar_common/templates/sheet_operation.html | 183 ---------------------
ishtar_common/templates/sheet_operation_pdf.html | 18 --
.../templates/sheet_operation_window.html | 3 -
ishtar_common/views.py | 8 +-
19 files changed, 529 insertions(+), 529 deletions(-)
create mode 100644 archaeological_context_records/templates/ishtar/sheet_contextrecord.html
create mode 100644 archaeological_context_records/templates/ishtar/sheet_contextrecord_window.html
create mode 100644 archaeological_files/templates/ishtar/sheet_file.html
create mode 100644 archaeological_files/templates/ishtar/sheet_file_pdf.html
create mode 100644 archaeological_files/templates/ishtar/sheet_file_window.html
create mode 100644 archaeological_operations/templates/ishtar/sheet_operation.html
create mode 100644 archaeological_operations/templates/ishtar/sheet_operation_pdf.html
create mode 100644 archaeological_operations/templates/ishtar/sheet_operation_window.html
create mode 100644 ishtar_common/templates/ishtar/sheet.html
delete mode 100644 ishtar_common/templates/sheet.html
delete mode 100644 ishtar_common/templates/sheet_contextrecord.html
delete mode 100644 ishtar_common/templates/sheet_contextrecord_window.html
delete mode 100644 ishtar_common/templates/sheet_file.html
delete mode 100644 ishtar_common/templates/sheet_file_pdf.html
delete mode 100644 ishtar_common/templates/sheet_file_window.html
delete mode 100644 ishtar_common/templates/sheet_operation.html
delete mode 100644 ishtar_common/templates/sheet_operation_pdf.html
delete mode 100644 ishtar_common/templates/sheet_operation_window.html
diff --git a/archaeological_context_records/templates/ishtar/sheet_contextrecord.html b/archaeological_context_records/templates/ishtar/sheet_contextrecord.html
new file mode 100644
index 000000000..d8e06f022
--- /dev/null
+++ b/archaeological_context_records/templates/ishtar/sheet_contextrecord.html
@@ -0,0 +1,135 @@
+{% extends "ishtar/sheet.html" %}
+{% load i18n %}
+{% block content %}
+
+
+{% trans "Context Record"%}
+
+{% if item.operation.code_patriarche %}
+{%trans "Complete ID:"%}
+{% else %}
+
{%trans "Patriarche OA code not yet recorded!"%}
+{%trans "Temporary ID:"%}
+{%endif%}
+{{item.full_label}}
+{%if item.unit %}
+{% trans "Type:" %} {{ item.unit }}
+{%endif%}
+{% trans "Chronology:" %} {{ item.datings.all|join:", " }}
+{% trans "Place:" %} {{ item.parcel.town }}
+{% trans "Parcel:" %} {{ item.parcel.short_label }}
+
+{% if item.description or item.lenght or item.width or item.depth %}
+{% trans "Description"%}
+
+{% trans "Description:" %} {{ item.description }}
+{% if item.lenght %}{% trans "Length (cm):" %} {{ item.length }}
{%endif%}
+{% if item.width %}{% trans "Width (cm):" %} {{ item.width }}
{%endif%}
+{% if item.depth %}{% trans "Depth (cm):" %} {{ item.depth }}
{%endif%}
+{% endif %}
+
+{% if item.activity or item.identification or item.interpretation %}
+{% trans "Interpretation"%}
+
+{% if item.activity %}{% trans "Activity:" %} {{ item.activity }}
{%endif%}
+{% if item.identification %}{% trans "Identification:" %} {{ item.identification }}
{%endif%}
+{% if item.interpretation %}{% trans "Interpretation:" %} {{ item.interpretation }}
{%endif%}
+{% endif %}
+
+{% if item.taq or item.taq_estimated or item.tpq or item.tpq_estimated %}
+{% trans "Datations"%}
+{% if item.taq %}{% trans "TAQ:" %} {{ item.taq }}
{%endif%}
+{% if item.taq_estimated %}{% trans "TAQ estimated:" %} {{ item.taq_estimated }}
{%endif%}
+{% if item.tpq %}{% trans "TPQ:" %} {{ item.tpq }}
{%endif%}
+{% if item.tpq_estimated %}{% trans "TPQ estimated:" %} {{ item.tpq_estimated }}
{%endif%}
+{%endif%}
+
+{% if item.operation %}
+{% trans "Operation resume"%}
+{%trans "Year:"%} {{ item.operation.year }}
+{%trans "Numerical reference:"%} {{ item.operation.operation_code }}
+{% if item.operation.code_patriarche %}
+{%trans "Patriarche OA code:"%}
+{{ item.operation.code_patriarche }}
+{% else %}{%trans "Patriarche OA code not yet recorded!"%}
+{%endif%}
+{#{%trans "Operation's name:"%} {{ item.operation.internal_reference }}
#}
+{%trans "Head scientist:"%}
+{{ item.operation.in_charge.full_label }}
+{%trans "State:"%}
+{% if item.operation.is_active %}
+{%trans "Active file"%}
+{% else %}
+{%trans "Closed operation"%}
+{%trans "Closing date:"%} {{ item.operation.closing.date }}
+{%trans "by" %} {{ item.operation.closing.user }}
+{% endif %}
+{%trans "Type:"%} {{ item.operation.operation_type }}
+{%trans "Remains:"%} {{ item.operation.remains.all|join:", " }}
+{%trans "Periods:"%} {{ item.operation.periods.all|join:", " }}
+{% if item.operation.comment %}{%trans "Comment:"%} {{ item.operation.comment }}
{%endif%}
+{% trans "Localisation"%}
+{%trans "Towns:"%} {{ item.operation.towns.all|join:", " }}
+{%trans "Related operation:"%}
+{{ item.operation }}
+{# TODO: Displayed as Year/index/Commune/Common_name This should be a link to the file sheet of the related operation #}
+{% else %}{%trans "No operation linked to this context unit!"%}
+{% endif %}
+
+
+ {%trans "Documents"%}
+
+ {% trans "Title" %}
+ {% trans "Type" %}
+ {% trans "Authors" %}
+ {#{% trans "Localisation" %} #}
+
+ {% for doc in item.source.all %}
+
+ {{ doc.title }}
+ {{doc.source_type}}
+ {{ doc.authors.all|join:", " }}
+ {#{{ doc.localisation }} #}
+
+ {% empty %}
+ {% trans "No document associated to this context record" %}
+ {% endfor %}
+
+
+
+ {%trans "Finds"%}
+
+ {% trans "Find" %}
+ {% trans "Material type" %}
+ {% trans "Context record" %}
+ {% trans "Periods" %}
+ {% trans "Description" %}
+ {% trans "Weight" %}
+ {% trans "Numbers" %}
+ {% trans "Parcel" %}
+
+
+ {% for find in item.base_finds.all %}
+
+ {{ find.full_label }}
+{# Displayed as (Patriarche operation code)-(Record unit label)-(Finds label). #}
+{# or displayed as (Year)-(index)-(Record unit label)-(Finds label). #}
+ {{ find.material_type_label }}
+{# Displayed as (Patriarche operation code)-(Record unit label)-(material code)-(Finds label indexed by material type). #}
+{# or displayed as (Year)-(index)-(Record unit label)-(material code)-(Finds label indexed by material type) #}
+
+ {{find.context_record}}
+ {{ find.get_last_find.dating}} {# TODO .all|join:", " ? #}
+ {{ find.get_last_find.description }}
+ {{ find.get_last_find.weight }}
+ {{ find.get_last_find.item_number }}
+ {{ item.context_record.parcel.short_label }}
+ {% trans "Details" %}
+ {#{%trans "Details"%} #}
+
+ {% empty %}
+ {% trans "No find associated to this context record" %}
+ {% endfor %}
+
+
+{% endblock %}
diff --git a/archaeological_context_records/templates/ishtar/sheet_contextrecord_window.html b/archaeological_context_records/templates/ishtar/sheet_contextrecord_window.html
new file mode 100644
index 000000000..b485ebd47
--- /dev/null
+++ b/archaeological_context_records/templates/ishtar/sheet_contextrecord_window.html
@@ -0,0 +1,3 @@
+{% extends "ishtar/sheet_contextrecord.html" %}
+{% block main_head %}{%endblock%}
+{% block main_foot %}{%endblock%}
diff --git a/archaeological_files/templates/ishtar/sheet_file.html b/archaeological_files/templates/ishtar/sheet_file.html
new file mode 100644
index 000000000..1b58aa332
--- /dev/null
+++ b/archaeological_files/templates/ishtar/sheet_file.html
@@ -0,0 +1,132 @@
+{% extends "ishtar/sheet.html" %}
+{% load i18n %}
+{% block content %}
+{% if previous or next %}
+
+{% endif %}
+
+{% trans "General"%}
+{%trans "Year:"%} {{ item.year }}
+{%trans "Numerical reference:"%} {{ item.numeric_reference }}
+
+{%trans "File's name:"%} {{ item.internal_reference }}
+
+{%trans "Edition date:"%} {{ item.history_date }}
+{% if item.reception_date %}{%trans "Reception date:"%} {{ item.reception_date }}
{% endif %}
+{%trans "Creation date:"%} {{ item.creation_date }}
+{% comment %}
+{% if item.deadline_date and not item.acts %}
+ {%trans "Deadline:"%} {% item.deadline_date %}
+{% endif %}
+{% endcomment %}
+
+{%trans "In charge:"%} {{ item.in_charge.full_label }}
+{%trans "State:"%} {% if item.is_active %}{%trans "Active file"%}
+{% else %}{%trans "Closed file"%}
+{%trans "Closing date:"%} {{ item.closing.date }} {%trans "by" %} {{ item.closing.user }}
+{% endif %}
+
+{%trans "Type:"%} {{ item.file_type }}
+
+{% if item.related_file %}{%trans "Related file:"%} {{ item.related_file }}
{% endif %}
+{% if item.comment %}{%trans "Comment:"%} {{ item.comment }}
{%endif%}
+
+{% trans "Localisation"%}
+{%trans "Towns:"%} {{ item.towns.all|join:", " }}
+
+{%trans "Main address:"%} {{ item.address }}
+{% if item.address_complement %}{%trans "Complement:"%} {{ item.address_complement }}
{%endif%}
+{% if item.postal_code %}{%trans "Postal code:"%} {{ item.postal_code }}
{%endif%}
+
+{%trans "Surface:"%} {% if item.total_surface %} {{ item.total_surface }} m2 ({{ item.total_surface_ha }} ha) {%endif%}
+
+
+
+{% if item.is_preventive %}
+{% trans "Preventive archaelogical file"%}
+{%trans "Planed surface:"%} {{ item.total_developed_surface }} m2 ({{ item.total_developed_surface_ha }} ha)
+{%trans "Saisine type:"%} {{ item.saisine_type }}
+{% if item.town_planning_service %}{%trans "Town planning service:"%} {{ item.town_planning_service }}
{% endif %}
+{% if item.permit_type %}{%trans "Permit type:"%} {{ item.permit_type }}
{% endif %}
+{% if item.permit_reference %}{%trans "Permit reference:"%} {{ item.permit_reference }}
{% endif %}
+{% if item.general_contractor.attached_to %}{%trans "General contractor organisation:"%} {{ item.general_contractor.attached_to }}
{% endif %}
+{% if item.general_contractor %}{%trans "General contractor:"%} {{ item.general_contractor.full_label }}
{% endif %}
+{% endif %}
+
+
+ {%trans "Admninistrative acts"%}
+
+ {% trans "Year" %}
+ {% trans "Reference" %}
+ {% trans "Type" %}
+ {% trans "Date" %}
+
+ {% for act in item.administrative_act.all %}
+
+ {{act.signature_date.year}}
+ {{act.ref_sra}}
+ {{act.act_type}}
+ {{act.signature_date}}
+
+ {% empty %}
+ {% trans "No administrative act associated to this archaelogical file" %}
+ {% endfor %}
+
+
+
+ {%trans "Associated operations"%}
+
+ {% trans "Year" %}
+ {% trans "Reference" %}
+ Code Patriarche
+ {% trans "Type" %}
+ {% trans "In charge" %}
+ {% trans "Start date" %}
+ {% trans "Excavation end date" %}
+
+
+ {% for operation in item.operations.all %}
+
+ {{operation.year}}
+ {{operation.operation_code}}
+ {{operation.code_patriarche|default:""}}
+ {{operation.operation_type}}
+ {{operation.in_charge|default:""}}
+ {{operation.start_date|default:""}}
+ {{operation.excavation_end_date|default:""}}
+ {% trans "Details" %}
+
+ {% empty %}
+ {% trans "No operation associated to this archaelogical file" %}
+ {% endfor %}
+
+
+
+ {%trans "Admninistrative acts linked to associated operations"%}
+
+ {% trans "Year" %}
+ {% trans "Reference" %}
+ {% trans "Type" %}
+ {% trans "Date" %}
+
+ {% for act in item.operation_acts %}
+
+ {{act.signature_date.year}}
+ {{act.ref_sra}}
+ {{act.act_type}}
+ {{act.signature_date}}
+
+ {% empty %}
+ {% trans "No administrative act linked to operations" %}
+ {% endfor %}
+
+{% endblock %}
diff --git a/archaeological_files/templates/ishtar/sheet_file_pdf.html b/archaeological_files/templates/ishtar/sheet_file_pdf.html
new file mode 100644
index 000000000..29a4f4dec
--- /dev/null
+++ b/archaeological_files/templates/ishtar/sheet_file_pdf.html
@@ -0,0 +1,18 @@
+{% extends "ishtar/sheet_file.html" %}
+{% block css_head %}
+
+{% endblock %}
+{% block main_head %}
+{{ block.super }}
+
+{% endblock %}
+{%block head_sheet%}{%endblock%}
+{%block main_foot%}
+
+