From d55a5ec58047dc53118dce1d3aecbeb398cf57de Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Fri, 7 Jun 2024 13:34:38 +0200 Subject: 🐛 Sheet: add missing fields, improve layout (refs #5863, #5864, #5865, #5866, #5867, #5868, #5869, #5870, #5871, #5872) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- archaeological_files/forms.py | 2 +- .../templates/ishtar/sheet_file.html | 42 ++++++++++------------ 2 files changed, 20 insertions(+), 24 deletions(-) (limited to 'archaeological_files') 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 %}{% trans "Archaeological file" %} - {{item.full_internal_ref|default:''}}{% endblock %} @@ -60,29 +60,24 @@

{% trans "General"%}

+ {% 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 %} -

{% item.deadline_date %}

- {% endif %} - {% endcomment %} - - {% field_flex_detail "In charge" item.in_charge %} -
-
{%trans "State"%}
-
+ {% field_flex_detail _("File managed by") item.in_charge %} +
+
{%trans "State of the file"%}
+
{% if item.is_active %}{%trans "Active file"%}{% else %}{%trans "Closed file"%}{% endif %}
-
+ {% if item.closing %} -
-
{%trans "Closing date"%}
-
+
+
{%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 %} @@ -95,6 +90,7 @@
{% 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 "
" "
" %} + {% field_flex_full _("Research archaeology comment") item.research_comment "
" "
" %}
{% endif %} @@ -188,24 +184,24 @@

{%trans "Associated operations"%}

+ - {% for operation in item.operations.all %} + - {% empty %} -- cgit v1.2.3
  {% trans "Ref." %} Code Patriarche {% trans "Type" %} {% trans "In charge" %} {% trans "Start date" %} {% trans "Excavation end date" %} 
{{operation.year_index}} {{operation.full_code_patriarche|default:""}} {{operation.operation_type}} {{operation.in_charge|default:""}} {{operation.start_date|default:""}} {{operation.excavation_end_date|default:""}}
{% trans "No operation associated to this archaeological file" %}