summaryrefslogtreecommitdiff
path: root/archaeological_files
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2017-03-21 23:53:23 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2017-03-21 23:53:23 +0100
commit9eacb3f2b2f5819ef3eea1a54bb2c4bfb13efda6 (patch)
tree2a2b687acef6f878c05f7148a150c10c3a7fb71a /archaeological_files
parent8eb09a666e7048ce8e531649566418670d94036d (diff)
parentc00bb6298a602f74c55cfd60b8601295470a8e3b (diff)
downloadIshtar-9eacb3f2b2f5819ef3eea1a54bb2c4bfb13efda6.tar.bz2
Ishtar-9eacb3f2b2f5819ef3eea1a54bb2c4bfb13efda6.zip
Merge branch 'master' into v0.9
Conflicts: Makefile.example archaeological_operations/migrations/0061_regenerate_cached_label.py archaeological_warehouse/migrations/0024_generate_cache_lbl_for_containers.py
Diffstat (limited to 'archaeological_files')
-rw-r--r--archaeological_files/locale/django.pot96
-rw-r--r--archaeological_files/models.py5
-rw-r--r--archaeological_files/templates/ishtar/sheet_file.html27
3 files changed, 56 insertions, 72 deletions
diff --git a/archaeological_files/locale/django.pot b/archaeological_files/locale/django.pot
index 966c983c8..1e513ae12 100644
--- a/archaeological_files/locale/django.pot
+++ b/archaeological_files/locale/django.pot
@@ -10,7 +10,7 @@ msgid ""
msgstr ""
#: forms.py:47 forms.py:210 forms.py:255 forms.py:396 forms.py:423
-#: models.py:108 templates/ishtar/sheet_file.html:157
+#: models.py:108 templates/ishtar/sheet_file.html:144
msgid "Year"
msgstr ""
@@ -26,7 +26,7 @@ msgstr ""
msgid "Parcel (section/number/public domain)"
msgstr ""
-#: forms.py:55 forms.py:407 forms.py:434 models.py:553
+#: forms.py:55 forms.py:407 forms.py:434 models.py:558
msgid "Department"
msgstr ""
@@ -55,11 +55,11 @@ msgid "Permit reference"
msgstr ""
#: forms.py:63 forms.py:227 forms.py:364 models.py:180
-#: templates/ishtar/sheet_file.html:110
+#: templates/ishtar/sheet_file.html:97
msgid "Comment"
msgstr ""
-#: forms.py:65 templates/ishtar/sheet_file.html:130
+#: forms.py:65 templates/ishtar/sheet_file.html:117
msgid "In charge"
msgstr ""
@@ -115,7 +115,7 @@ msgstr ""
msgid "Date before"
msgstr ""
-#: forms.py:197 templates/ishtar/sheet_file.html:14
+#: forms.py:197 templates/ishtar/sheet_file.html:19
msgid "General"
msgstr ""
@@ -164,12 +164,12 @@ msgstr ""
msgid "Total developed surface (m2)"
msgstr ""
-#: forms.py:333 templates/ishtar/sheet_file.html:100
+#: forms.py:333 templates/ishtar/sheet_file.html:87
#: templates/ishtar/dashboards/dashboard_file.html:45
msgid "Research archaeology"
msgstr ""
-#: forms.py:341 models.py:183 templates/ishtar/sheet_file.html:101
+#: forms.py:341 models.py:183 templates/ishtar/sheet_file.html:88
msgid "Departments"
msgstr ""
@@ -177,7 +177,7 @@ msgstr ""
msgid "Scientist in charge"
msgstr ""
-#: forms.py:353 models.py:186 templates/ishtar/sheet_file.html:103
+#: forms.py:353 models.py:186 templates/ishtar/sheet_file.html:90
msgid "Requested operation type"
msgstr ""
@@ -185,11 +185,11 @@ msgstr ""
msgid "Lead organization"
msgstr ""
-#: forms.py:371 models.py:196 templates/ishtar/sheet_file.html:108
+#: forms.py:371 models.py:196 templates/ishtar/sheet_file.html:95
msgid "Classified area"
msgstr ""
-#: forms.py:373 models.py:198 templates/ishtar/sheet_file.html:109
+#: forms.py:373 models.py:198 templates/ishtar/sheet_file.html:96
msgid "Protected area"
msgstr ""
@@ -363,7 +363,7 @@ msgstr ""
msgid "Main address - postal code"
msgstr ""
-#: models.py:188 templates/ishtar/sheet_file.html:104
+#: models.py:188 templates/ishtar/sheet_file.html:91
msgid "Organization"
msgstr ""
@@ -407,15 +407,15 @@ msgstr ""
msgid "FILE"
msgstr ""
-#: models.py:413
+#: models.py:418
msgid "Multi-town"
msgstr ""
-#: models.py:419
+#: models.py:424
msgid "No town"
msgstr ""
-#: models.py:552
+#: models.py:557
msgid "File"
msgstr ""
@@ -455,7 +455,7 @@ msgstr ""
msgid "File: administrative act deletion"
msgstr ""
-#: wizards.py:124 templates/ishtar/sheet_file.html:122
+#: wizards.py:124 templates/ishtar/sheet_file.html:109
msgid "Associated operations"
msgstr ""
@@ -471,122 +471,114 @@ msgstr ""
msgid "Generate"
msgstr ""
-#: templates/ishtar/sheet_file.html:23
-msgid "Creation:"
-msgstr ""
-
-#: templates/ishtar/sheet_file.html:30
-msgid "Modification:"
-msgstr ""
-
-#: templates/ishtar/sheet_file.html:47
+#: templates/ishtar/sheet_file.html:34
msgid "State:"
msgstr ""
-#: templates/ishtar/sheet_file.html:47
+#: templates/ishtar/sheet_file.html:34
msgid "Active file"
msgstr ""
-#: templates/ishtar/sheet_file.html:48
+#: templates/ishtar/sheet_file.html:35
msgid "Closed file"
msgstr ""
-#: templates/ishtar/sheet_file.html:50
+#: templates/ishtar/sheet_file.html:37
msgid "Closing date:"
msgstr ""
-#: templates/ishtar/sheet_file.html:50
+#: templates/ishtar/sheet_file.html:37
msgid "by"
msgstr ""
-#: templates/ishtar/sheet_file.html:55
+#: templates/ishtar/sheet_file.html:42
msgid "Related file:"
msgstr ""
-#: templates/ishtar/sheet_file.html:60
+#: templates/ishtar/sheet_file.html:47
msgid "Localisation"
msgstr ""
-#: templates/ishtar/sheet_file.html:61
+#: templates/ishtar/sheet_file.html:48
msgid "Towns:"
msgstr ""
-#: templates/ishtar/sheet_file.html:62
+#: templates/ishtar/sheet_file.html:49
msgid "Departments:"
msgstr ""
-#: templates/ishtar/sheet_file.html:64
+#: templates/ishtar/sheet_file.html:51
msgid "Main address:"
msgstr ""
-#: templates/ishtar/sheet_file.html:65
+#: templates/ishtar/sheet_file.html:52
msgid "Complement:"
msgstr ""
-#: templates/ishtar/sheet_file.html:66
+#: templates/ishtar/sheet_file.html:53
msgid "Postal code:"
msgstr ""
-#: templates/ishtar/sheet_file.html:68
+#: templates/ishtar/sheet_file.html:55
msgid "Surface:"
msgstr ""
-#: templates/ishtar/sheet_file.html:73
+#: templates/ishtar/sheet_file.html:60
msgid "Preventive archaeological file"
msgstr ""
-#: templates/ishtar/sheet_file.html:75
+#: templates/ishtar/sheet_file.html:62
msgid "Developed surface:"
msgstr ""
-#: templates/ishtar/sheet_file.html:101 templates/ishtar/sheet_file.html:102
-#: templates/ishtar/sheet_file.html:103 templates/ishtar/sheet_file.html:104
-#: templates/ishtar/sheet_file.html:110
+#: templates/ishtar/sheet_file.html:88 templates/ishtar/sheet_file.html:89
+#: templates/ishtar/sheet_file.html:90 templates/ishtar/sheet_file.html:91
+#: templates/ishtar/sheet_file.html:97
#: templates/ishtar/dashboards/dashboard_file.html:14
msgid ":"
msgstr ""
-#: templates/ishtar/sheet_file.html:102
+#: templates/ishtar/sheet_file.html:89
msgid "Head scientist"
msgstr ""
-#: templates/ishtar/sheet_file.html:116
+#: templates/ishtar/sheet_file.html:103
msgid "Associated parcels"
msgstr ""
-#: templates/ishtar/sheet_file.html:119
+#: templates/ishtar/sheet_file.html:106
msgid "Administrative acts"
msgstr ""
-#: templates/ishtar/sheet_file.html:127 templates/ishtar/sheet_file.html:158
+#: templates/ishtar/sheet_file.html:114 templates/ishtar/sheet_file.html:145
msgid "Ref."
msgstr ""
-#: templates/ishtar/sheet_file.html:129 templates/ishtar/sheet_file.html:159
+#: templates/ishtar/sheet_file.html:116 templates/ishtar/sheet_file.html:146
msgid "Type"
msgstr ""
-#: templates/ishtar/sheet_file.html:131
+#: templates/ishtar/sheet_file.html:118
msgid "Start date"
msgstr ""
-#: templates/ishtar/sheet_file.html:132
+#: templates/ishtar/sheet_file.html:119
msgid "Excavation end date"
msgstr ""
-#: templates/ishtar/sheet_file.html:146
+#: templates/ishtar/sheet_file.html:133
msgid "No operation associated to this archaeological file"
msgstr ""
-#: templates/ishtar/sheet_file.html:152
+#: templates/ishtar/sheet_file.html:139
msgid "Admninistrative acts linked to associated operations"
msgstr ""
-#: templates/ishtar/sheet_file.html:160
+#: templates/ishtar/sheet_file.html:147
msgid "Date"
msgstr ""
-#: templates/ishtar/sheet_file.html:170
+#: templates/ishtar/sheet_file.html:157
msgid "No administrative act linked to operations"
msgstr ""
diff --git a/archaeological_files/models.py b/archaeological_files/models.py
index c8134f28f..7f37a298f 100644
--- a/archaeological_files/models.py
+++ b/archaeological_files/models.py
@@ -236,6 +236,11 @@ class File(ClosedItem, BaseHistorizedItem, OwnPerms, ValueGetter,
return _(u"FILE")
@property
+ def full_internal_ref(self):
+ return u"{}{}".format(settings.ISHTAR_FILE_PREFIX or '',
+ self.external_id or '')
+
+ @property
def delay_date(self):
cache_key, val = get_cache(self.__class__, [self.pk, 'delay_date'])
if val:
diff --git a/archaeological_files/templates/ishtar/sheet_file.html b/archaeological_files/templates/ishtar/sheet_file.html
index 408edde34..bfd92eb6f 100644
--- a/archaeological_files/templates/ishtar/sheet_file.html
+++ b/archaeological_files/templates/ishtar/sheet_file.html
@@ -11,29 +11,16 @@
{% window_nav item window_id 'show-file' 'file_modify' 'show-historized-file' 'revert-file' previous next 1 %}
{% 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" %}
+
<h3>{% trans "General"%}</h3>
<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 %}
- {% field_li "Reception date" item.reception_date|date:"DATE_FORMAT" %}
-
- <li><label>{%trans "Creation:"%}</label>
- <span class='value'>
- {{item.history_creator.ishtaruser.person}}<br/>
- <small><em>{{item.history_creation_date|date:"DATETIME_FORMAT"}}</em></small>
- </span>
- </li>
- {% if item.history_creation_date != item.last_edition_date %}
- <li><label>{%trans "Modification:"%}</label>
- <span class='value'>
- {{item.history_modifier.ishtaruser.person}}<br/>
- <small><em>{% firstof item.history_date|date:"DATETIME_FORMAT" item.history.all.0.history_date|date:"DATETIME_FORMAT" %}</em></small>
- </span>
- </li>
- {% endif %}
+ {% field_li "Reception date" item.reception_date|date:"DATE_FORMAT" %}
+ {% include "ishtar/blocks/sheet_creation_section.html" %}
{% comment %}