summaryrefslogtreecommitdiff
path: root/archaeological_finds
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2017-03-09 23:08:51 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2017-03-09 23:08:51 +0100
commitc2d86b659a9ad00b1e2cb0485e1310504c8fd03c (patch)
treed95d1ca9e9971b465f235cbb86091cd2cf3c7325 /archaeological_finds
parent1c381564ea9ed133f73e0b330468b204e7a034f1 (diff)
parent53f0a5c95c34c0db67528422583dc3e90f20f705 (diff)
downloadIshtar-c2d86b659a9ad00b1e2cb0485e1310504c8fd03c.tar.bz2
Ishtar-c2d86b659a9ad00b1e2cb0485e1310504c8fd03c.zip
Merge branch 'master' into v0.9
Diffstat (limited to 'archaeological_finds')
-rw-r--r--archaeological_finds/forms.py2
-rw-r--r--archaeological_finds/locale/django.pot172
-rw-r--r--archaeological_finds/models_finds.py3
-rw-r--r--archaeological_finds/templates/ishtar/sheet_find.html27
4 files changed, 108 insertions, 96 deletions
diff --git a/archaeological_finds/forms.py b/archaeological_finds/forms.py
index 7688b2340..2c367043c 100644
--- a/archaeological_finds/forms.py
+++ b/archaeological_finds/forms.py
@@ -363,7 +363,7 @@ class FindSelect(TableSelect):
base_finds__batch = forms.ChoiceField(
label=_(u"Batch/object"), choices=[])
checked = forms.ChoiceField(label=_("Check"))
- image = forms.NullBooleanField(label=_(u"Has an image?"))
+ image__isnull = forms.NullBooleanField(label=_(u"Has an image?"))
def __init__(self, *args, **kwargs):
super(FindSelect, self).__init__(*args, **kwargs)
diff --git a/archaeological_finds/locale/django.pot b/archaeological_finds/locale/django.pot
index e8b1fee1f..002da929e 100644
--- a/archaeological_finds/locale/django.pot
+++ b/archaeological_finds/locale/django.pot
@@ -11,23 +11,23 @@ msgstr ""
msgid "Context record"
msgstr ""
-#: forms.py:123 ishtar_menu.py:32 models_finds.py:655 models_finds.py:1058
-#: models_finds.py:1067 models_treatments.py:279
+#: forms.py:123 ishtar_menu.py:32 models_finds.py:656 models_finds.py:1059
+#: models_finds.py:1068 models_treatments.py:279
#: templates/ishtar/sheet_find.html:5
msgid "Find"
msgstr ""
#: forms.py:137 forms.py:330 forms.py:559 models_finds.py:151
-#: models_finds.py:586
+#: models_finds.py:587
msgid "Free ID"
msgstr ""
-#: forms.py:139 models_finds.py:638
+#: forms.py:139 models_finds.py:639
msgid "Previous ID"
msgstr ""
#: forms.py:140 forms.py:362 forms_treatments.py:134 models_finds.py:155
-#: models_finds.py:587 models_treatments.py:125
+#: models_finds.py:588 models_treatments.py:125
msgid "Description"
msgstr ""
@@ -35,7 +35,7 @@ msgstr ""
msgid "Batch/object"
msgstr ""
-#: forms.py:145 models_finds.py:615
+#: forms.py:145 models_finds.py:616
msgid "Is complete?"
msgstr ""
@@ -43,15 +43,15 @@ msgstr ""
msgid "Material type"
msgstr ""
-#: forms.py:149 forms.py:356 models_finds.py:63 models_finds.py:591
+#: forms.py:149 forms.py:356 models_finds.py:63 models_finds.py:592
msgid "Conservatory state"
msgstr ""
-#: forms.py:152 models_finds.py:593
+#: forms.py:152 models_finds.py:594
msgid "Conservatory comment"
msgstr ""
-#: forms.py:155 models_finds.py:113 models_finds.py:618
+#: forms.py:155 models_finds.py:113 models_finds.py:619
msgid "Object types"
msgstr ""
@@ -59,11 +59,11 @@ msgstr ""
msgid "Preservation type"
msgstr ""
-#: forms.py:160 forms.py:358 models_finds.py:620
+#: forms.py:160 forms.py:358 models_finds.py:621
msgid "Integrity / interest"
msgstr ""
-#: forms.py:163 forms.py:360 models_finds.py:623
+#: forms.py:163 forms.py:360 models_finds.py:624
msgid "Remarkability"
msgstr ""
@@ -99,69 +99,69 @@ msgstr ""
msgid "Estimated error for Z"
msgstr ""
-#: forms.py:181 models_finds.py:627
+#: forms.py:181 models_finds.py:628
msgid "Length (cm)"
msgstr ""
-#: forms.py:182 models_finds.py:628
+#: forms.py:182 models_finds.py:629
msgid "Width (cm)"
msgstr ""
-#: forms.py:183 models_finds.py:629
+#: forms.py:183 models_finds.py:630
msgid "Height (cm)"
msgstr ""
-#: forms.py:184 models_finds.py:630
+#: forms.py:184 models_finds.py:631
msgid "Diameter (cm)"
msgstr ""
-#: forms.py:185 models_finds.py:631
+#: forms.py:185 models_finds.py:632
msgid "Thickness (cm)"
msgstr ""
-#: forms.py:186 forms.py:564 models_finds.py:598
+#: forms.py:186 forms.py:564 models_finds.py:599
msgid "Volume (l)"
msgstr ""
-#: forms.py:187 forms.py:565 models_finds.py:599
+#: forms.py:187 forms.py:565 models_finds.py:600
msgid "Weight (g)"
msgstr ""
-#: forms.py:189 models_finds.py:632
+#: forms.py:189 models_finds.py:633
msgid "Dimensions comment"
msgstr ""
-#: forms.py:190 forms.py:566 models_finds.py:602
+#: forms.py:190 forms.py:566 models_finds.py:603
msgid "Find number"
msgstr ""
-#: forms.py:192 models_finds.py:626
+#: forms.py:192 models_finds.py:627
msgid "Minimum number of individuals (MNI)"
msgstr ""
-#: forms.py:193 models_finds.py:634
+#: forms.py:193 models_finds.py:635
msgid "Mark"
msgstr ""
-#: forms.py:194 forms.py:365 models_finds.py:640
+#: forms.py:194 forms.py:365 models_finds.py:641
msgid "Check"
msgstr ""
-#: forms.py:196 models_finds.py:642
+#: forms.py:196 models_finds.py:643
msgid "Check date"
msgstr ""
#: forms.py:197 forms_treatments.py:132 forms_treatments.py:434
-#: models_finds.py:156 models_finds.py:635 models_treatments.py:124
+#: models_finds.py:156 models_finds.py:636 models_treatments.py:124
#: models_treatments.py:492
msgid "Comment"
msgstr ""
-#: forms.py:200 models_finds.py:636
+#: forms.py:200 models_finds.py:637
msgid "Comment on dating"
msgstr ""
-#: forms.py:201 models_finds.py:644
+#: forms.py:201 models_finds.py:645
msgid "Estimated value"
msgstr ""
@@ -184,7 +184,7 @@ msgstr ""
msgid "Coordinates are not relevant for the spatial reference system used: {}."
msgstr ""
-#: forms.py:293 forms.py:324 models_finds.py:610
+#: forms.py:293 forms.py:324 models_finds.py:611
msgid "Dating"
msgstr ""
@@ -193,13 +193,13 @@ msgid "Period"
msgstr ""
#: forms.py:299 forms_treatments.py:138 forms_treatments.py:436
-#: models_finds.py:1072 models_treatments.py:127 models_treatments.py:290
-#: templates/ishtar/sheet_find.html:100 templates/ishtar/sheet_find.html:142
+#: models_finds.py:1073 models_treatments.py:127 models_treatments.py:290
+#: templates/ishtar/sheet_find.html:103 templates/ishtar/sheet_find.html:145
msgid "Start date"
msgstr ""
-#: forms.py:301 models_finds.py:1073 models_treatments.py:291
-#: templates/ishtar/sheet_find.html:101 templates/ishtar/sheet_find.html:143
+#: forms.py:301 models_finds.py:1074 models_treatments.py:291
+#: templates/ishtar/sheet_find.html:104 templates/ishtar/sheet_find.html:146
msgid "End date"
msgstr ""
@@ -261,7 +261,7 @@ msgstr ""
msgid "Upstream finds"
msgstr ""
-#: forms.py:443 models_finds.py:656
+#: forms.py:443 models_finds.py:657
msgid "Finds"
msgstr ""
@@ -334,7 +334,7 @@ msgid "Basket"
msgstr ""
#: forms_treatments.py:52 forms_treatments.py:92 models_treatments.py:96
-#: templates/ishtar/sheet_find.html:94 templates/ishtar/sheet_find.html:136
+#: templates/ishtar/sheet_find.html:97 templates/ishtar/sheet_find.html:139
msgid "Label"
msgstr ""
@@ -364,7 +364,7 @@ msgid "Base treatment"
msgstr ""
#: forms_treatments.py:103 models_treatments.py:109
-#: templates/ishtar/sheet_find.html:96 templates/ishtar/sheet_find.html:138
+#: templates/ishtar/sheet_find.html:99 templates/ishtar/sheet_find.html:141
msgid "State"
msgstr ""
@@ -513,8 +513,8 @@ msgid "Internal ref."
msgstr ""
#: forms_treatments.py:358 forms_treatments.py:415
-#: templates/ishtar/sheet_find.html:95 templates/ishtar/sheet_find.html:137
-#: templates/ishtar/sheet_find.html:229
+#: templates/ishtar/sheet_find.html:98 templates/ishtar/sheet_find.html:140
+#: templates/ishtar/sheet_find.html:232
msgid "Type"
msgstr ""
@@ -611,12 +611,12 @@ msgstr ""
msgid "Documentation"
msgstr ""
-#: ishtar_menu.py:133 ishtar_menu.py:214 models_finds.py:1069
+#: ishtar_menu.py:133 ishtar_menu.py:214 models_finds.py:1070
msgid "Administrative act"
msgstr ""
-#: ishtar_menu.py:151 ishtar_menu.py:233 templates/ishtar/sheet_find.html:224
-#: templates/ishtar/sheet_find.html:226
+#: ishtar_menu.py:151 ishtar_menu.py:233 templates/ishtar/sheet_find.html:227
+#: templates/ishtar/sheet_find.html:229
msgid "Documents"
msgstr ""
@@ -645,7 +645,7 @@ msgstr ""
msgid "Parent material"
msgstr ""
-#: models_finds.py:52 models_finds.py:507 models_finds.py:589
+#: models_finds.py:52 models_finds.py:507 models_finds.py:590
msgid "Material types"
msgstr ""
@@ -677,7 +677,7 @@ msgstr ""
msgid "Remarkability types"
msgstr ""
-#: models_finds.py:98 models_finds.py:585 models_treatments.py:40
+#: models_finds.py:98 models_finds.py:586 models_treatments.py:40
#: models_treatments.py:285
msgid "Order"
msgstr ""
@@ -694,12 +694,12 @@ msgstr ""
msgid "Parent"
msgstr ""
-#: models_finds.py:152 models_finds.py:582 models_treatments.py:122
+#: models_finds.py:152 models_finds.py:583 models_treatments.py:122
#: models_treatments.py:469
msgid "External ID"
msgstr ""
-#: models_finds.py:154 models_finds.py:584
+#: models_finds.py:154 models_finds.py:585
msgid "External ID is set automatically"
msgstr ""
@@ -739,7 +739,7 @@ msgstr ""
msgid "Cached value - do not edit"
msgstr ""
-#: models_finds.py:197 models_finds.py:580
+#: models_finds.py:197 models_finds.py:581
msgid "Base find"
msgstr ""
@@ -791,9 +791,9 @@ msgstr ""
msgid "Periods"
msgstr ""
-#: models_finds.py:506 models_finds.py:613 models_treatments.py:129
-#: models_treatments.py:293 templates/ishtar/sheet_find.html:99
-#: templates/ishtar/sheet_find.html:141
+#: models_finds.py:506 models_finds.py:614 models_treatments.py:129
+#: models_treatments.py:293 templates/ishtar/sheet_find.html:102
+#: templates/ishtar/sheet_find.html:144
msgid "Container"
msgstr ""
@@ -825,71 +825,71 @@ msgstr ""
msgid "Base find - Discovery date"
msgstr ""
-#: models_finds.py:596
+#: models_finds.py:597
msgid "Type of preservation to consider"
msgstr ""
-#: models_finds.py:600
+#: models_finds.py:601
msgid "Weight unit"
msgstr ""
-#: models_finds.py:606 templates/ishtar/sheet_find.html:87
+#: models_finds.py:607 templates/ishtar/sheet_find.html:90
msgid "Upstream treatment"
msgstr ""
-#: models_finds.py:609 templates/ishtar/sheet_find.html:129
+#: models_finds.py:610 templates/ishtar/sheet_find.html:132
msgid "Downstream treatment"
msgstr ""
-#: models_finds.py:647
+#: models_finds.py:648
msgid "Collection"
msgstr ""
-#: models_finds.py:649 models_treatments.py:141 models_treatments.py:493
+#: models_finds.py:650 models_treatments.py:141 models_treatments.py:493
msgid "Cached name"
msgstr ""
-#: models_finds.py:658
+#: models_finds.py:659
msgid "Can view all Finds"
msgstr ""
-#: models_finds.py:659
+#: models_finds.py:660
msgid "Can view own Find"
msgstr ""
-#: models_finds.py:660
+#: models_finds.py:661
msgid "Can add own Find"
msgstr ""
-#: models_finds.py:661
+#: models_finds.py:662
msgid "Can change own Find"
msgstr ""
-#: models_finds.py:662
+#: models_finds.py:663
msgid "Can delete own Find"
msgstr ""
-#: models_finds.py:668
+#: models_finds.py:669
msgid "FIND"
msgstr ""
-#: models_finds.py:1056
+#: models_finds.py:1057
msgid "Find documentation"
msgstr ""
-#: models_finds.py:1057
+#: models_finds.py:1058
msgid "Find documentations"
msgstr ""
-#: models_finds.py:1070
+#: models_finds.py:1071
msgid "Person"
msgstr ""
-#: models_finds.py:1076
+#: models_finds.py:1077
msgid "Property"
msgstr ""
-#: models_finds.py:1077
+#: models_finds.py:1078
msgid "Properties"
msgstr ""
@@ -957,7 +957,7 @@ msgstr ""
msgid "Target a basket"
msgstr ""
-#: models_treatments.py:146 templates/ishtar/sheet_find.html:84
+#: models_treatments.py:146 templates/ishtar/sheet_find.html:87
#: templates/ishtar/sheet_treatmentfile.html:45
msgid "Treatments"
msgstr ""
@@ -986,8 +986,8 @@ msgstr ""
msgid "TREATMENT"
msgstr ""
-#: models_treatments.py:294 templates/ishtar/sheet_find.html:98
-#: templates/ishtar/sheet_find.html:140
+#: models_treatments.py:294 templates/ishtar/sheet_find.html:101
+#: templates/ishtar/sheet_find.html:143
msgid "Doer"
msgstr ""
@@ -1179,59 +1179,67 @@ msgstr ""
msgid "Operation"
msgstr ""
-#: templates/ishtar/sheet_find.html:76
+#: templates/ishtar/sheet_find.html:24
+msgid "Creation:"
+msgstr ""
+
+#: templates/ishtar/sheet_find.html:31
+msgid "Modification:"
+msgstr ""
+
+#: templates/ishtar/sheet_find.html:79
msgid "Warehouse"
msgstr ""
-#: templates/ishtar/sheet_find.html:93 templates/ishtar/sheet_find.html:135
+#: templates/ishtar/sheet_find.html:96 templates/ishtar/sheet_find.html:138
msgid "Year - index"
msgstr ""
-#: templates/ishtar/sheet_find.html:97 templates/ishtar/sheet_find.html:139
+#: templates/ishtar/sheet_find.html:100 templates/ishtar/sheet_find.html:142
msgid "Related finds (max. 15 displayed)"
msgstr ""
-#: templates/ishtar/sheet_find.html:125
+#: templates/ishtar/sheet_find.html:128
msgid "Export as CSV"
msgstr ""
-#: templates/ishtar/sheet_find.html:125 templates/ishtar/sheet_find.html:168
+#: templates/ishtar/sheet_find.html:128 templates/ishtar/sheet_find.html:171
msgid "CSV"
msgstr ""
-#: templates/ishtar/sheet_find.html:173
+#: templates/ishtar/sheet_find.html:176
msgid "Associated base finds"
msgstr ""
-#: templates/ishtar/sheet_find.html:205
+#: templates/ishtar/sheet_find.html:208
msgid "Coordinates:"
msgstr ""
-#: templates/ishtar/sheet_find.html:207
+#: templates/ishtar/sheet_find.html:210
msgid "X:"
msgstr ""
-#: templates/ishtar/sheet_find.html:208
+#: templates/ishtar/sheet_find.html:211
msgid "Y:"
msgstr ""
-#: templates/ishtar/sheet_find.html:209
+#: templates/ishtar/sheet_find.html:212
msgid "Z:"
msgstr ""
-#: templates/ishtar/sheet_find.html:212
+#: templates/ishtar/sheet_find.html:215
msgid "SRID:"
msgstr ""
-#: templates/ishtar/sheet_find.html:228
+#: templates/ishtar/sheet_find.html:231
msgid "Title"
msgstr ""
-#: templates/ishtar/sheet_find.html:230
+#: templates/ishtar/sheet_find.html:233
msgid "Authors"
msgstr ""
-#: templates/ishtar/sheet_find.html:231
+#: templates/ishtar/sheet_find.html:234
msgid "Link"
msgstr ""
diff --git a/archaeological_finds/models_finds.py b/archaeological_finds/models_finds.py
index bf5ba6380..5c28d1a69 100644
--- a/archaeological_finds/models_finds.py
+++ b/archaeological_finds/models_finds.py
@@ -562,7 +562,8 @@ class Find(BaseHistorizedItem, ImageModel, OwnPerms, ShortMenuItem):
'base_finds__batch': 'base_finds__batch',
'basket': 'basket',
'cached_label': 'cached_label__icontains',
- 'image': 'image__isnull'}
+ 'image__isnull': 'image__isnull',
+ }
EXTRA_REQUEST_KEYS.update(
dict(
[(key, key) for key in TABLE_COLS
diff --git a/archaeological_finds/templates/ishtar/sheet_find.html b/archaeological_finds/templates/ishtar/sheet_find.html
index a6a0ccf69..b088f3161 100644
--- a/archaeological_finds/templates/ishtar/sheet_find.html
+++ b/archaeological_finds/templates/ishtar/sheet_find.html
@@ -20,18 +20,21 @@
<ul class='form-flex'>
{% field_li "Previous ID" item.previous_id %}
-{% with item.history_creation_date|date:"SHORT_DATETIME_FORMAT" as creation_date %}
-{% with item.history_creator.ishtaruser.full_label|add:"<br/><i>"|add:creation_date|add:"</i>" as creator %}
-{% field_li "Created by" creator|safe %}
-{% endwith %}
-{% endwith %}
-{% if item.history_creation_date != item.last_edition_date %}
-{% with item.last_edition_date|date:"SHORT_DATETIME_FORMAT" as edition_date %}
-{% with item.history_modifier.ishtaruser.full_label|add:"<br/><i>"|add:edition_date|add:"</i>" as modifier %}
-{% field_li "Last modified by" modifier|safe %}
-{% endwith %}
-{% endwith %}
-{% endif %}
+
+ <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 "Administrative index" item.administrative_index %}
{% field_li_multiple "Material types" item.material_types %}
{% field_li "Dating" item.dating %}