diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-09-05 20:09:46 +0200 |
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-09-05 20:09:46 +0200 |
| commit | 6d53f660453552414207a711cef2cad2f09bf8d3 (patch) | |
| tree | da14d18d48ba4c5217f466ade0aad79c40bb3bca /archaeological_files | |
| parent | 4190b4a7dc03c0b9f1ca4113b4d0706c1bfffa19 (diff) | |
| parent | edfe798c15c8589933cb41314d01ff73a8d7c0c8 (diff) | |
| download | Ishtar-6d53f660453552414207a711cef2cad2f09bf8d3.tar.bz2 Ishtar-6d53f660453552414207a711cef2cad2f09bf8d3.zip | |
Merge branch 'master' into v0.9
Diffstat (limited to 'archaeological_files')
| -rw-r--r-- | archaeological_files/models.py | 1 | ||||
| -rw-r--r-- | archaeological_files/templates/ishtar/sheet_file.html | 55 |
2 files changed, 31 insertions, 25 deletions
diff --git a/archaeological_files/models.py b/archaeological_files/models.py index 98223d7ff..eaa9d832e 100644 --- a/archaeological_files/models.py +++ b/archaeological_files/models.py @@ -73,6 +73,7 @@ class File(ClosedItem, BaseHistorizedItem, OwnPerms, ValueGetter, ShortMenuItem, DashboardFormItem): TABLE_COLS = ['numeric_reference', 'year', 'internal_reference', 'file_type', 'saisine_type', 'towns', ] + SHOW_URL = 'show-file' year = models.IntegerField(_(u"Year"), default=lambda: datetime.datetime.now().year) numeric_reference = models.IntegerField( diff --git a/archaeological_files/templates/ishtar/sheet_file.html b/archaeological_files/templates/ishtar/sheet_file.html index 782a7656d..9c42c8f76 100644 --- a/archaeological_files/templates/ishtar/sheet_file.html +++ b/archaeological_files/templates/ishtar/sheet_file.html @@ -13,16 +13,17 @@ <h3>{% trans "General"%}</h3> -{% field "Year" item.year "<strong>" "</strong>" %} -{% field "Numerical reference" item.numeric_reference "<strong>" "</strong>" %} -{% field "Other reference" item.internal_reference %} -{% field "Name" item.name %} +<ul class='form-flex'> +{% field_li "Year" item.year "<strong>" "</strong>" %} +{% field_li "Numerical reference" item.numeric_reference "<strong>" "</strong>" %} +{% field_li "Other reference" item.internal_reference %} +{% field_li "Name" item.name %} -<p><label>{%trans "Edition date:"%}</label> <span class='value'>{% if item.history_date %}{{ item.history_date }}{% else %}{{ item.history.all.0.history_date }}{% endif %}</span></p> <!-- date = now --> +<li><label>{%trans "Edition date:"%}</label> <span class='value'>{% if item.history_date %}{{ item.history_date }}{% else %}{{ item.history.all.0.history_date }}{% endif %}</span></li> <!-- date = now --> -{% field "Reception date" item.reception_date|date:"DATE_FORMAT" %} -{% field "Creation date" item.creation_date|date:"DATE_FORMAT" %} -{% field "Created by" item.history_creator.ishtaruser.full_label %} +{% field_li "Reception date" item.reception_date|date:"DATE_FORMAT" %} +{% field_li "Creation date" item.creation_date|date:"DATE_FORMAT" %} +{% field_li "Created by" item.history_creator.ishtaruser.full_label %} {% comment %} {% if item.deadline_date and not item.acts %} @@ -30,19 +31,20 @@ {% endif %} {% endcomment %} -{% field "In charge" item.in_charge.full_label %} +{% field_li_detail "In charge" item.in_charge %} -<p><label>{%trans "State:"%}</label> <span class='value'>{% if item.is_active %}{%trans "Active file"%}</span></p> -{% else %}{%trans "Closed file"%}</span></p> +<li><label>{%trans "State:"%}</label> <span class='value'>{% if item.is_active %}{%trans "Active file"%}</span></p> +{% else %}{%trans "Closed file"%}</span></li> -{% if item.closing %}<p><label>{%trans "Closing date:"%}</label> <span class='value'>{{ item.closing.date }} <strong>{%trans "by" %}</strong> {{ item.closing.user.full_label }}</span></p>{% endif %} +{% if item.closing %}<li><label>{%trans "Closing date:"%}</label> <span class='value'>{{ item.closing.date }} <strong>{%trans "by" %}</strong> {{ item.closing.user.full_label }}</span></li>{% endif %} {% endif %} -{% field "Type" item.file_type %} +{% field_li "Type" item.file_type %} -{% if item.related_file %}<p><label>{%trans "Related file:"%}</label> <span class='value'><a href='#' onclick='load_window("{% url show-file item.related_file.pk ''%}")'>{{ item.related_file }}</a></span></p>{% endif %} <!-- Displayed as Year/index/Commune/Common_name This should be a link to the file sheet of the related file --> +{% if item.related_file %}<li><label>{%trans "Related file:"%}</label> <span class='value'><a href='#' onclick='load_window("{% url show-file item.related_file.pk ''%}")'>{{ item.related_file }}</a></span></li>{% endif %} -{% field "Comment" item.comment "<pre>" "</pre>" %} +{% field_li "Comment" item.comment "<pre>" "</pre>" %} +</ul> <h3>{% trans "Localisation"%}</h3> {% if item.towns.count %}<p><label>{%trans "Towns:"%}</label> <span class='value'>{{ item.towns.all|join:", " }}</span></p>{% endif %} @@ -58,27 +60,30 @@ {% if item.is_preventive %} <h3>{% trans "Preventive archaelogical file"%}</h3> -{% if item.total_developed_surface %}<p><label>{%trans "Developed surface:"%}</label> <span class='value'>{{ item.total_developed_surface }} m<sup>2</sup> ({{ item.total_developed_surface_ha }} ha)</span></p>{% endif %} +<ul class='form-flex'> +{% if item.total_developed_surface %}<li><label>{%trans "Developed surface:"%}</label> <span class='value'>{{ item.total_developed_surface }} m<sup>2</sup> ({{ item.total_developed_surface_ha }} ha)</span></li>{% endif %} -{% field "Saisine type" item.saisine_type %} +{% field_li "Saisine type" item.saisine_type %} -{% field "Responsible for town planning service" item.responsible_town_planning_service.full_address %} +{% field_li_detail "Responsible for town planning service" item.responsible_town_planning_service %} +{% field_li "Responsible for town planning service address" item.responsible_town_planning_service.full_address %} {% if item.town_planning_service %} - {% field "Town planning service organization" item.town_planning_service.full_address %} + {% field_li "Town planning service organization" item.town_planning_service.full_address %} {% else %} - {% field "Town planning service organization" item.responsible_town_planning_service.attached_to.full_address %} + {% field_li "Town planning service organization" item.responsible_town_planning_service.attached_to.full_address %} {% endif %} -{% field "Permit type" item.permit_type %} -{% field "Permit reference" item.permit_reference %} +{% field_li "Permit type" item.permit_type %} +{% field_li "Permit reference" item.permit_reference %} -{% field "General contractor" item.general_contractor.full_address %} +{% field_li "General contractor" item.general_contractor.full_address %} {% if item.corporation_general_contractor %} - {% field "General contractor organization" item.corporation_general_contractor.full_address %} + {% field_li "General contractor organization" item.corporation_general_contractor.full_address %} {% else%} - {% field "General contractor organization" item.general_contractor.attached_to.full_address %} + {% field_li "General contractor organization" item.general_contractor.attached_to.full_address %} {% endif %} +</ul> {% else %} <h3>{% trans "Research archaeology"%}</h3> |
