summaryrefslogtreecommitdiff
path: root/archaeological_files/templates
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2021-08-05 19:22:26 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2022-07-08 09:58:48 +0200
commitc3f9a8944f8c9892a007f95c24d0bf23001fe840 (patch)
treeb97918956184f4ab2427fc5c8cf56f9596f13507 /archaeological_files/templates
parent6d307f63eab0b857e12605622d5a2be514543be9 (diff)
downloadIshtar-c3f9a8944f8c9892a007f95c24d0bf23001fe840.tar.bz2
Ishtar-c3f9a8944f8c9892a007f95c24d0bf23001fe840.zip
Preventive file: cost propertues - display cost in sheet files
Diffstat (limited to 'archaeological_files/templates')
-rw-r--r--archaeological_files/templates/ishtar/sheet_file.html593
1 files changed, 402 insertions, 191 deletions
diff --git a/archaeological_files/templates/ishtar/sheet_file.html b/archaeological_files/templates/ishtar/sheet_file.html
index 7d3279988..d54d29e7e 100644
--- a/archaeological_files/templates/ishtar/sheet_file.html
+++ b/archaeological_files/templates/ishtar/sheet_file.html
@@ -11,211 +11,422 @@
{% 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 %}
+{% with has_costs=item.equipment_costs.count|or_:item.ground_jobs.count|or_:item.jobs.count %}
+
+{% if output != "ODT" and output != "PDF"%}
+<ul class="nav nav-tabs" id="{{window_id}}-tabs" role="tablist">
+ <li class="nav-item">
+ <a class="nav-link active" id="{{window_id}}-general-tab"
+ data-toggle="tab" href="#{{window_id}}-general" role="tab"
+ aria-controls="{{window_id}}-general" aria-selected="false">
+ {% trans "General" %}
+ </a>
+ </li>
+ {% if has_costs %}<li class="nav-item">
+ <a class="nav-link" id="{{window_id}}-costs-tab"
+ data-toggle="tab" href="#{{window_id}}-costs" role="tab"
+ aria-controls="{{window_id}}-costs" aria-selected="false">
+ {% trans "Preventive" %}
+ </a>
+ </li>{% endif %}
+</ul>
+{% endif %}
-<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">
- <div class="card-text">
- {% if item.complete_identifier %}<p class="window-refs"
- title="{% trans 'Complete identifier' %}">
- <strong>{{ item.complete_identifier }}</strong></p>{% endif %}
- <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" %}
+<div class="tab-content" id="{{window_id}}-tab-content">
+ <div class="tab-pane fade show active" id="{{window_id}}-general"
+ role="tabpanel" aria-labelledby="{{window_id}}-general-tab">
+
+ <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">
+ <div class="card-text">
+ {% if item.complete_identifier %}<p class="window-refs"
+ title="{% trans 'Complete identifier' %}">
+ <strong>{{ item.complete_identifier }}</strong></p>{% endif %}
+ <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" %}
+ </div>
+ </div>
+ </div>
+ </div>
</div>
- </div>
- </div>
- </div>
-</div>
-
-
-<h3>{% trans "General"%}</h3>
-<div class="row">
- {% field_flex "Reception date" item.reception_date|date:"DATE_FORMAT" %}
- {% include "ishtar/blocks/sheet_creation_section.html" %}
+ <h3>{% trans "General"%}</h3>
+
+ <div class="row">
+ {% field_flex "Reception date" item.reception_date|date:"DATE_FORMAT" %}
+ {% include "ishtar/blocks/sheet_creation_section.html" %}
+
+ {% comment %}
+ {% if item.deadline_date and not item.acts %}
+ <p><label>{%trans "Deadline"%}</label> <span class='value'>{% item.deadline_date %}</span></p> <!-- calculated deadline for some preventive files , see saisine_type, not displayed if an act as been send -->
+ {% endif %}
+ {% endcomment %}
+
+ {% field_flex_detail "In charge" item.in_charge %}
+ <div class="col-12 col-md-6 col-lg-4 d-flex flex-wrap row">
+ <dt class="col-5">{%trans "State"%}</dt>
+ <dd class='col-7'>
+ {% if item.is_active %}{%trans "Active file"%}{% else %}{%trans "Closed file"%}{% endif %}
+ </dd>
+ </div>
+ {% if item.closing %}
+ <div class="col-12 col-md-6 col-lg-4 d-flex flex-wrap row">
+ <dt class="col-5">{%trans "Closing date"%}</dt>
+ <dd class='col-7'>
+ {{ item.closing.date }} <strong>{%trans "by" %}</strong> {{ item.closing.user.full_label }}
+ </dd>
+ </div>
+ {% endif %}
+ {% field_flex "Type" item.file_type %}
+ {% field_flex_detail "Related file" item.related_file %}
+ {% field_flex_full "Comment" item.comment "<pre>" "</pre>" %}
+ </div>
-{% comment %}
-{% if item.deadline_date and not item.acts %}
- <p><label>{%trans "Deadline"%}</label> <span class='value'>{% item.deadline_date %}</span></p> <!-- calculated deadline for some preventive files , see saisine_type, not displayed if an act as been send -->
-{% endif %}
-{% endcomment %}
-
- {% field_flex_detail "In charge" item.in_charge %}
- <div class="col-12 col-md-6 col-lg-4 d-flex flex-wrap row">
- <dt class="col-5">{%trans "State"%}</dt>
- <dd class='col-7'>
- {% if item.is_active %}{%trans "Active file"%}{% else %}{%trans "Closed file"%}{% endif %}
- </dd>
- </div>
- {% if item.closing %}
- <div class="col-12 col-md-6 col-lg-4 d-flex flex-wrap row">
- <dt class="col-5">{%trans "Closing date"%}</dt>
- <dd class='col-7'>
- {{ item.closing.date }} <strong>{%trans "by" %}</strong> {{ item.closing.user.full_label }}
- </dd>
- </div>
- {% endif %}
- {% field_flex "Type" item.file_type %}
- {% field_flex_detail "Related file" item.related_file %}
- {% field_flex_full "Comment" item.comment "<pre>" "</pre>" %}
-</div>
+ {% include "ishtar/blocks/sheet_json.html" %}
+
+ <h3>{% trans "Localisation"%}</h3>
+ <div class="row">
+ {% field_flex_multiple_obj "Towns" item 'towns' %}
+ {% field_flex_multiple_obj "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 %}
+ <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.total_surface }} m<sup>2</sup> ({{ item.total_surface_ha }} ha)
+ </dd>
+ </div>
+ {% endif %}
+ </div>
-{% include "ishtar/blocks/sheet_json.html" %}
-
-<h3>{% trans "Localisation"%}</h3>
-<div class="row">
- {% field_flex_multiple_obj "Towns" item 'towns' %}
- {% field_flex_multiple_obj "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 %}
- <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.total_surface }} m<sup>2</sup> ({{ item.total_surface_ha }} ha)
- </dd>
- </div>
- {% endif %}
-</div>
+ {% if item.is_preventive %}
+
+ <h3>{% trans "Preventive archaeological file"%}</h3>
+ <div class="row">
+
+ {% if item.total_developed_surface %}
+ <div class="col-12 col-md-6 col-lg-4 d-flex flex-wrap row">
+ <dt class="col-5">{%trans "Developed surface"%}</dt>
+ <dd class='col-7'>
+ {{ item.total_developed_surface }} m<sup>2</sup> ({{ item.total_developed_surface_ha }} ha)</span></li>
+ </dd>
+ </div>
+ {% endif %}
+
+ {% field_flex "Saisine type" item.saisine_type %}
+
+ {% field_flex_detail "Responsible for planning service" item.responsible_town_planning_service %}
+ {% field_flex "Responsible for planning service address" item.responsible_town_planning_service.full_address %}
+ {% if item.town_planning_service %}
+ {% field_flex "Planning service organization" item.town_planning_service.full_address %}
+ {% else %}
+ {% field_flex "Planning service organization" item.responsible_town_planning_service.attached_to.full_address %}
+ {% endif %}
+
+ {% field_flex "Permit type" item.permit_type %}
+ {% field_flex "Permit reference" item.permit_reference %}
+ {% field_flex "Date of planning service file" item.planning_service_date|date:"DATE_FORMAT" %}
+
+ {% field_flex "General contractor" item.general_contractor.full_address %}
+ {% if item.corporation_general_contractor %}
+ {% field_flex "General contractor organization" item.corporation_general_contractor.full_address %}
+ {% else%}
+ {% field_flex "General contractor organization" item.general_contractor.attached_to.full_address %}
+ {% endif %}
-{% if item.is_preventive %}
-
-<h3>{% trans "Preventive archaeological file"%}</h3>
-<div class="row">
-
- {% if item.total_developed_surface %}
- <div class="col-12 col-md-6 col-lg-4 d-flex flex-wrap row">
- <dt class="col-5">{%trans "Developed surface"%}</dt>
- <dd class='col-7'>
- {{ item.total_developed_surface }} m<sup>2</sup> ({{ item.total_developed_surface_ha }} ha)</span></li>
- </dd>
- </div>
- {% endif %}
-
- {% field_flex "Saisine type" item.saisine_type %}
-
- {% field_flex_detail "Responsible for planning service" item.responsible_town_planning_service %}
- {% field_flex "Responsible for planning service address" item.responsible_town_planning_service.full_address %}
- {% if item.town_planning_service %}
- {% field_flex "Planning service organization" item.town_planning_service.full_address %}
- {% else %}
- {% field_flex "Planning service organization" item.responsible_town_planning_service.attached_to.full_address %}
- {% endif %}
-
- {% field_flex "Permit type" item.permit_type %}
- {% field_flex "Permit reference" item.permit_reference %}
- {% field_flex "Date of planning service file" item.planning_service_date|date:"DATE_FORMAT" %}
-
- {% field_flex "General contractor" item.general_contractor.full_address %}
- {% if item.corporation_general_contractor %}
- {% field_flex "General contractor organization" item.corporation_general_contractor.full_address %}
- {% else%}
- {% field_flex "General contractor organization" item.general_contractor.attached_to.full_address %}
- {% endif %}
+ </div>
+ {% else %}
-</div>
-{% else %}
+ <h3>{% trans "Research archaeology"%}</h3>
+ <div class="row">
+ {% field_flex_detail "Head scientist" item.scientist %}
+ {% field_flex "Requested operation type" item.requested_operation_type %}
+ {% field_flex_detail "Organization" item.organization %}
-<h3>{% trans "Research archaeology"%}</h3>
-<div class="row">
- {% field_flex_detail "Head scientist" item.scientist %}
- {% field_flex "Requested operation type" item.requested_operation_type %}
- {% field_flex_detail "Organization" item.organization %}
+ {% if item.cira_advised != None %}
+ {% field_flex "Passage en CIRA" item.cira_advised|yesno %}
+ {% endif %}
- {% if item.cira_advised != None %}
- {% field_flex "Passage en CIRA" item.cira_advised|yesno %}
- {% endif %}
+ {% if item.mh_register != None %}
+ {% field_flex "Sur Monument Historique classé" item.mh_register|yesno %}
+ {% endif %}
- {% if item.mh_register != None %}
- {% field_flex "Sur Monument Historique classé" item.mh_register|yesno %}
- {% endif %}
+ {% if item.mh_listing != None %}
+ {% field_flex "Sur Monument Historique inscrit" item.mh_listing|yesno %}
+ {% 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.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 %}
- {% if item.protected_area != None %}
- {% field_flex "Protected area" item.protected_area|yesno %}
- {% endif %}
+ {% field_flex_full "Comment" item.research_comment "<pre>" "</pre>" %}
+ </div>
- {% field_flex_full "Comment" item.research_comment "<pre>" "</pre>" %}
+ {% endif %}
+
+ {% if not next %}
+
+ {% trans "Associated parcels" as parcels_label %}
+ {% include "ishtar/blocks/window_tables/parcels.html" %}
+
+ {% trans "Administrative acts" as administrativeacts_label %}
+ {% table_administrativact administrativeacts_label item.administrative_act.all %}
+
+ <h3>{%trans "Associated operations"%}</h3>
+ <table class="table table-striped">
+ <tr>
+ <th>{% trans "Ref." %}</th>
+ <th>Code Patriarche</th>
+ <th>{% trans "Type" %}</th>
+ <th>{% trans "In charge" %}</th>
+ <th>{% trans "Start date" %}</th>
+ <th>{% trans "Excavation end date" %}</th>
+ <th class='link'>&nbsp;</th>
+ </tr>
+ {% for operation in item.operations.all %}
+ <tr>
+ <td>{{operation.year_index}}</td>
+ <td>{{operation.full_code_patriarche|default:""}}</td>
+ <td class='string'>{{operation.operation_type}}</td>
+ <td class='string'>{{operation.in_charge|default:""}}</td>
+ <td>{{operation.start_date|default:""}}</td>
+ <td>{{operation.excavation_end_date|default:""}}</td>
+ <td class='link'><a href="#" class='display_details'
+ onclick='load_window("{% url "show-operation" operation.pk "" %}")'><i class="fa fa-info-circle" aria-hidden="true"></i></a></td>
+ </tr>
+ {% empty %}
+ <tr><td colspan="8" class='no_items'>{% trans "No operation associated to this archaeological file" %}</td></tr>
+ {% endfor %}
+ </table>
+
+ <h3>{%trans "Admninistrative acts linked to associated operations"%}</h3>
+ <table class="table table-striped">
+ <tr>
+ <th>{% trans "Year" %}</th>
+ <th>{% trans "Ref." %}</th>
+ <th>{% trans "Type" %}</th>
+ <th>{% trans "Date" %}</th>
+ </tr>
+ {% for act in item.operation_acts %}
+ <tr>
+ <td>{{act.signature_date.year}}</td>
+ <td>{{act.ref_sra}}</td>
+ <td class='string'>{{act.act_type}}</td>
+ <td>{{act.signature_date}}</td>
+ </tr>
+ {% empty %}
+ <tr><td colspan="4" class='no_items'>{% trans "No administrative act linked to operations" %}</td></tr>
+ {% endfor %}
+ </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 %}
+
+ </div>{% if has_costs %}
+ <div class="tab-pane fade show active" id="{{window_id}}-costs"
+ role="tabpanel" aria-labelledby="{{window_id}}-costs-tab">
+ <div class="row">
+ {% field_flex "Start date" item.start_date|date:"DATE_FORMAT" %}
+ {% field_flex "End date" item.end_date|date:"DATE_FORMAT" %}
+ {% field_flex "Ground start date" item.ground_start_date|date:"DATE_FORMAT" %}
+ {% field_flex "Ground end date" item.ground_end_date|date:"DATE_FORMAT" %}
+ {% field_flex "Study period" item.study_period %}
+ {% field_flex "Execution report date" item.execution_report_date|date:"DATE_FORMAT" %}
+ </div>
+ <div class="row">
+ {% if item.total_developed_surface %}
+ <dl class="col-12 col-lg-6 flex-wrap">
+ <dt>{%trans "Total developed surface"%}</dt>
+ <dd>
+ {{ item.total_developed_surface }} m<sup>2</sup> ({{ item.total_developed_surface_ha }} ha)
+ </dd>
+ </dl>
+ {% endif %}
+ {% if item.total_surface %}
+ <dl class="col-12 col-lg-6 flex-wrap">
+ <dt>{% trans "Surface" %}</dt>
+ <dd>
+ {{ item.total_surface }} m<sup>2</sup> ({{ item.total_surface_ha }} ha)
+ </dd>
+ </dl>
+ {% endif %}
+ </div>
+ <h3>{% trans "Human and technical requirements" %}</h3>
+ {% if item.ground_jobs.count %}
+ <div class="col-12">
+ <h4>{% trans "Ground jobs" %}</h4>
+ <table class="table table-striped">
+ <thead>
+ <tr>
+ <th>{% trans "Job" %}</th>
+ <th colspan="3">{% trans "Planned" %}</th>
+ <th colspan="3">{% trans "Effective" %}</th>
+ </tr>
+ <tr>
+ <td>&nbsp;</td>
+ <th>{% trans "Man by day" %}</th>
+ <th>{% trans "Days" %}</th>
+ <th>{% trans "Cost" %}</th>
+ <th>{% trans "Man by day" %}</th>
+ <th>{% trans "Days" %}</th>
+ <th>{% trans "Cost" %}</th>
+ </tr>
+ </thead>
+ {% for job in item.ground_jobs.all %}
+ <tr>
+ <td><em>{{job.job}}</em></td>
+ <td class="text-right">{{job.man_by_day_planned|default:"-"}}</td>
+ <td class="text-right">{{job.days_planned|default:"-"}}</td>
+ <td class="text-right">{{job.cost_planned|default:"-"|floatformat:2}}</td>
+ <td class="text-right">{{job.man_by_day_worked|default:"-"}}</td>
+ <td class="text-right">{{job.days_worked|default:"-"}}</td>
+ <td class="text-right">{{job.cost_worked|default:"-"|floatformat:2}}</td>
+ </tr>
+ {% endfor %}
+ <tr class="table-info">
+ <td><strong>{% trans "Total" %}</strong></td>
+ <td colspan="2">&nbsp;</td>
+ <td class="text-right">
+ <strong>{{item.ground_job_cost_planned|default:"-"|floatformat:2}}</strong>
+ </td>
+ <td colspan="2">&nbsp;</td>
+ <td class="text-right">
+ <strong>{{item.ground_job_cost_worked|default:"-"|floatformat:2}}</strong>
+ </td>
+ </tr>
+ <tr class="table-info">
+ <td><em>{% trans "Difference" %}</em></td>
+ <td colspan="5">&nbsp;</td>
+ <td class="text-right">
+ <em>{{item.ground_job_cost_diff_planned_worked|default:"-"|floatformat:2}}</em>
+ </td>
+ </tr>
+ </table>
+ </div>
+ {% endif %}
+ {% if item.jobs.count %}
+ <div class="col-12">
+ <h4>{% trans "Post-excavation jobs" %}</h4>
+ <table class="table table-striped">
+ <thead>
+ <tr>
+ <th>{% trans "Job" %}</th>
+ <th colspan="3">{% trans "Planned" %}</th>
+ <th colspan="3">{% trans "Effective" %}</th>
+ </tr>
+ <tr>
+ <td>&nbsp;</td>
+ <th>{% trans "Man by day" %}</th>
+ <th>{% trans "Days" %}</th>
+ <th>{% trans "Cost" %}</th>
+ <th>{% trans "Man by day" %}</th>
+ <th>{% trans "Days" %}</th>
+ <th>{% trans "Cost" %}</th>
+ </tr>
+ </thead>
+ {% for job in item.jobs.all %}
+ <tr>
+ <td><em>{{job.job}}</em></td>
+ <td class="text-right">{{job.man_by_day_planned|default:"-"}}</td>
+ <td class="text-right">{{job.days_planned|default:"-"}}</td>
+ <td class="text-right">{{job.cost_planned|default:"-"|floatformat:2}}</td>
+ <td class="text-right">{{job.man_by_day_worked|default:"-"}}</td>
+ <td class="text-right">{{job.days_worked|default:"-"}}</td>
+ <td class="text-right">{{job.cost_worked|default:"-"|floatformat:2}}</td>
+ </tr>
+ {% endfor %}
+ <tr class="table-info">
+ <td><strong>{% trans "Total" %}</strong></td>
+ <td colspan="2">&nbsp;</td>
+ <td class="text-right">
+ <strong>{{item.job_cost_planned|default:"-"|floatformat:2}}</strong>
+ </td>
+ <td colspan="2">&nbsp;</td>
+ <td class="text-right">
+ <strong>{{item.job_cost_worked|default:"-"|floatformat:2}}</strong>
+ </td>
+ </tr>
+ <tr class="table-info">
+ <td><em>{% trans "Difference" %}</em></td>
+ <td colspan="5">&nbsp;</td>
+ <td class="text-right">
+ <em>{{item.job_cost_diff_planned_worked|default:"-"|floatformat:2}}</em>
+ </td>
+ </tr>
+ </table>
+ </div>
+ {% endif %}
+ {% for service_type, cost_planned, cost_worked, diff, equipments in item.used_equipments %}
+ <div class="col-12">
+ <h4>{{service_type}}</h4>
+ <table class="table table-striped">
+ <thead>
+ <tr>
+ <th>{% trans "Equipment / service" %}</th>
+ <th colspan="4">{% trans "Planned" %}</th>
+ <th colspan="4">{% trans "Effective" %}</th>
+ </tr>
+ <tr>
+ <td>&nbsp;</td>
+ <th>{% trans "Quantity" %}</th>
+ <th colspan="2">&nbsp;</th>
+ <th>{% trans "Cost" %}</th>
+ <th>{% trans "Quantity" %}</th>
+ <th colspan="2">&nbsp;</th>
+ <th>{% trans "Cost" %}</th>
+ </tr>
+ </thead>
+ {% for equipment in equipments %}
+ {% if equipment.cost_planned or equipment.cost_worked %}
+ <tr>
+ <td><em>{{equipment.equipment_service_cost.equipment_service_type.label}}</em></td>
+ <td class="text-right">{{equipment.quantity_by_day_planned|default:"-"}}</td>
+ <td class="text-right">{{equipment.days_planned|default:"-"}}</td>
+ <td>{{equipment.equipment_service_cost.unit_label}}</td>
+ <td class="text-right">{{equipment.cost_planned|default:"-"|floatformat:2}}</td>
+ <td class="text-right">{{equipment.quantity_by_day_worked|default:"-"}}</td>
+ <td class="text-right">{{equipment.days_worked|default:"-"}}</td>
+ <td>{{equipment.equipment_service_cost.unit_label}}</td>
+ <td class="text-right">{{equipment.cost_worked|default:"-"|floatformat:2}}</td>
+ </tr>
+ {% endif %}
+ {% endfor %}
+ <tr class="table-info">
+ <td><strong>{% trans "Total" %}</strong></td>
+ <td colspan="3">&nbsp;</td>
+ <td class="text-right"><strong>{{cost_planned|default:"-"|floatformat:2}}</strong></td>
+ <td colspan="3">&nbsp;</td>
+ <td class="text-right"><strong>{{cost_worked|default:"-"|floatformat:2}}</strong></td>
+ </tr>
+ <tr class="table-info">
+ <td><em>{% trans "Difference" %}</em></td>
+ <td colspan="7">&nbsp;</td>
+ <td class="text-right">
+ <em>{{diff|default:"-"|floatformat:2}}</em>
+ </td>
+ </tr>
+ </table>
+ </div>
+ {% endfor %}
+ </div>{% endif %}
</div>
-{% endif %}
-
-{% if not next %}
-
-{% trans "Associated parcels" as parcels_label %}
-{% include "ishtar/blocks/window_tables/parcels.html" %}
-
-{% trans "Administrative acts" as administrativeacts_label %}
-{% table_administrativact administrativeacts_label item.administrative_act.all %}
-
-<h3>{%trans "Associated operations"%}</h3>
-<table class="table table-striped">
- <tr>
- <th>{% trans "Ref." %}</th>
- <th>Code Patriarche</th>
- <th>{% trans "Type" %}</th>
- <th>{% trans "In charge" %}</th>
- <th>{% trans "Start date" %}</th>
- <th>{% trans "Excavation end date" %}</th>
- <th class='link'>&nbsp;</th>
- </tr>
- {% for operation in item.operations.all %}
- <tr>
- <td>{{operation.year_index}}</td>
- <td>{{operation.full_code_patriarche|default:""}}</td>
- <td class='string'>{{operation.operation_type}}</td>
- <td class='string'>{{operation.in_charge|default:""}}</td>
- <td>{{operation.start_date|default:""}}</td>
- <td>{{operation.excavation_end_date|default:""}}</td>
- <td class='link'><a href="#" class='display_details'
- onclick='load_window("{% url "show-operation" operation.pk "" %}")'><i class="fa fa-info-circle" aria-hidden="true"></i></a></td>
- </tr>
- {% empty %}
- <tr><td colspan="8" class='no_items'>{% trans "No operation associated to this archaeological file" %}</td></tr>
- {% endfor %}
-</table>
-
-<h3>{%trans "Admninistrative acts linked to associated operations"%}</h3>
-<table class="table table-striped">
- <tr>
- <th>{% trans "Year" %}</th>
- <th>{% trans "Ref." %}</th>
- <th>{% trans "Type" %}</th>
- <th>{% trans "Date" %}</th>
- </tr>
- {% for act in item.operation_acts %}
- <tr>
- <td>{{act.signature_date.year}}</td>
- <td>{{act.ref_sra}}</td>
- <td class='string'>{{act.act_type}}</td>
- <td>{{act.signature_date}}</td>
- </tr>
- {% empty %}
- <tr><td colspan="4" class='no_items'>{% trans "No administrative act linked to operations" %}</td></tr>
- {% endfor %}
-</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 %}
+{% endwith %} {% endwith %} {% endwith %}{% endwith %}
{% endblock %}