From b5810d9f35c255645e7548741ca60f25d38cc6fc Mon Sep 17 00:00:00 2001 From: Tom Morrell Date: Tue, 28 Nov 2023 00:06:52 +0000 Subject: [PATCH] Add publication status --- app_data/vocabularies.yaml | 3 +++ app_data/vocabularies/publication_status.jsonl | 15 +++++++++++++++ invenio.cfg | 16 ++++++++++++++++ 3 files changed, 34 insertions(+) create mode 100644 app_data/vocabularies/publication_status.jsonl diff --git a/app_data/vocabularies.yaml b/app_data/vocabularies.yaml index 98081ee..a0dbd46 100644 --- a/app_data/vocabularies.yaml +++ b/app_data/vocabularies.yaml @@ -39,3 +39,6 @@ caltechgroups: caltechjournals: pid-type: ctjrnl data-file: vocabularies/caltech_journals.jsonl +publicationstatus: + pid-type: pubsat + data-file: vocabularies/publication_status.jsonl diff --git a/app_data/vocabularies/publication_status.jsonl b/app_data/vocabularies/publication_status.jsonl new file mode 100644 index 0000000..d0e2b4c --- /dev/null +++ b/app_data/vocabularies/publication_status.jsonl @@ -0,0 +1,15 @@ +{"id": "published", "title": {"en": "Published"}} +{"id": "in-press", "title": {"en": "In Press"}} +{"id": "accepted", "title": {"en": "Accepted"}} +{"id": "submitted", "title": {"en": "Submitted"}} +{"id": "draft", "title": {"en": "Draft"}} +{"id": "unpublished", "title": {"en": "Unpublished"}} +{"id": "updated", "title": {"en": "Updated"}} +{"id": "reprint", "title": {"en": "Reprint"}} +{"id": "supplemental-material", "title": {"en": "Supplemental Material"}} +{"id": "erratum", "title": {"en": "Erratum"}} +{"id": "discussion", "title": {"en": "Discussion"}} +{"id": "cover-image", "title": {"en": "Cover Image"}} +{"id": "copyright-permissions", "title": {"en": "Copyright Permissions"}} +{"id": "release-permissions", "title": {"en": "Release Permissions"}} +{"id": "oa-waiver", "title": {"en": "OA Waiver"}} diff --git a/invenio.cfg b/invenio.cfg index bfcd8c5..49e317f 100644 --- a/invenio.cfg +++ b/invenio.cfg @@ -430,6 +430,9 @@ RDM_CUSTOM_FIELDS = [ VocabularyCF( name="caltech:journals", dump_options=False, vocabulary_id="caltechjournals" ), + VocabularyCF( + name="caltech:publication_status", dump_options=True, vocabulary_id="publicationstatus",multiple=True + ), ] # Hide "meeting" section in the landing page @@ -518,6 +521,19 @@ RDM_CUSTOM_FIELDS_UI = [ clearable=True, ), ), + dict( + field="caltech:publication_status", + ui_widget="Dropdown", + props=dict( + label="Publication Status", + placeholder="Add publication status tags...", + icon="address book", + autocompleteFrom="/api/vocabularies/publicationstatus", + search=True, + multiple=True, + clearable=True, + ), + ), ], }, # meeting