From 7e24315f8fc491bb15e104a13b6911a082bf930b Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 27 Feb 2024 11:25:25 +0100 Subject: ✨ Document - shooting angle: bulk update, criteria search, free search indexation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ishtar_common/forms_common.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'ishtar_common/forms_common.py') diff --git a/ishtar_common/forms_common.py b/ishtar_common/forms_common.py index 53a7f7d17..0f0ca58a4 100644 --- a/ishtar_common/forms_common.py +++ b/ishtar_common/forms_common.py @@ -2425,6 +2425,7 @@ class DocumentSelect(HistorySelect): format = forms.ChoiceField(label=_("Format"), choices=[]) support = forms.ChoiceField(label=_("Medium"), choices=[]) scale = forms.CharField(label=_("Scale")) + shooting_angle = forms.ChoiceField(label=_("Shooting angle"), choices=[]) associated_url = forms.CharField(label=_("Web address")) tag = forms.ChoiceField(label=_("Tag"), choices=[]) publisher = forms.IntegerField( @@ -2570,6 +2571,7 @@ class DocumentSelect(HistorySelect): FieldType("licenses", models.LicenseType), FieldType("operations__operation_type", models.OperationType), FieldType("area", models.Area), + FieldType("shooting_angle", models.ShootingAngle), ] PROFILE_FILTER = { @@ -2617,13 +2619,14 @@ class DocumentFormMultiSelection(LockForm, MultiSearchForm): class QADocumentFormMulti(QAForm): form_admin_name = _("Document - Quick action - Modify") form_slug = "document-quickaction-modify" - base_models = ["qa_source_type", "qa_rights_owner"] + base_models = ["qa_source_type", "qa_rights_owner", "qa_shooting_angle"] associated_models = { "qa_source_type": models.SourceType, "qa_authors": models.Author, "qa_tags": models.DocumentTag, "qa_rights_owner": models.Organization, "qa_licenses": models.LicenseType, + "qa_shooting_angle": models.ShootingAngle, } MULTI = True @@ -2633,6 +2636,7 @@ class QADocumentFormMulti(QAForm): "qa_rights_owner", "qa_licenses", "qa_copyright", + "qa_shooting_angle", ] qa_source_type = forms.ChoiceField(label=_("Source type"), required=False) qa_authors = widgets.ModelJQueryAutocompleteField( @@ -2650,6 +2654,7 @@ class QADocumentFormMulti(QAForm): model=models.Organization, label=_("Rights owner"), new=True, required=False ) qa_copyright = forms.CharField(label=_("Copyright"), required=False) + qa_shooting_angle = forms.ChoiceField(label=_("Shooting angle"), choices=[], required=False) TYPES = [ FieldType("qa_source_type", models.SourceType), @@ -2657,6 +2662,7 @@ class QADocumentFormMulti(QAForm): FieldType("qa_support_type", models.SupportType), FieldType("qa_licenses", models.LicenseType), FieldType("qa_tags", models.DocumentTag), + FieldType("qa_shooting_angle", models.ShootingAngle), ] def _get_qa_authors(self, value): -- cgit v1.2.3