diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-05-15 11:34:32 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-05-15 11:34:32 +0200 |
commit | 54d6c8789255aa5500df6dc583a8fdbe96b8442a (patch) | |
tree | 9b6101e1df20be739157df2c8d6f391119bf3e48 /archaeological_finds | |
parent | c3e4c309deb686685e34a441445b6104ba4913a7 (diff) | |
parent | c18fccf766ea9fd82ca82d8e4a7938c83512c416 (diff) | |
download | Ishtar-54d6c8789255aa5500df6dc583a8fdbe96b8442a.tar.bz2 Ishtar-54d6c8789255aa5500df6dc583a8fdbe96b8442a.zip |
Merge branch 'master' into develop
Conflicts:
archaeological_finds/forms_treatments.py
Diffstat (limited to 'archaeological_finds')
-rw-r--r-- | archaeological_finds/forms.py | 16 | ||||
-rw-r--r-- | archaeological_finds/forms_treatments.py | 21 | ||||
-rw-r--r-- | archaeological_finds/locale/django.pot | 427 | ||||
-rw-r--r-- | archaeological_finds/models_finds.py | 5 | ||||
-rw-r--r-- | archaeological_finds/templates/ishtar/sheet_find.html | 4 |
5 files changed, 258 insertions, 215 deletions
diff --git a/archaeological_finds/forms.py b/archaeological_finds/forms.py index ee010094b..2e7cc75f5 100644 --- a/archaeological_finds/forms.py +++ b/archaeological_finds/forms.py @@ -36,7 +36,7 @@ from ishtar_common.models import valid_id, valid_ids, get_current_profile, \ from archaeological_operations.models import Period, ArchaeologicalSite, \ RelationType as OpeRelationType from archaeological_context_records.models import DatingType, DatingQuality, \ - ContextRecord + ContextRecord, RelationType as CRRelationType import models from ishtar_common.forms import FormSet, FloatField, \ @@ -361,9 +361,18 @@ class FindSelect(TableSelect): reverse_lazy('autocomplete-archaeologicalsite'), associated_model=ArchaeologicalSite), validators=[valid_id(ArchaeologicalSite)]) + base_finds__context_record = forms.IntegerField( + label=_("Context record"), + widget=widgets.JQueryAutoComplete( + reverse_lazy('autocomplete-contextrecord'), + associated_model=ContextRecord), + validators=[valid_id(ContextRecord)]) ope_relation_types = forms.MultipleChoiceField( label=_(u"Search within related operations"), choices=[], widget=widgets.CheckboxSelectMultiple) + cr_relation_types = forms.MultipleChoiceField( + label=_(u"Search within related context records"), choices=[], + widget=widgets.CheckboxSelectMultiple) datings__period = forms.ChoiceField(label=_(u"Period"), choices=[]) material_types = forms.ChoiceField(label=_(u"Material type"), choices=[]) object_types = forms.ChoiceField(label=_(u"Object type"), choices=[]) @@ -417,12 +426,17 @@ class FindSelect(TableSelect): models.RemarkabilityType.get_help() self.fields['ope_relation_types'].choices = OpeRelationType.get_types( empty_first=False) + self.fields['cr_relation_types'].choices = CRRelationType.get_types( + empty_first=False) def get_input_ids(self): ids = super(FindSelect, self).get_input_ids() ids.pop(ids.index('ope_relation_types')) for idx, c in enumerate(self.fields['ope_relation_types'].choices): ids.append('ope_relation_types_{}'.format(idx)) + ids.pop(ids.index('cr_relation_types')) + for idx, c in enumerate(self.fields['cr_relation_types'].choices): + ids.append('cr_relation_types_{}'.format(idx)) return ids diff --git a/archaeological_finds/forms_treatments.py b/archaeological_finds/forms_treatments.py index 30d8e51ae..446d67fc1 100644 --- a/archaeological_finds/forms_treatments.py +++ b/archaeological_finds/forms_treatments.py @@ -24,7 +24,6 @@ import logging from django import forms from django.conf import settings from django.core import validators -from django.db.models import Max from django.utils.safestring import mark_safe from django.utils.translation import ugettext_lazy as _ @@ -39,8 +38,7 @@ from archaeological_operations.forms import AdministrativeActOpeForm, \ from ishtar_common.forms import reverse_lazy, TableSelect, FinalForm, \ ManageOldType, get_form_selection -from ishtar_common.forms_common import SourceForm, SourceSelect, \ - SourceDeletionForm +from ishtar_common.forms_common import SourceSelect from ishtar_common import widgets @@ -185,7 +183,7 @@ class BaseTreatmentForm(ManageOldType, forms.Form): self.fields['treatment_state'].choices = \ models.TreatmentState.get_types( initial=self.init_data.get('treatment_state'), - ) + ) self.fields['treatment_state'].help_text = \ models.TreatmentState.get_help() # TODO @@ -250,6 +248,7 @@ class TreatmentModifyForm(BaseTreatmentForm): fields[key] = value if key == 'year': fields['index'] = idx + fields.pop('target_is_basket') self.fields = fields def clean(self, *args, **kwargs): @@ -489,9 +488,9 @@ class TreatmentFileForm(ManageOldType, forms.Form): creation_date = forms.DateField(label=_(u"Start date"), required=False, widget=widgets.JQueryDate, initial=lambda: datetime.datetime.now()) - reception_date = forms.DateField(label=_(u"Reception date"), required=False, - widget=widgets.JQueryDate, - initial=lambda: datetime.datetime.now()) + reception_date = forms.DateField( + label=_(u"Reception date"), required=False, widget=widgets.JQueryDate, + initial=lambda: datetime.datetime.now()) end_date = forms.DateField(label=_(u"Closing date"), required=False, widget=widgets.JQueryDate) @@ -607,8 +606,8 @@ class AdministrativeActTreatmentFileSelect(TableSelect): label=_(u"Treatment request index")) treatment_file__internal_reference = forms.CharField( max_length=200, label=_(u"Treatment request internal reference")) - treatment_file__type = forms.ChoiceField(label=_(u"Treatment request type"), - choices=[]) + treatment_file__type = forms.ChoiceField( + label=_(u"Treatment request type"), choices=[]) history_modifier = forms.IntegerField( label=_(u"Modified by"), widget=widgets.JQueryAutoComplete( @@ -703,8 +702,8 @@ class TreatmentFileSourceSelect(SourceSelect): label=_(u"Treatment request index")) treatment_file__internal_reference = forms.CharField( max_length=200, label=_(u"Treatment request internal reference")) - treatment_file__type = forms.ChoiceField(label=_(u"Treatment request type"), - choices=[]) + treatment_file__type = forms.ChoiceField( + label=_(u"Treatment request type"), choices=[]) def __init__(self, *args, **kwargs): super(TreatmentFileSourceSelect, self).__init__(*args, **kwargs) diff --git a/archaeological_finds/locale/django.pot b/archaeological_finds/locale/django.pot index d2c407d1c..4a9cc517c 100644 --- a/archaeological_finds/locale/django.pot +++ b/archaeological_finds/locale/django.pot @@ -9,63 +9,63 @@ msgid "" msgstr "" -#: forms.py:93 forms.py:97 models_finds.py:519 wizards.py:64 +#: forms.py:95 forms.py:99 forms.py:365 models_finds.py:519 wizards.py:64 msgid "Context record" msgstr "" -#: forms.py:126 ishtar_menu.py:32 models_finds.py:683 models_finds.py:1114 -#: models_finds.py:1135 models_treatments.py:298 +#: forms.py:128 ishtar_menu.py:32 models_finds.py:686 models_finds.py:1117 +#: models_finds.py:1138 models_treatments.py:298 #: templates/ishtar/sheet_find.html:5 msgid "Find" msgstr "" -#: forms.py:140 forms.py:337 forms.py:605 models_finds.py:150 -#: models_finds.py:613 +#: forms.py:142 forms.py:347 forms.py:629 models_finds.py:150 +#: models_finds.py:616 msgid "Free ID" msgstr "" -#: forms.py:142 models_finds.py:666 +#: forms.py:144 models_finds.py:669 msgid "Previous ID" msgstr "" -#: forms.py:143 forms.py:368 forms_treatments.py:134 models_finds.py:154 -#: models_finds.py:614 models_treatments.py:128 +#: forms.py:145 forms.py:387 forms_treatments.py:134 models_finds.py:154 +#: models_finds.py:617 models_treatments.py:128 msgid "Description" msgstr "" -#: forms.py:146 forms.py:370 models_finds.py:163 +#: forms.py:148 forms.py:389 models_finds.py:163 msgid "Batch/object" msgstr "" -#: forms.py:148 models_finds.py:643 +#: forms.py:150 models_finds.py:646 msgid "Is complete?" msgstr "" -#: forms.py:151 forms.py:358 forms.py:609 models_finds.py:50 +#: forms.py:153 forms.py:377 forms.py:633 models_finds.py:50 msgid "Material type" msgstr "" -#: forms.py:154 forms.py:362 models_finds.py:62 models_finds.py:618 +#: forms.py:155 forms.py:381 models_finds.py:62 models_finds.py:621 msgid "Conservatory state" msgstr "" -#: forms.py:157 models_finds.py:620 +#: forms.py:158 models_finds.py:623 msgid "Conservatory comment" msgstr "" -#: forms.py:160 models_finds.py:112 models_finds.py:646 +#: forms.py:161 models_finds.py:112 models_finds.py:649 msgid "Object types" msgstr "" -#: forms.py:164 forms.py:361 models_finds.py:71 +#: forms.py:164 forms.py:380 models_finds.py:71 msgid "Preservation type" msgstr "" -#: forms.py:167 forms.py:364 models_finds.py:648 +#: forms.py:167 forms.py:383 models_finds.py:651 msgid "Integrity / interest" msgstr "" -#: forms.py:170 forms.py:366 models_finds.py:651 +#: forms.py:170 forms.py:385 models_finds.py:654 msgid "Remarkability" msgstr "" @@ -73,15 +73,15 @@ msgstr "" msgid "Point of topographic reference" msgstr "" -#: forms.py:176 models_finds.py:170 templates/ishtar/sheet_find.html:205 +#: forms.py:176 models_finds.py:170 templates/ishtar/sheet_find.html:209 msgid "X" msgstr "" -#: forms.py:177 models_finds.py:171 templates/ishtar/sheet_find.html:206 +#: forms.py:177 models_finds.py:171 templates/ishtar/sheet_find.html:210 msgid "Y" msgstr "" -#: forms.py:178 models_finds.py:172 templates/ishtar/sheet_find.html:207 +#: forms.py:178 models_finds.py:172 templates/ishtar/sheet_find.html:211 msgid "Z" msgstr "" @@ -101,69 +101,69 @@ msgstr "" msgid "Estimated error for Z" msgstr "" -#: forms.py:188 models_finds.py:655 +#: forms.py:188 models_finds.py:658 msgid "Length (cm)" msgstr "" -#: forms.py:189 models_finds.py:656 +#: forms.py:189 models_finds.py:659 msgid "Width (cm)" msgstr "" -#: forms.py:190 models_finds.py:657 +#: forms.py:190 models_finds.py:660 msgid "Height (cm)" msgstr "" -#: forms.py:191 models_finds.py:658 +#: forms.py:191 models_finds.py:661 msgid "Diameter (cm)" msgstr "" -#: forms.py:192 models_finds.py:659 +#: forms.py:192 models_finds.py:662 msgid "Thickness (cm)" msgstr "" -#: forms.py:193 forms.py:610 models_finds.py:625 +#: forms.py:193 forms.py:634 models_finds.py:628 msgid "Volume (l)" msgstr "" -#: forms.py:194 forms.py:611 models_finds.py:626 +#: forms.py:194 forms.py:635 models_finds.py:629 msgid "Weight (g)" msgstr "" -#: forms.py:196 models_finds.py:660 +#: forms.py:196 models_finds.py:663 msgid "Dimensions comment" msgstr "" -#: forms.py:197 forms.py:612 models_finds.py:629 +#: forms.py:197 forms.py:636 models_finds.py:632 msgid "Find number" msgstr "" -#: forms.py:199 models_finds.py:654 +#: forms.py:199 models_finds.py:657 msgid "Minimum number of individuals (MNI)" msgstr "" -#: forms.py:200 models_finds.py:662 +#: forms.py:200 models_finds.py:665 msgid "Mark" msgstr "" -#: forms.py:201 forms.py:371 models_finds.py:668 +#: forms.py:201 forms.py:390 models_finds.py:671 msgid "Check" msgstr "" -#: forms.py:203 models_finds.py:670 +#: forms.py:203 models_finds.py:673 msgid "Check date" msgstr "" -#: forms.py:204 forms_treatments.py:132 forms_treatments.py:434 -#: models_finds.py:155 models_finds.py:663 models_treatments.py:127 +#: forms.py:204 forms_treatments.py:136 forms_treatments.py:478 +#: models_finds.py:155 models_finds.py:666 models_treatments.py:127 #: models_treatments.py:511 msgid "Comment" msgstr "" -#: forms.py:207 models_finds.py:664 +#: forms.py:207 models_finds.py:667 msgid "Comment on dating" msgstr "" -#: forms.py:208 models_finds.py:672 +#: forms.py:208 models_finds.py:675 msgid "Estimated value" msgstr "" @@ -178,181 +178,186 @@ msgid "" "p>" msgstr "" -#: forms.py:285 +#: forms.py:295 msgid "You should at least provide X, Y and the spatial reference system used." msgstr "" -#: forms.py:294 +#: forms.py:304 msgid "Coordinates are not relevant for the spatial reference system used: {}." msgstr "" -#: forms.py:300 forms.py:331 models_finds.py:637 +#: forms.py:310 forms.py:341 models_finds.py:640 msgid "Dating" msgstr "" -#: forms.py:305 forms.py:357 +#: forms.py:315 forms.py:376 msgid "Period" msgstr "" -#: forms.py:306 forms_treatments.py:138 forms_treatments.py:436 -#: models_finds.py:1140 models_treatments.py:130 models_treatments.py:309 -#: templates/ishtar/sheet_find.html:91 templates/ishtar/sheet_find.html:133 +#: forms.py:316 forms_treatments.py:138 forms_treatments.py:282 +#: forms_treatments.py:480 models_finds.py:1143 models_treatments.py:130 +#: models_treatments.py:309 templates/ishtar/sheet_find.html:95 +#: templates/ishtar/sheet_find.html:137 msgid "Start date" msgstr "" -#: forms.py:308 models_finds.py:1141 models_treatments.py:310 -#: templates/ishtar/sheet_find.html:92 templates/ishtar/sheet_find.html:134 +#: forms.py:318 models_finds.py:1144 models_treatments.py:310 +#: templates/ishtar/sheet_find.html:96 templates/ishtar/sheet_find.html:138 msgid "End date" msgstr "" -#: forms.py:309 +#: forms.py:319 msgid "Quality" msgstr "" -#: forms.py:311 +#: forms.py:321 msgid "Dating type" msgstr "" -#: forms.py:313 +#: forms.py:323 msgid "Precise dating" msgstr "" -#: forms.py:335 models_finds.py:187 +#: forms.py:345 models_finds.py:187 msgid "Short ID" msgstr "" -#: forms.py:336 models_finds.py:190 +#: forms.py:346 models_finds.py:190 msgid "Complete ID" msgstr "" -#: forms.py:340 forms_treatments.py:54 forms_treatments.py:96 -#: forms_treatments.py:284 forms_treatments.py:356 forms_treatments.py:406 -#: forms_treatments.py:489 models_treatments.py:103 models_treatments.py:483 +#: forms.py:350 forms_treatments.py:54 forms_treatments.py:96 +#: forms_treatments.py:328 forms_treatments.py:400 forms_treatments.py:450 +#: forms_treatments.py:578 models_treatments.py:103 models_treatments.py:483 msgid "Year" msgstr "" -#: forms.py:342 +#: forms.py:352 msgid "Operation's number (index by year)" msgstr "" -#: forms.py:345 +#: forms.py:355 msgid "Code PATRIARCHE" msgstr "" -#: forms.py:349 +#: forms.py:359 msgid "Archaeological site" msgstr "" -#: forms.py:355 +#: forms.py:371 msgid "Search within related operations" msgstr "" -#: forms.py:359 models_finds.py:111 +#: forms.py:374 +msgid "Search within related context records" +msgstr "" + +#: forms.py:378 models_finds.py:111 msgid "Object type" msgstr "" -#: forms.py:372 forms_treatments.py:57 +#: forms.py:391 forms_treatments.py:57 msgid "Has an image?" msgstr "" -#: forms.py:421 +#: forms.py:445 msgid "Warehouse (location)" msgstr "" -#: forms.py:427 +#: forms.py:451 msgid "Warehouse (responsible)" msgstr "" -#: forms.py:432 +#: forms.py:456 msgid "Container ID" msgstr "" -#: forms.py:433 +#: forms.py:457 msgid "Container ref." msgstr "" -#: forms.py:437 forms.py:460 views.py:149 +#: forms.py:461 forms.py:484 views.py:149 msgid "Find search" msgstr "" -#: forms.py:485 templates/ishtar/sheet_treatment.html:46 +#: forms.py:509 templates/ishtar/sheet_treatment.html:46 msgid "Upstream finds" msgstr "" -#: forms.py:487 models_finds.py:684 +#: forms.py:511 models_finds.py:687 msgid "Finds" msgstr "" -#: forms.py:499 +#: forms.py:523 msgid "You should at least select one archaeological find." msgstr "" -#: forms.py:602 +#: forms.py:626 msgid "Resulting find" msgstr "" -#: forms.py:607 +#: forms.py:631 msgid "Precise description" msgstr "" -#: forms.py:622 +#: forms.py:646 msgid "Resulting finds" msgstr "" -#: forms.py:627 +#: forms.py:651 msgid "Would you like to delete this find?" msgstr "" -#: forms.py:631 models_treatments.py:91 +#: forms.py:655 models_treatments.py:91 msgid "Upstream find" msgstr "" -#: forms.py:644 +#: forms.py:668 msgid "Archaeological find search" msgstr "" -#: forms.py:646 +#: forms.py:670 msgid "You should select an archaeological find." msgstr "" -#: forms.py:651 +#: forms.py:675 msgid "Year of the operation" msgstr "" -#: forms.py:653 +#: forms.py:677 msgid "Numeric reference" msgstr "" -#: forms.py:660 +#: forms.py:684 msgid "Period of the archaeological find" msgstr "" -#: forms.py:662 +#: forms.py:686 msgid "Material type of the archaeological find" msgstr "" -#: forms.py:664 +#: forms.py:688 msgid "Description of the archaeological find" msgstr "" -#: forms.py:676 forms_treatments.py:590 forms_treatments.py:616 +#: forms.py:700 forms_treatments.py:679 forms_treatments.py:705 msgid "Documentation search" msgstr "" -#: forms.py:678 forms_treatments.py:592 forms_treatments.py:618 +#: forms.py:702 forms_treatments.py:681 forms_treatments.py:707 msgid "You should select a document." msgstr "" -#: forms.py:695 +#: forms.py:719 msgid "Another basket already exists with this name." msgstr "" -#: forms.py:705 forms.py:709 forms_treatments.py:175 ishtar_menu.py:57 +#: forms.py:729 forms.py:733 forms_treatments.py:175 ishtar_menu.py:57 msgid "Basket" msgstr "" #: forms_treatments.py:52 forms_treatments.py:92 models_treatments.py:99 -#: templates/ishtar/sheet_find.html:85 templates/ishtar/sheet_find.html:127 +#: templates/ishtar/sheet_find.html:89 templates/ishtar/sheet_find.html:131 msgid "Label" msgstr "" @@ -360,20 +365,20 @@ msgstr "" msgid "Other ref." msgstr "" -#: forms_treatments.py:55 forms_treatments.py:237 forms_treatments.py:285 -#: forms_treatments.py:348 forms_treatments.py:357 forms_treatments.py:459 -#: forms_treatments.py:490 forms_treatments.py:557 models_treatments.py:105 +#: forms_treatments.py:55 forms_treatments.py:237 forms_treatments.py:329 +#: forms_treatments.py:392 forms_treatments.py:401 forms_treatments.py:503 +#: forms_treatments.py:579 forms_treatments.py:646 models_treatments.py:105 #: models_treatments.py:485 msgid "Index" msgstr "" -#: forms_treatments.py:56 forms_treatments.py:101 forms_treatments.py:301 -#: forms_treatments.py:578 models_treatments.py:56 models_treatments.py:110 -#: models_treatments.py:308 +#: forms_treatments.py:56 forms_treatments.py:101 forms_treatments.py:290 +#: forms_treatments.py:345 forms_treatments.py:667 models_treatments.py:56 +#: models_treatments.py:110 models_treatments.py:308 msgid "Treatment type" msgstr "" -#: forms_treatments.py:68 forms_treatments.py:560 views.py:398 +#: forms_treatments.py:68 forms_treatments.py:649 views.py:398 msgid "Treatment search" msgstr "" @@ -382,7 +387,7 @@ msgid "Base treatment" msgstr "" #: forms_treatments.py:103 models_treatments.py:93 models_treatments.py:112 -#: templates/ishtar/sheet_find.html:87 templates/ishtar/sheet_find.html:129 +#: templates/ishtar/sheet_find.html:91 templates/ishtar/sheet_find.html:133 msgid "State" msgstr "" @@ -390,7 +395,7 @@ msgstr "" msgid "Target" msgstr "" -#: forms_treatments.py:107 forms_treatments.py:417 models_treatments.py:120 +#: forms_treatments.py:107 forms_treatments.py:461 models_treatments.py:120 msgid "Responsible" msgstr "" @@ -406,16 +411,16 @@ msgstr "" msgid "Container (relevant for packaging)" msgstr "" -#: forms_treatments.py:131 forms_treatments.py:413 +#: forms_treatments.py:131 forms_treatments.py:457 msgid "External ref." msgstr "" -#: forms_treatments.py:136 models_treatments.py:129 +#: forms_treatments.py:132 models_treatments.py:129 msgid "Goal" msgstr "" -#: forms_treatments.py:140 forms_treatments.py:442 models_treatments.py:131 -#: models_treatments.py:505 +#: forms_treatments.py:140 forms_treatments.py:282 forms_treatments.py:486 +#: forms_treatments.py:534 models_treatments.py:131 models_treatments.py:505 msgid "Closing date" msgstr "" @@ -465,7 +470,7 @@ msgstr "" msgid "Associated request" msgstr "" -#: forms_treatments.py:266 forms_treatments.py:397 ishtar_menu.py:108 +#: forms_treatments.py:266 forms_treatments.py:441 ishtar_menu.py:108 #: models_treatments.py:516 models_treatments.py:544 models_treatments.py:619 #: wizards.py:187 templates/ishtar/sheet_treatmentfile.html:5 msgid "Treatment request" @@ -481,121 +486,149 @@ msgstr "" msgid "Would you like to delete this treatment?" msgstr "" -#: forms_treatments.py:286 forms_treatments.py:334 forms_treatments.py:491 -#: forms_treatments.py:542 +#: forms_treatments.py:280 +msgid "months" +msgstr "" + +#: forms_treatments.py:280 +msgid "years" +msgstr "" + +#: forms_treatments.py:286 forms_treatments.py:538 +msgid "Slicing" +msgstr "" + +#: forms_treatments.py:289 forms_treatments.py:541 +msgid "Date get from" +msgstr "" + +#: forms_treatments.py:292 forms_treatments.py:544 +msgid "Date after" +msgstr "" + +#: forms_treatments.py:294 forms_treatments.py:546 +msgid "Date before" +msgstr "" + +#: forms_treatments.py:330 forms_treatments.py:378 forms_treatments.py:580 +#: forms_treatments.py:631 msgid "Act type" msgstr "" -#: forms_treatments.py:287 forms_treatments.py:492 +#: forms_treatments.py:331 forms_treatments.py:581 msgid "Indexed?" msgstr "" -#: forms_treatments.py:288 forms_treatments.py:493 +#: forms_treatments.py:332 forms_treatments.py:582 msgid "Object" msgstr "" -#: forms_treatments.py:292 forms_treatments.py:497 +#: forms_treatments.py:336 forms_treatments.py:586 msgid "Signature date after" msgstr "" -#: forms_treatments.py:294 forms_treatments.py:499 +#: forms_treatments.py:338 forms_treatments.py:588 msgid "Signature date before" msgstr "" -#: forms_treatments.py:296 forms_treatments.py:573 +#: forms_treatments.py:340 forms_treatments.py:662 msgid "Treatment name" msgstr "" -#: forms_treatments.py:297 forms_treatments.py:574 +#: forms_treatments.py:341 forms_treatments.py:663 msgid "Treatment year" msgstr "" -#: forms_treatments.py:298 forms_treatments.py:575 +#: forms_treatments.py:342 forms_treatments.py:664 msgid "Treatment index" msgstr "" -#: forms_treatments.py:300 forms_treatments.py:577 +#: forms_treatments.py:344 forms_treatments.py:666 msgid "Treatment internal reference" msgstr "" -#: forms_treatments.py:304 forms_treatments.py:511 +#: forms_treatments.py:348 forms_treatments.py:600 msgid "Modified by" msgstr "" -#: forms_treatments.py:354 forms_treatments.py:404 models_treatments.py:490 +#: forms_treatments.py:398 forms_treatments.py:448 models_treatments.py:490 msgid "Name" msgstr "" -#: forms_treatments.py:355 forms_treatments.py:411 +#: forms_treatments.py:399 forms_treatments.py:455 msgid "Internal ref." msgstr "" -#: forms_treatments.py:358 forms_treatments.py:415 models_treatments.py:92 -#: templates/ishtar/sheet_find.html:86 templates/ishtar/sheet_find.html:128 -#: templates/ishtar/sheet_find.html:228 +#: forms_treatments.py:402 forms_treatments.py:459 models_treatments.py:92 +#: templates/ishtar/sheet_find.html:90 templates/ishtar/sheet_find.html:132 +#: templates/ishtar/sheet_find.html:232 msgid "Type" msgstr "" -#: forms_treatments.py:360 +#: forms_treatments.py:404 msgid "In charge" msgstr "" -#: forms_treatments.py:366 forms_treatments.py:423 models_treatments.py:499 +#: forms_treatments.py:410 forms_treatments.py:467 models_treatments.py:499 #: templates/ishtar/sheet_treatmentfile.html:31 msgid "Applicant" msgstr "" -#: forms_treatments.py:372 forms_treatments.py:429 models_treatments.py:503 +#: forms_treatments.py:416 forms_treatments.py:473 models_treatments.py:503 #: templates/ishtar/sheet_treatmentfile.html:38 msgid "Applicant organisation" msgstr "" -#: forms_treatments.py:385 forms_treatments.py:565 views.py:502 +#: forms_treatments.py:429 forms_treatments.py:654 views.py:502 msgid "Treatment request search" msgstr "" -#: forms_treatments.py:439 models_treatments.py:509 +#: forms_treatments.py:483 forms_treatments.py:533 models_treatments.py:509 msgid "Reception date" msgstr "" -#: forms_treatments.py:478 +#: forms_treatments.py:522 msgid "Another treatment request with this index exists for {}." msgstr "" -#: forms_treatments.py:484 +#: forms_treatments.py:528 msgid "Are you sure you want to delete this treatment request?" msgstr "" -#: forms_treatments.py:485 +#: forms_treatments.py:529 msgid "Would you like to delete this treatment request?" msgstr "" -#: forms_treatments.py:501 forms_treatments.py:597 +#: forms_treatments.py:532 models_treatments.py:507 +msgid "Creation date" +msgstr "" + +#: forms_treatments.py:542 forms_treatments.py:597 forms_treatments.py:693 +#: models_treatments.py:468 models_treatments.py:492 +msgid "Treatment request type" +msgstr "" + +#: forms_treatments.py:590 forms_treatments.py:686 msgid "Treatment request name" msgstr "" -#: forms_treatments.py:503 forms_treatments.py:599 +#: forms_treatments.py:592 forms_treatments.py:688 msgid "Treatment request year" msgstr "" -#: forms_treatments.py:505 forms_treatments.py:601 +#: forms_treatments.py:594 forms_treatments.py:690 msgid "Treatment request index" msgstr "" -#: forms_treatments.py:507 forms_treatments.py:603 +#: forms_treatments.py:596 forms_treatments.py:692 msgid "Treatment request internal reference" msgstr "" -#: forms_treatments.py:508 forms_treatments.py:604 models_treatments.py:468 -#: models_treatments.py:492 -msgid "Treatment request type" -msgstr "" - -#: forms_treatments.py:562 +#: forms_treatments.py:651 msgid "You should select a treatment." msgstr "" -#: forms_treatments.py:568 +#: forms_treatments.py:657 msgid "You should select a treatment request." msgstr "" @@ -629,12 +662,12 @@ msgstr "" msgid "Documentation" msgstr "" -#: ishtar_menu.py:133 ishtar_menu.py:214 models_finds.py:1137 +#: ishtar_menu.py:133 ishtar_menu.py:214 models_finds.py:1140 msgid "Administrative act" msgstr "" -#: ishtar_menu.py:151 ishtar_menu.py:233 templates/ishtar/sheet_find.html:222 -#: templates/ishtar/sheet_find.html:224 +#: ishtar_menu.py:151 ishtar_menu.py:233 templates/ishtar/sheet_find.html:226 +#: templates/ishtar/sheet_find.html:228 msgid "Documents" msgstr "" @@ -664,7 +697,7 @@ msgstr "" msgid "Parent material" msgstr "" -#: models_finds.py:51 models_finds.py:539 models_finds.py:616 +#: models_finds.py:51 models_finds.py:539 models_finds.py:619 msgid "Material types" msgstr "" @@ -696,7 +729,7 @@ msgstr "" msgid "Remarkability types" msgstr "" -#: models_finds.py:97 models_finds.py:612 models_treatments.py:40 +#: models_finds.py:97 models_finds.py:615 models_treatments.py:40 #: models_treatments.py:304 msgid "Order" msgstr "" @@ -713,12 +746,12 @@ msgstr "" msgid "Parent" msgstr "" -#: models_finds.py:151 models_finds.py:609 models_treatments.py:125 +#: models_finds.py:151 models_finds.py:612 models_treatments.py:125 #: models_treatments.py:488 msgid "External ID" msgstr "" -#: models_finds.py:153 models_finds.py:611 +#: models_finds.py:153 models_finds.py:614 msgid "External ID is set automatically" msgstr "" @@ -758,7 +791,7 @@ msgstr "" msgid "Cached value - do not edit" msgstr "" -#: models_finds.py:197 models_finds.py:607 +#: models_finds.py:197 models_finds.py:610 msgid "Base find" msgstr "" @@ -854,9 +887,9 @@ msgstr "" msgid "Base find - Discovery date" msgstr "" -#: models_finds.py:537 models_finds.py:640 models_treatments.py:132 -#: models_treatments.py:312 templates/ishtar/sheet_find.html:90 -#: templates/ishtar/sheet_find.html:132 +#: models_finds.py:537 models_finds.py:643 models_treatments.py:132 +#: models_treatments.py:312 templates/ishtar/sheet_find.html:94 +#: templates/ishtar/sheet_find.html:136 msgid "Container" msgstr "" @@ -864,91 +897,91 @@ msgstr "" msgid "Periods" msgstr "" -#: models_finds.py:623 +#: models_finds.py:626 msgid "Type of preservation to consider" msgstr "" -#: models_finds.py:627 +#: models_finds.py:630 msgid "Weight unit" msgstr "" -#: models_finds.py:633 templates/ishtar/sheet_find.html:78 +#: models_finds.py:636 templates/ishtar/sheet_find.html:82 msgid "Upstream treatment" msgstr "" -#: models_finds.py:636 templates/ishtar/sheet_find.html:120 +#: models_finds.py:639 templates/ishtar/sheet_find.html:124 msgid "Downstream treatment" msgstr "" -#: models_finds.py:675 +#: models_finds.py:678 msgid "Collection" msgstr "" -#: models_finds.py:677 models_treatments.py:144 models_treatments.py:512 +#: models_finds.py:680 models_treatments.py:144 models_treatments.py:512 msgid "Cached name" msgstr "" -#: models_finds.py:686 +#: models_finds.py:689 msgid "Can view all Finds" msgstr "" -#: models_finds.py:687 +#: models_finds.py:690 msgid "Can view own Find" msgstr "" -#: models_finds.py:688 +#: models_finds.py:691 msgid "Can add own Find" msgstr "" -#: models_finds.py:689 +#: models_finds.py:692 msgid "Can change own Find" msgstr "" -#: models_finds.py:690 +#: models_finds.py:693 msgid "Can delete own Find" msgstr "" -#: models_finds.py:696 +#: models_finds.py:699 msgid "FIND" msgstr "" -#: models_finds.py:1100 +#: models_finds.py:1103 msgid "Find documentation" msgstr "" -#: models_finds.py:1101 +#: models_finds.py:1104 msgid "Find documentations" msgstr "" -#: models_finds.py:1104 +#: models_finds.py:1107 msgid "Can view all Find sources" msgstr "" -#: models_finds.py:1106 +#: models_finds.py:1109 msgid "Can view own Find source" msgstr "" -#: models_finds.py:1108 +#: models_finds.py:1111 msgid "Can add own Find source" msgstr "" -#: models_finds.py:1110 +#: models_finds.py:1113 msgid "Can change own Find source" msgstr "" -#: models_finds.py:1112 +#: models_finds.py:1115 msgid "Can delete own Find source" msgstr "" -#: models_finds.py:1138 +#: models_finds.py:1141 msgid "Person" msgstr "" -#: models_finds.py:1144 +#: models_finds.py:1147 msgid "Property" msgstr "" -#: models_finds.py:1145 +#: models_finds.py:1148 msgid "Properties" msgstr "" @@ -1016,7 +1049,7 @@ msgstr "" msgid "Target a basket" msgstr "" -#: models_treatments.py:149 templates/ishtar/sheet_find.html:75 +#: models_treatments.py:149 templates/ishtar/sheet_find.html:79 #: templates/ishtar/sheet_treatmentfile.html:46 msgid "Treatments" msgstr "" @@ -1045,8 +1078,8 @@ msgstr "" msgid "TREATMENT" msgstr "" -#: models_treatments.py:313 templates/ishtar/sheet_find.html:89 -#: templates/ishtar/sheet_find.html:131 +#: models_treatments.py:313 templates/ishtar/sheet_find.html:93 +#: templates/ishtar/sheet_find.html:135 msgid "Doer" msgstr "" @@ -1070,10 +1103,6 @@ msgstr "" msgid "Person in charge" msgstr "" -#: models_treatments.py:507 -msgid "Creation date" -msgstr "" - #: models_treatments.py:517 msgid "Treatment requests" msgstr "" @@ -1155,30 +1184,18 @@ msgid "Can view Treatment request source" msgstr "" #: models_treatments.py:633 -msgid "Can add Treatment request source" -msgstr "" - -#: models_treatments.py:635 -msgid "Can change Treatment request source" -msgstr "" - -#: models_treatments.py:637 -msgid "Can delete Treatment request source" -msgstr "" - -#: models_treatments.py:639 msgid "Can view own Treatment request source" msgstr "" -#: models_treatments.py:641 +#: models_treatments.py:635 msgid "Can add own Treatment request source" msgstr "" -#: models_treatments.py:643 +#: models_treatments.py:637 msgid "Can change own Treatment request source" msgstr "" -#: models_treatments.py:645 +#: models_treatments.py:639 msgid "Can delete own Treatment request source" msgstr "" @@ -1306,55 +1323,61 @@ msgstr "" msgid "Operation" msgstr "" -#: templates/ishtar/sheet_find.html:25 +#: templates/ishtar/sheet_find.html:14 +msgid "" +"This sheet has a downstream treatment: it is related to an old version of " +"the find." +msgstr "" + +#: templates/ishtar/sheet_find.html:29 msgid "Administrative index" msgstr "" -#: templates/ishtar/sheet_find.html:67 +#: templates/ishtar/sheet_find.html:71 msgid "Warehouse" msgstr "" -#: templates/ishtar/sheet_find.html:84 templates/ishtar/sheet_find.html:126 +#: templates/ishtar/sheet_find.html:88 templates/ishtar/sheet_find.html:130 msgid "Year - index" msgstr "" -#: templates/ishtar/sheet_find.html:88 templates/ishtar/sheet_find.html:130 +#: templates/ishtar/sheet_find.html:92 templates/ishtar/sheet_find.html:134 msgid "Related finds (max. 15 displayed)" msgstr "" -#: templates/ishtar/sheet_find.html:116 +#: templates/ishtar/sheet_find.html:120 msgid "Export as CSV" msgstr "" -#: templates/ishtar/sheet_find.html:116 templates/ishtar/sheet_find.html:159 +#: templates/ishtar/sheet_find.html:120 templates/ishtar/sheet_find.html:163 msgid "CSV" msgstr "" -#: templates/ishtar/sheet_find.html:164 +#: templates/ishtar/sheet_find.html:168 msgid "Associated base finds" msgstr "" -#: templates/ishtar/sheet_find.html:171 +#: templates/ishtar/sheet_find.html:175 msgid "Internal ID" msgstr "" -#: templates/ishtar/sheet_find.html:203 +#: templates/ishtar/sheet_find.html:207 msgid "Coordinates" msgstr "" -#: templates/ishtar/sheet_find.html:210 +#: templates/ishtar/sheet_find.html:214 msgid "SRID" msgstr "" -#: templates/ishtar/sheet_find.html:227 +#: templates/ishtar/sheet_find.html:231 msgid "Title" msgstr "" -#: templates/ishtar/sheet_find.html:229 +#: templates/ishtar/sheet_find.html:233 msgid "Authors" msgstr "" -#: templates/ishtar/sheet_find.html:230 +#: templates/ishtar/sheet_find.html:234 msgid "Link" msgstr "" diff --git a/archaeological_finds/models_finds.py b/archaeological_finds/models_finds.py index 407270df9..4c02b170f 100644 --- a/archaeological_finds/models_finds.py +++ b/archaeological_finds/models_finds.py @@ -554,7 +554,10 @@ class Find(BulkUpdatedItem, ValueGetter, BaseHistorizedItem, ImageModel, REVERSED_BOOL_FIELDS = ['image__isnull'] RELATION_TYPES_PREFIX = { 'ope_relation_types': - 'base_finds__context_record__operation__'} + 'base_finds__context_record__operation__', + 'cr_relation_types': + 'base_finds__context_record__', + } RELATIVE_SESSION_NAMES = [ ('contextrecord', 'base_finds__context_record__pk'), ('operation', 'base_finds__context_record__operation__pk'), diff --git a/archaeological_finds/templates/ishtar/sheet_find.html b/archaeological_finds/templates/ishtar/sheet_find.html index a38b62b8c..1604e2018 100644 --- a/archaeological_finds/templates/ishtar/sheet_find.html +++ b/archaeological_finds/templates/ishtar/sheet_find.html @@ -8,6 +8,10 @@ {% if item.image %} <a href='{{item.image.url}}' rel="prettyPhoto" title="{{item.label}}" class='photo'><img src='{{item.thumbnail.url}}'/></a> {% endif%} +{% if item.downstream_treatment %} +<p class='alert'><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> + {% trans "This sheet has a downstream treatment: it is related to an old version of the find." %}</p> +{% endif %} <p class="window-refs">{{ item.label|default:"" }}</p> <p class='window-refs'>{% for base_find in item.base_finds.all %}{% if forloop.counter0 %} – {% endif %}{{base_find.complete_id}}{% endfor %}</p> |