diff options
Diffstat (limited to 'archaeological_finds')
| -rw-r--r-- | archaeological_finds/forms.py | 8 | ||||
| -rw-r--r-- | archaeological_finds/locale/django.pot | 86 | ||||
| -rw-r--r-- | archaeological_finds/views.py | 8 |
3 files changed, 59 insertions, 43 deletions
diff --git a/archaeological_finds/forms.py b/archaeological_finds/forms.py index d61704259..1498d4028 100644 --- a/archaeological_finds/forms.py +++ b/archaeological_finds/forms.py @@ -29,7 +29,7 @@ from django.utils.safestring import mark_safe from django.utils.translation import ugettext_lazy as _ from ishtar_common.models import Person, valid_id, valid_ids -from archaeological_operations.models import Period +from archaeological_operations.models import Period, ArchaeologicalSite from archaeological_context_records.models import DatingType, DatingQuality from archaeological_warehouse.models import Warehouse import models @@ -153,6 +153,12 @@ class FindSelect(TableSelect): label=_(u"Year")) base_finds__context_record__operation__code_patriarche = \ forms.IntegerField(label=_(u"Code PATRIARCHE")) + archaeological_sites = forms.IntegerField( + label=_("Archaelogical site"), + widget=widgets.JQueryAutoComplete( + reverse_lazy('autocomplete-archaeologicalsite'), + associated_model=ArchaeologicalSite), + validators=[valid_id(ArchaeologicalSite)]) datings__period = forms.ChoiceField(label=_(u"Period"), choices=[]) # TODO search by warehouse material_types = forms.ChoiceField(label=_(u"Material type"), choices=[]) diff --git a/archaeological_finds/locale/django.pot b/archaeological_finds/locale/django.pot index 688d732f9..ff9f8a546 100644 --- a/archaeological_finds/locale/django.pot +++ b/archaeological_finds/locale/django.pot @@ -12,7 +12,7 @@ msgstr "" msgid "Find" msgstr "" -#: forms.py:54 forms.py:289 models.py:108 models.py:288 +#: forms.py:54 forms.py:295 models.py:108 models.py:288 msgid "Free-ID" msgstr "" @@ -20,12 +20,12 @@ msgstr "" msgid "Previous ID" msgstr "" -#: forms.py:57 forms.py:165 forms.py:229 models.py:111 models.py:289 +#: forms.py:57 forms.py:171 forms.py:235 models.py:111 models.py:289 #: models.py:565 templates/ishtar/sheet_find.html:87 msgid "Description" msgstr "" -#: forms.py:60 forms.py:167 models.py:122 +#: forms.py:60 forms.py:173 models.py:122 msgid "Batch/object" msgstr "" @@ -33,11 +33,11 @@ msgstr "" msgid "Is complete?" msgstr "" -#: forms.py:65 forms.py:158 forms.py:293 models.py:50 +#: forms.py:65 forms.py:164 forms.py:299 models.py:50 msgid "Material type" msgstr "" -#: forms.py:66 forms.py:162 models.py:60 models.py:293 +#: forms.py:66 forms.py:168 models.py:60 models.py:293 msgid "Conservatory state" msgstr "" @@ -45,11 +45,11 @@ msgstr "" msgid "Object types" msgstr "" -#: forms.py:71 forms.py:161 models.py:67 +#: forms.py:71 forms.py:167 models.py:67 msgid "Preservation type" msgstr "" -#: forms.py:74 forms.py:164 models.py:321 +#: forms.py:74 forms.py:170 models.py:321 msgid "Integrity" msgstr "" @@ -69,15 +69,15 @@ msgstr "" msgid "Diameter (cm)" msgstr "" -#: forms.py:80 forms.py:294 models.py:298 +#: forms.py:80 forms.py:300 models.py:298 msgid "Volume (l)" msgstr "" -#: forms.py:81 forms.py:295 models.py:299 +#: forms.py:81 forms.py:301 models.py:299 msgid "Weight (g)" msgstr "" -#: forms.py:82 forms.py:296 models.py:302 +#: forms.py:82 forms.py:302 models.py:302 msgid "Find number" msgstr "" @@ -85,7 +85,7 @@ msgstr "" msgid "Mark" msgstr "" -#: forms.py:84 forms.py:169 models.py:332 +#: forms.py:84 forms.py:175 models.py:332 msgid "Check" msgstr "" @@ -116,15 +116,15 @@ msgstr "" msgid "Dating" msgstr "" -#: forms.py:124 forms.py:156 +#: forms.py:124 forms.py:162 msgid "Period" msgstr "" -#: forms.py:125 forms.py:231 models.py:577 models.py:618 +#: forms.py:125 forms.py:237 models.py:577 models.py:618 msgid "Start date" msgstr "" -#: forms.py:127 forms.py:233 models.py:578 models.py:619 +#: forms.py:127 forms.py:239 models.py:578 models.py:619 msgid "End date" msgstr "" @@ -148,91 +148,95 @@ msgstr "" msgid "Code PATRIARCHE" msgstr "" -#: forms.py:159 models.py:84 +#: forms.py:157 +msgid "Archaelogical site" +msgstr "" + +#: forms.py:165 models.py:84 msgid "Object type" msgstr "" -#: forms.py:170 +#: forms.py:176 msgid "Has an image?" msgstr "" -#: forms.py:199 views.py:91 +#: forms.py:205 views.py:97 msgid "Find search" msgstr "" -#: forms.py:212 +#: forms.py:218 msgid "Base treatment" msgstr "" -#: forms.py:216 models.py:554 models.py:568 +#: forms.py:222 models.py:554 models.py:568 msgid "Treatment type" msgstr "" -#: forms.py:218 models.py:575 models.py:616 +#: forms.py:224 models.py:575 models.py:616 msgid "Person" msgstr "" -#: forms.py:224 models.py:570 +#: forms.py:230 models.py:570 msgid "Location" msgstr "" -#: forms.py:245 +#: forms.py:251 msgid "Upstream finds" msgstr "" -#: forms.py:247 models.py:347 +#: forms.py:253 models.py:347 msgid "Finds" msgstr "" -#: forms.py:257 +#: forms.py:263 msgid "You should at least select one archaeological find." msgstr "" -#: forms.py:286 +#: forms.py:292 msgid "Resulting find" msgstr "" -#: forms.py:291 +#: forms.py:297 msgid "Precise description" msgstr "" -#: forms.py:305 +#: forms.py:311 msgid "Resulting finds" msgstr "" -#: forms.py:309 +#: forms.py:315 msgid "Upstream find" msgstr "" -#: forms.py:316 +#: forms.py:322 msgid "Archaeological find search" msgstr "" -#: forms.py:318 +#: forms.py:324 msgid "You should select an archaeological find." msgstr "" -#: forms.py:323 +#: forms.py:329 msgid "Year of the operation" msgstr "" -#: forms.py:325 +#: forms.py:331 msgid "Period of the archaelogical find" msgstr "" -#: forms.py:327 +#: forms.py:333 msgid "Material type of the archaelogical find" msgstr "" -#: forms.py:329 +#: forms.py:335 msgid "Description of the archaelogical find" msgstr "" -#: forms.py:341 +#: forms.py:347 msgid "Documentation search" msgstr "" -#: forms.py:343 +#: forms.py:349 msgid "You should select a document." msgstr "" @@ -532,23 +536,23 @@ msgstr "" msgid "Properties" msgstr "" -#: views.py:86 +#: views.py:92 msgid "New find" msgstr "" -#: views.py:99 +#: views.py:105 msgid "Find modification" msgstr "" -#: views.py:117 +#: views.py:123 msgid "Find: new source" msgstr "" -#: views.py:125 +#: views.py:131 msgid "Find: source modification" msgstr "" -#: views.py:131 +#: views.py:137 msgid "Find: source deletion" msgstr "" diff --git a/archaeological_finds/views.py b/archaeological_finds/views.py index 36388d85b..5306e84a5 100644 --- a/archaeological_finds/views.py +++ b/archaeological_finds/views.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# Copyright (C) 2010-2015 Étienne Loks <etienne.loks_AT_peacefrogsDOTnet> +# Copyright (C) 2010-2016 É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 @@ -43,6 +43,8 @@ find_extra_keys = { 'base_finds__context_record__operation__year__contains', 'base_finds__context_record__operation': 'base_finds__context_record__operation__pk', + 'archaeological_sites': + 'base_finds__context_record__operation__archaeological_sites__pk', 'base_finds__context_record__operation__code_patriarche': 'base_finds__context_record__operation__code_patriarche', 'datings__period': 'datings__period__pk', @@ -70,6 +72,10 @@ get_findsource = get_item( models.FindSource, 'get_findsource', 'findsource', bool_fields=['duplicate'], extra_request_keys={ + 'title': 'title__icontains', + 'description': 'description__icontains', + 'comment': 'comment__icontains', + 'additional_information': 'additional_information__icontains', 'find__context_record__operation__year': 'find__context_record__operation__year', 'find__datings__period': 'find__datings__period__pk', |
