summaryrefslogtreecommitdiff
path: root/archaeological_context_records
diff options
context:
space:
mode:
Diffstat (limited to 'archaeological_context_records')
-rw-r--r--archaeological_context_records/forms.py9
-rw-r--r--archaeological_context_records/locale/django.pot106
-rw-r--r--archaeological_context_records/views.py7
3 files changed, 69 insertions, 53 deletions
diff --git a/archaeological_context_records/forms.py b/archaeological_context_records/forms.py
index 59f683620..98da5ce10 100644
--- a/archaeological_context_records/forms.py
+++ b/archaeological_context_records/forms.py
@@ -29,7 +29,8 @@ from django.forms.formsets import formset_factory
from django.utils.translation import ugettext_lazy as _
from ishtar_common.models import valid_id
-from archaeological_operations.models import Period, Parcel, Operation
+from archaeological_operations.models import Period, Parcel, Operation, \
+ ArchaeologicalSite
import models
from ishtar_common import widgets
@@ -49,6 +50,12 @@ class RecordSelect(TableSelect):
operation__year = forms.IntegerField(label=_(u"Operation's year"))
operation__operation_code = forms.IntegerField(
label=_(u"Operation's number (index by year)"))
+ 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=[])
unit = forms.ChoiceField(label=_(u"Unit type"), choices=[])
parcel = ParcelField(label=_(u"Parcel (section/number)"))
diff --git a/archaeological_context_records/locale/django.pot b/archaeological_context_records/locale/django.pot
index 9e403163d..8b88d7cc3 100644
--- a/archaeological_context_records/locale/django.pot
+++ b/archaeological_context_records/locale/django.pot
@@ -7,187 +7,191 @@
msgid ""
msgstr ""
-#: forms.py:44 forms.py:97 models.py:125
+#: forms.py:45 forms.py:104 models.py:125
#: templates/ishtar/sheet_contextrecord.html:72
msgid "ID"
msgstr ""
-#: forms.py:48
+#: forms.py:49
msgid "Code PATRIARCHE"
msgstr ""
-#: forms.py:49
+#: forms.py:50
msgid "Operation's year"
msgstr ""
-#: forms.py:51
+#: forms.py:52
msgid "Operation's number (index by year)"
msgstr ""
-#: forms.py:52 forms.py:163 models.py:48
+#: forms.py:54
+msgid "Archaelogical site"
+msgstr ""
+
+#: forms.py:59 forms.py:170 models.py:48
msgid "Period"
msgstr ""
-#: forms.py:53
+#: forms.py:60
msgid "Unit type"
msgstr ""
-#: forms.py:54
+#: forms.py:61
msgid "Parcel (section/number)"
msgstr ""
-#: forms.py:72 forms.py:259 views.py:73
+#: forms.py:79 forms.py:266 views.py:78
msgid "Context record search"
msgstr ""
-#: forms.py:86
+#: forms.py:93
msgid "You should at least select one context record."
msgstr ""
-#: forms.py:92
+#: forms.py:99
msgid "General"
msgstr ""
-#: forms.py:96 models.py:118 models.py:121
+#: forms.py:103 models.py:118 models.py:121
#: templates/ishtar/sheet_contextrecord.html:76
msgid "Parcel"
msgstr ""
-#: forms.py:99 models.py:126 templates/ishtar/sheet_contextrecord.html:42
+#: forms.py:106 models.py:126 templates/ishtar/sheet_contextrecord.html:42
#: templates/ishtar/sheet_contextrecord.html:75
msgid "Description"
msgstr ""
-#: forms.py:101 models.py:131
+#: forms.py:108 models.py:131
msgid "Length (cm)"
msgstr ""
-#: forms.py:102 models.py:132
+#: forms.py:109 models.py:132
msgid "Width (cm)"
msgstr ""
-#: forms.py:103 models.py:133
+#: forms.py:110 models.py:133
msgid "Thickness (cm)"
msgstr ""
-#: forms.py:104 models.py:135
+#: forms.py:111 models.py:135
msgid "Depth (cm)"
msgstr ""
-#: forms.py:105 models.py:141
+#: forms.py:112 models.py:141
msgid "Unit"
msgstr ""
-#: forms.py:107 models.py:137
+#: forms.py:114 models.py:137
msgid "Location"
msgstr ""
-#: forms.py:152
+#: forms.py:159
msgid "This ID already exist for this operation."
msgstr ""
-#: forms.py:158 forms.py:182 models.py:59
+#: forms.py:165 forms.py:189 models.py:59
msgid "Dating"
msgstr ""
-#: forms.py:164 models.py:49
+#: forms.py:171 models.py:49
msgid "Start date"
msgstr ""
-#: forms.py:165 models.py:50 models.py:130
+#: forms.py:172 models.py:50 models.py:130
msgid "End date"
msgstr ""
-#: forms.py:166 models.py:53
+#: forms.py:173 models.py:53
msgid "Quality"
msgstr ""
-#: forms.py:167 models.py:35 models.py:51
+#: forms.py:174 models.py:35 models.py:51
msgid "Dating type"
msgstr ""
-#: forms.py:191 ishtar_menu.py:29 models.py:321
+#: forms.py:198 ishtar_menu.py:29 models.py:321
msgid "Context record"
msgstr ""
-#: forms.py:211
+#: forms.py:218
msgid "Relations"
msgstr ""
-#: forms.py:215 forms.py:222 models.py:146
+#: forms.py:222 forms.py:229 models.py:146
#: templates/ishtar/sheet_contextrecord.html:52
msgid "Interpretation"
msgstr ""
-#: forms.py:218 models.py:143
+#: forms.py:225 models.py:143
msgid "Has furniture?"
msgstr ""
-#: forms.py:220 models.py:145
+#: forms.py:227 models.py:145
msgid "Filling"
msgstr ""
-#: forms.py:224 models.py:166
+#: forms.py:231 models.py:166
msgid "Activity"
msgstr ""
-#: forms.py:226 models.py:164
+#: forms.py:233 models.py:164
msgid "Identification"
msgstr ""
-#: forms.py:228 models.py:149
+#: forms.py:235 models.py:149
msgid "TAQ"
msgstr ""
-#: forms.py:229 models.py:153
+#: forms.py:236 models.py:153
msgid "Estimated TAQ"
msgstr ""
-#: forms.py:231 models.py:156
+#: forms.py:238 models.py:156
msgid "TPQ"
msgstr ""
-#: forms.py:232 models.py:160
+#: forms.py:239 models.py:160
msgid "Estimated TPQ"
msgstr ""
-#: forms.py:245
+#: forms.py:252
msgid "Operation search"
msgstr ""
-#: forms.py:247
+#: forms.py:254
msgid "You should select an operation."
msgstr ""
-#: forms.py:252
+#: forms.py:259
msgid "Would you like to delete this context record?"
msgstr ""
-#: forms.py:261
+#: forms.py:268
msgid "You should select a context record."
msgstr ""
-#: forms.py:266
+#: forms.py:273
msgid "Town of the operation"
msgstr ""
-#: forms.py:268
+#: forms.py:275
msgid "Year of the operation"
msgstr ""
-#: forms.py:270
+#: forms.py:277
msgid "Period of the context record"
msgstr ""
-#: forms.py:272
+#: forms.py:279
msgid "Unit type of the context record"
msgstr ""
-#: forms.py:285
+#: forms.py:292
msgid "Documentation search"
msgstr ""
-#: forms.py:287
+#: forms.py:294
msgid "You should select a document."
msgstr ""
@@ -364,27 +368,27 @@ msgstr ""
msgid "Context record documentations"
msgstr ""
-#: views.py:83
+#: views.py:88
msgid "New context record"
msgstr ""
-#: views.py:93
+#: views.py:98
msgid "Context record modification"
msgstr ""
-#: views.py:107
+#: views.py:112
msgid "Context record deletion"
msgstr ""
-#: views.py:115
+#: views.py:120
msgid "Context record: new source"
msgstr ""
-#: views.py:123
+#: views.py:128
msgid "Context record: source modification"
msgstr ""
-#: views.py:129
+#: views.py:134
msgid "Context record: source deletion"
msgstr ""
diff --git a/archaeological_context_records/views.py b/archaeological_context_records/views.py
index 13375f866..883b2c85e 100644
--- a/archaeological_context_records/views.py
+++ b/archaeological_context_records/views.py
@@ -39,7 +39,8 @@ contextrecord_extra_keys = {
'datings__period': 'datings__period__pk',
'parcel_0': 'operation__parcels__section',
'parcel_1': 'operation__parcels__parcel_number',
- 'label': 'label__icontains'
+ 'label': 'label__icontains',
+ 'archaeological_sites': 'operation__archaeological_sites__pk',
}
get_contextrecord = get_item(
@@ -60,6 +61,10 @@ get_contextrecordsource = get_item(
'get_contextrecordsource', 'contextrecordsource',
bool_fields=['duplicate'],
extra_request_keys={
+ 'title': 'title__icontains',
+ 'description': 'description__icontains',
+ 'comment': 'comment__icontains',
+ 'additional_information': 'additional_information__icontains',
'context_record__parcel__town': 'context_record__parcel__town__pk',
'context_record__operation__year': 'context_record__operation__year',
'context_record__operation': 'context_record__operation__pk',