summaryrefslogtreecommitdiff
path: root/archaeological_files
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2017-04-07 12:16:37 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2017-04-07 12:16:37 +0200
commit6b87dae76d931ead9838db1f66a6ff1fe1cc1dd1 (patch)
tree0a2273d9db0499214e18a041987339eac9d20ac9 /archaeological_files
parent75730c0ac55c935c03e58977405b4b8a2233595d (diff)
parent3d8b8d86f01ecb9b37e24e25fd15500b8f4fb2a0 (diff)
downloadIshtar-6b87dae76d931ead9838db1f66a6ff1fe1cc1dd1.tar.bz2
Ishtar-6b87dae76d931ead9838db1f66a6ff1fe1cc1dd1.zip
Merge branch 'master' into v0.9
Diffstat (limited to 'archaeological_files')
-rw-r--r--archaeological_files/forms.py8
-rw-r--r--archaeological_files/locale/django.pot58
-rw-r--r--archaeological_files/models.py2
-rw-r--r--archaeological_files/templates/ishtar/sheet_file.html32
4 files changed, 49 insertions, 51 deletions
diff --git a/archaeological_files/forms.py b/archaeological_files/forms.py
index 45a05b9b1..d8738f511 100644
--- a/archaeological_files/forms.py
+++ b/archaeological_files/forms.py
@@ -209,7 +209,7 @@ class FileFormGeneral(ManageOldType, forms.Form):
validators=[valid_id(Person)])
year = forms.IntegerField(label=_("Year"),
initial=lambda: datetime.datetime.now().year,
- validators=[validators.MinValueValidator(1900),
+ validators=[validators.MinValueValidator(1600),
validators.MaxValueValidator(2100)])
numeric_reference = forms.IntegerField(
label=_("Numeric reference"), widget=forms.HiddenInput, required=False)
@@ -336,10 +336,8 @@ class FileFormResearch(ManageOldType, forms.Form):
'requested_operation_type': OperationType,
'organization': Organization,
'department': Department}
- department = widgets.MultipleAutocompleteField(
- model=Department,
- label=_("Departments"),
- required=False)
+ department = widgets.Select2MultipleField(
+ model=Department, label=_("Departments"), required=False)
scientist = forms.IntegerField(
widget=widgets.JQueryAutoComplete(
reverse_lazy(
diff --git a/archaeological_files/locale/django.pot b/archaeological_files/locale/django.pot
index 1e513ae12..62dcf19ae 100644
--- a/archaeological_files/locale/django.pot
+++ b/archaeological_files/locale/django.pot
@@ -9,7 +9,7 @@
msgid ""
msgstr ""
-#: forms.py:47 forms.py:210 forms.py:255 forms.py:396 forms.py:423
+#: forms.py:47 forms.py:210 forms.py:255 forms.py:394 forms.py:421
#: models.py:108 templates/ishtar/sheet_file.html:144
msgid "Year"
msgstr ""
@@ -22,15 +22,15 @@ msgstr ""
msgid "Other reference"
msgstr ""
-#: forms.py:52 forms.py:431
+#: forms.py:52 forms.py:429
msgid "Parcel (section/number/public domain)"
msgstr ""
-#: forms.py:55 forms.py:407 forms.py:434 models.py:558
+#: forms.py:55 forms.py:405 forms.py:432 models.py:558
msgid "Department"
msgstr ""
-#: forms.py:56 forms.py:443
+#: forms.py:56 forms.py:441
msgid "File name"
msgstr ""
@@ -54,7 +54,7 @@ msgstr ""
msgid "Permit reference"
msgstr ""
-#: forms.py:63 forms.py:227 forms.py:364 models.py:180
+#: forms.py:63 forms.py:227 forms.py:362 models.py:180
#: templates/ishtar/sheet_file.html:97
msgid "Comment"
msgstr ""
@@ -63,19 +63,19 @@ msgstr ""
msgid "In charge"
msgstr ""
-#: forms.py:72 forms.py:281 forms.py:445 models.py:126
+#: forms.py:72 forms.py:281 forms.py:443 models.py:126
msgid "General contractor"
msgstr ""
-#: forms.py:79 forms.py:453
+#: forms.py:79 forms.py:451
msgid "Organization of general contractor"
msgstr ""
-#: forms.py:87 forms.py:476
+#: forms.py:87 forms.py:474
msgid "Created by"
msgstr ""
-#: forms.py:94 forms.py:484
+#: forms.py:94 forms.py:482
msgid "Modified by"
msgstr ""
@@ -169,83 +169,83 @@ msgstr ""
msgid "Research archaeology"
msgstr ""
-#: forms.py:341 models.py:183 templates/ishtar/sheet_file.html:88
+#: forms.py:340 models.py:183 templates/ishtar/sheet_file.html:88
msgid "Departments"
msgstr ""
-#: forms.py:351 models.py:192
+#: forms.py:349 models.py:192
msgid "Scientist in charge"
msgstr ""
-#: forms.py:353 models.py:186 templates/ishtar/sheet_file.html:90
+#: forms.py:351 models.py:186 templates/ishtar/sheet_file.html:90
msgid "Requested operation type"
msgstr ""
-#: forms.py:355
+#: forms.py:353
msgid "Lead organization"
msgstr ""
-#: forms.py:371 models.py:196 templates/ishtar/sheet_file.html:95
+#: forms.py:369 models.py:196 templates/ishtar/sheet_file.html:95
msgid "Classified area"
msgstr ""
-#: forms.py:373 models.py:198 templates/ishtar/sheet_file.html:96
+#: forms.py:371 models.py:198 templates/ishtar/sheet_file.html:96
msgid "Protected area"
msgstr ""
-#: forms.py:387
+#: forms.py:385
msgid "Would you like to close this archaeological file?"
msgstr ""
-#: forms.py:392
+#: forms.py:390
msgid "Would you like to delete this archaeological file ?"
msgstr ""
-#: forms.py:397 forms.py:424 forms.py:547
+#: forms.py:395 forms.py:422 forms.py:545
msgid "Index"
msgstr ""
-#: forms.py:401 forms.py:428 forms.py:533
+#: forms.py:399 forms.py:426 forms.py:531
msgid "Act type"
msgstr ""
-#: forms.py:402
+#: forms.py:400
msgid "Object (full text search)"
msgstr ""
-#: forms.py:429
+#: forms.py:427
msgid "Indexed?"
msgstr ""
-#: forms.py:435
+#: forms.py:433
msgid "Object"
msgstr ""
-#: forms.py:439
+#: forms.py:437
msgid "Signature date after"
msgstr ""
-#: forms.py:441
+#: forms.py:439
msgid "Signature date before"
msgstr ""
-#: forms.py:461
+#: forms.py:459
msgid "File numeric reference"
msgstr ""
-#: forms.py:462
+#: forms.py:460
msgid "File year"
msgstr ""
-#: forms.py:464
+#: forms.py:462
msgid "File other reference"
msgstr ""
-#: forms.py:466
+#: forms.py:464
msgid "File in charge"
msgstr ""
-#: forms.py:474
+#: forms.py:472
msgid "File permit reference"
msgstr ""
diff --git a/archaeological_files/models.py b/archaeological_files/models.py
index 7f37a298f..52f628817 100644
--- a/archaeological_files/models.py
+++ b/archaeological_files/models.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
-# Copyright (C) 2012-2016 Étienne Loks <etienne.loks_AT_peacefrogsDOTnet>
+# Copyright (C) 2012-2017 Étienne Loks <etienne.loks_AT_peacefrogsDOTnet>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
diff --git a/archaeological_files/templates/ishtar/sheet_file.html b/archaeological_files/templates/ishtar/sheet_file.html
index bfd92eb6f..9d0948660 100644
--- a/archaeological_files/templates/ishtar/sheet_file.html
+++ b/archaeological_files/templates/ishtar/sheet_file.html
@@ -25,41 +25,41 @@
{% 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 -->
+ <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_li_detail "In charge" item.in_charge %}
-<li><label>{%trans "State:"%}</label> <span class='value'>{% if item.is_active %}{%trans "Active 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 %}<li><label>{%trans "Closing date:"%}</label> <span class='value'>{{ item.closing.date }} <strong>{%trans "by" %}</strong> {{ item.closing.user.full_label }}</span></li>{% 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_li "Type" item.file_type %}
-{% 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 %}
+{% 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 %}
</ul>
{% field "Comment" item.comment "<pre>" "</pre>" %}
<h3>{% trans "Localisation"%}</h3>
-{% if item.towns.count %}<p><label>{%trans "Towns:"%}</label> <span class='value'>{{ item.towns.all|join:", " }}</span></p>{% endif %}
-{% if item.departments.count %}<p><label>{%trans "Departments:"%}</label> <span class='value'>{{ item.departments.all|join:", " }}</span></p>{% endif %}
+{% if item.towns.count %}<p><label>{%trans "Towns"%}</label> <span class='value'>{{ item.towns.all|join:", " }}</span></p>{% endif %}
+{% if item.departments.count %}<p><label>{%trans "Departments"%}</label> <span class='value'>{{ item.departments.all|join:", " }}</span></p>{% endif %}
{% if item.address %}
-<p><label>{%trans "Main address:"%}</label> <span class='value'>{{ item.address }}</span></p>
-{% if item.address_complement %}<p><label>{%trans "Complement:"%}</label> <span class='value'>{{ item.address_complement }}</span></p>{%endif%}
-{% if item.postal_code %}<p><label>{%trans "Postal code:"%}</label> <span class='value'>{{ item.postal_code }}</span></p>{%endif%}
+<p><label>{%trans "Main address"%}</label> <span class='value'>{{ item.address }}</span></p>
+{% if item.address_complement %}<p><label>{%trans "Complement"%}</label> <span class='value'>{{ item.address_complement }}</span></p>{%endif%}
+{% if item.postal_code %}<p><label>{%trans "Postal code"%}</label> <span class='value'>{{ item.postal_code }}</span></p>{%endif%}
{% endif %}
-{% if item.total_surface %}<p><label>{%trans "Surface:"%}</label> <span class='value'>{{ item.total_surface }} m<sup>2</sup> ({{ item.total_surface_ha }} ha)</span></p>{%endif%}
+{% if item.total_surface %}<p><label>{%trans "Surface"%}</label> <span class='value'>{{ item.total_surface }} m<sup>2</sup> ({{ item.total_surface_ha }} ha)</span></p>{%endif%}
{% if item.is_preventive %}
<h3>{% trans "Preventive archaeological file"%}</h3>
<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 %}
+{% 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_li "Saisine type" item.saisine_type %}
@@ -85,16 +85,16 @@
{% else %}
<h3>{% trans "Research archaeology"%}</h3>
-{% if item.departments.count %}<p><label>{%trans "Departments"%}{%trans ":"%}</label> <span class='value'>{% for department in item.departments.all %}{% if forloop.counter0 %}, {% endif %}{{ department }}{% endfor %}</span></p>{% endif %}
-{% if item.scientist %}<p><label>{%trans "Head scientist"%}{%trans ":"%}</label> <span class='value'>{{ item.scientist }}</span></p>{% endif %}
-{% if item.requested_operation_type %}<p><label>{%trans "Requested operation type"%}{%trans ":"%}</label> <span class='value'>{{ item.requested_operation_type }}</span></p>{% endif %}
-{% if item.organization %}<p><label>{%trans "Organization"%}{%trans ":"%}</label> <span class='value'>{{ item.organization }}</span></p>{% endif %}
+{% if item.departments.count %}<p><label>{%trans "Departments"%}</label> <span class='value'>{% for department in item.departments.all %}{% if forloop.counter0 %}, {% endif %}{{ department }}{% endfor %}</span></p>{% endif %}
+{% if item.scientist %}<p><label>{%trans "Head scientist"%}</label> <span class='value'>{{ item.scientist }}</span></p>{% endif %}
+{% if item.requested_operation_type %}<p><label>{%trans "Requested operation type"%}</label> <span class='value'>{{ item.requested_operation_type }}</span></p>{% endif %}
+{% if item.organization %}<p><label>{%trans "Organization"%}</label> <span class='value'>{{ item.organization }}</span></p>{% endif %}
{% if item.cira_advised != None %}<p><label>Passage en CIRA</label> <span class='value'>{{ item.cira_advised|yesno }}</span></p>{% endif %}
{% if item.mh_register != None %}<p><label>Sur Monument Historique classé</label> <span class='value'>{{ item.mh_register|yesno }}</span></p>{% endif %}
{% if item.mh_listing != None %}<p><label>Sur Monument Historique inscrit</label> <span class='value'>{{ item.mh_listing|yesno }}</span></p>{% endif %}
{% if item.classified_area != None %}<p><label>{% trans "Classified area" %}</label> <span class='value'>{{ item.classified_area|yesno }}</span></p>{% endif %}
{% if item.protected_area != None %}<p><label>{% trans "Protected area" %}</label> <span class='value'>{{ item.protected_area|yesno }}</span></p>{% endif %}
-{% if item.research_comment %}<p><label>{%trans "Comment"%}{%trans ":"%}</label> <span class='value'>{{ item.research_comment }}</span></p>{% endif %}
+{% if item.research_comment %}<p><label>{%trans "Comment"%}</label> <span class='value'>{{ item.research_comment }}</span></p>{% endif %}
{% endif %}