summaryrefslogtreecommitdiff
path: root/archaeological_files
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2024-06-07 13:34:38 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2024-06-07 15:45:15 +0200
commitd55a5ec58047dc53118dce1d3aecbeb398cf57de (patch)
treed940054e928f217004cb4694027c3b4ff44fcb29 /archaeological_files
parent5f6514859cc06841d7bfb0919f98b72168eeade9 (diff)
downloadIshtar-d55a5ec58047dc53118dce1d3aecbeb398cf57de.tar.bz2
Ishtar-d55a5ec58047dc53118dce1d3aecbeb398cf57de.zip
🐛 Sheet: add missing fields, improve layout (refs #5863, #5864, #5865, #5866, #5867, #5868, #5869, #5870, #5871, #5872)
Diffstat (limited to 'archaeological_files')
-rw-r--r--archaeological_files/forms.py2
-rw-r--r--archaeological_files/templates/ishtar/sheet_file.html42
2 files changed, 20 insertions, 24 deletions
diff --git a/archaeological_files/forms.py b/archaeological_files/forms.py
index 2548d5f71..bee0e7caa 100644
--- a/archaeological_files/forms.py
+++ b/archaeological_files/forms.py
@@ -662,7 +662,7 @@ class FileFormInstruction(CustomForm, IshtarForm):
validators=[valid_id(models.File)],
)
comment = forms.CharField(label=_("Comment"), widget=forms.Textarea, required=False)
- instruction_deadline = forms.DateField(widget=DatePicker, required=False)
+ instruction_deadline = forms.DateField(label=_("Instruction deadline"), widget=DatePicker, required=False)
year = forms.IntegerField(
label=_("Year"),
validators=[
diff --git a/archaeological_files/templates/ishtar/sheet_file.html b/archaeological_files/templates/ishtar/sheet_file.html
index 30a428262..b2a1a71fc 100644
--- a/archaeological_files/templates/ishtar/sheet_file.html
+++ b/archaeological_files/templates/ishtar/sheet_file.html
@@ -1,5 +1,5 @@
{% extends "ishtar/sheet.html" %}
-{% load i18n ishtar_helpers window_ope_tables window_field window_header window_tables %}
+{% load i18n l10n ishtar_helpers window_ope_tables window_field window_header window_tables %}
{% block head_title %}<strong>{% trans "Archaeological file" %}</strong> - {{item.full_internal_ref|default:''}}{% endblock %}
@@ -60,29 +60,24 @@
<h3>{% trans "General"%}</h3>
<div class="row">
+ {% field_flex _("Creation date") item.creation_date|date:"DATE_FORMAT" %}
{% field_flex "Reception date" item.reception_date|date:"DATE_FORMAT" %}
+ {% field_flex _("Instruction deadline") item.instruction_deadline|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'>
+ {% field_flex_detail _("File managed by") item.in_charge %}
+ <dl class="col-12 col-md-6 col-lg-3 flex-wrap">
+ <dt>{%trans "State of the file"%}</dt>
+ <dd>
{% if item.is_active %}{%trans "Active file"%}{% else %}{%trans "Closed file"%}{% endif %}
</dd>
- </div>
+ </dl>
{% 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'>
+ <dl class="col-12 col-md-6 col-lg-3 flex-wrap">
+ <dt>{%trans "Closing date"%}</dt>
+ <dd>
{{ item.closing.date }} <strong>{%trans "by" %}</strong> {{ item.closing.user.full_label }}
</dd>
- </div>
+ </dl>
{% endif %}
{% field_flex "Type" item.file_type %}
{% field_flex_detail "Related file" item.related_file %}
@@ -95,6 +90,7 @@
<div class="row">
{% field_flex_detail_multiple_full "Towns" item.towns %}
{% field_flex_multiple_obj "Departments" item 'departments' %}
+ {% field_flex "Locality" item.locality %}
{% field_flex "Main address" item.address %}
{% field_flex "Complement" item.address_complement %}
{% field_flex "Postal code" item.postal_code %}
@@ -125,7 +121,7 @@
{% 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 %}
+ {% 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 %}
@@ -133,7 +129,7 @@
{% endif %}
{% field_flex "Permit type" item.permit_type %}
- {% field_flex "Permit/order reference" item.permit_reference %}
+ {% field_flex _("Permit/order 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 %}
@@ -172,7 +168,7 @@
{% field_flex "Protected area" item.protected_area|yesno %}
{% endif %}
- {% field_flex_full "Comment" item.research_comment "<pre>" "</pre>" %}
+ {% field_flex_full _("Research archaeology comment") item.research_comment "<pre>" "</pre>" %}
</div>
{% endif %}
@@ -188,24 +184,24 @@
<h3>{%trans "Associated operations"%}</h3>
<table class="table table-striped">
<tr>
+ <th class='link'>&nbsp;</th>
<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 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>
<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>