From 2a4116afc9f8822bfbcc010996923363acd4253b Mon Sep 17 00:00:00 2001
From: Étienne Loks
Date: Sat, 24 Oct 2015 15:00:28 +0200
Subject: Archaeological files: small improve on the window presentation
---
.../templates/ishtar/sheet_file.html | 31 +++++++++++++---------
1 file changed, 18 insertions(+), 13 deletions(-)
(limited to 'archaeological_files/templates')
diff --git a/archaeological_files/templates/ishtar/sheet_file.html b/archaeological_files/templates/ishtar/sheet_file.html
index 0e68f8a98..10ee82232 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 window_ope_tables %}
+{% load i18n window_ope_tables window_field %}
{% block head_sheet %}
{{block.super}}
@@ -29,32 +29,37 @@
{%endif%}
{% trans "General"%}
-{%trans "Year:"%} {{ item.year }}
-{% if item.numeric_reference %}{%trans "Numerical reference:"%} {{ item.numeric_reference }}
{% endif %}
-{% if item.internal_reference %}{%trans "Other reference:"%} {{ item.internal_reference }}
{% endif %}
-{% if item.name %}
-{%trans "Name:"%} {{ item.name }}
-{% endif %}
+
+{% field "Year" item.year "" " " %}
+{% field "Numerical reference" item.numeric_reference "" " " %}
+{% field "Other reference" item.internal_reference %}
+{% field "Name" item.name %}
+
{%trans "Edition date:"%} {% if item.history_date %}{{ item.history_date }}{% else %}{{ item.history.all.0.history_date }}{% endif %}
-{% if item.reception_date %}{%trans "Reception date:"%} {{ item.reception_date }}
{% endif %}
-{%trans "Creation date:"%} {{ item.creation_date }}
-{%trans "Created by:"%} {{ item.history_creator.ishtaruser.full_label }}
+
+{% field "Reception date" item.reception_date %}
+{% field "Creation date" item.creation_date %}
+{% field "Created by" item.history_creator.ishtaruser.full_label %}
+
{% comment %}
{% if item.deadline_date and not item.acts %}
{%trans "Deadline:"%} {% item.deadline_date %}
{% endif %}
{% endcomment %}
-{%trans "In charge:"%} {{ item.in_charge.full_label }}
+{% field "In charge" item.in_charge.full_label %}
+
{%trans "State:"%} {% if item.is_active %}{%trans "Active file"%}
{% else %}{%trans "Closed file"%}
+
{% if item.closing %}{%trans "Closing date:"%} {{ item.closing.date }} {%trans "by" %} {{ item.closing.user.full_label }}
{% endif %}
{% endif %}
-{%trans "Type:"%} {{ item.file_type }}
+{% field "Type" item.file_type %}
{% if item.related_file %}{%trans "Related file:"%} {{ item.related_file }}
{% endif %}
-{% if item.comment %}{%trans "Comment:"%} {{ item.comment }}
{%endif%}
+
+{% field "Comment" item.comment "" " " %}
{% trans "Localisation"%}
{% if item.towns.count %}{%trans "Towns:"%} {{ item.towns.all|join:", " }}
{% endif %}
--
cgit v1.2.3