diff --git a/oarepo_requests/actions/new_version.py b/oarepo_requests/actions/new_version.py index 3d7c28c..0987687 100644 --- a/oarepo_requests/actions/new_version.py +++ b/oarepo_requests/actions/new_version.py @@ -46,7 +46,7 @@ def apply( if ( "payload" in self.request and "keep_files" in self.request["payload"] - and self.request["payload"]["keep_files"] == "true" + and self.request["payload"]["keep_files"] == "yes" ): topic_service.import_files(identity, new_version_topic.id) diff --git a/oarepo_requests/translations/cs/LC_MESSAGES/messages.mo b/oarepo_requests/translations/cs/LC_MESSAGES/messages.mo index 4018d8e..9e05eab 100644 Binary files a/oarepo_requests/translations/cs/LC_MESSAGES/messages.mo and b/oarepo_requests/translations/cs/LC_MESSAGES/messages.mo differ diff --git a/oarepo_requests/translations/cs/LC_MESSAGES/messages.po b/oarepo_requests/translations/cs/LC_MESSAGES/messages.po index a3f73a2..eab43f0 100644 --- a/oarepo_requests/translations/cs/LC_MESSAGES/messages.po +++ b/oarepo_requests/translations/cs/LC_MESSAGES/messages.po @@ -742,3 +742,7 @@ msgstr "" #: /home/ron/prace/oarepo-requests/oarepo_requests/types/publish_draft.py:124 msgid "Missing uploaded files." msgstr "Chybí nahrané soubory." + +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/new_version.py:78 +msgid "Yes or no" +msgstr "Ano nebo ne" diff --git a/oarepo_requests/translations/en/LC_MESSAGES/messages.mo b/oarepo_requests/translations/en/LC_MESSAGES/messages.mo index 57f1e75..dc66058 100644 Binary files a/oarepo_requests/translations/en/LC_MESSAGES/messages.mo and b/oarepo_requests/translations/en/LC_MESSAGES/messages.mo differ diff --git a/oarepo_requests/translations/en/LC_MESSAGES/messages.po b/oarepo_requests/translations/en/LC_MESSAGES/messages.po index 952c17b..588529b 100644 --- a/oarepo_requests/translations/en/LC_MESSAGES/messages.po +++ b/oarepo_requests/translations/en/LC_MESSAGES/messages.po @@ -710,5 +710,9 @@ msgstr "" msgid "Missing uploaded files." msgstr "" +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/new_version.py:78 +msgid "Yes or no" +msgstr "" + #~ msgid "No status" #~ msgstr "" diff --git a/oarepo_requests/translations/messages.mo b/oarepo_requests/translations/messages.mo index 89cd1cb..56930bb 100644 Binary files a/oarepo_requests/translations/messages.mo and b/oarepo_requests/translations/messages.mo differ diff --git a/oarepo_requests/translations/messages.pot b/oarepo_requests/translations/messages.pot index ece5c72..5c8f71d 100644 --- a/oarepo_requests/translations/messages.pot +++ b/oarepo_requests/translations/messages.pot @@ -8,454 +8,454 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2024-12-02 14:20+0100\n" +"POT-Creation-Date: 2024-12-11 10:45+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.15.0\n" +"Generated-By: Babel 2.16.0\n" -#: /home/ron/prace/oarepo-requests/oarepo_requests/invenio_patches.py:163 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/invenio_patches.py:159 msgid "Submitted" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/invenio_patches.py:164 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/invenio_patches.py:160 msgid "Expired" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/invenio_patches.py:165 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/invenio_patches.py:161 msgid "Accepted" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/invenio_patches.py:166 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/invenio_patches.py:162 msgid "Declined" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/invenio_patches.py:167 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/invenio_patches.py:163 msgid "Cancelled" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/invenio_patches.py:169 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/invenio_patches.py:165 msgid "Request status" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/invenio_patches.py:175 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/invenio_patches.py:171 msgid "Type" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/actions/delete_published_record.py:30 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/actions/delete_published_record.py:30 msgid "Permanently delete" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/actions/delete_published_record.py:52 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/actions/delete_published_record.py:52 msgid "Keep the record" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/actions/generic.py:137 -#: /home/ron/prace/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:28 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/actions/generic.py:138 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:30 msgid "Submit" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/actions/generic.py:143 -#: /home/ron/prace/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:24 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/actions/generic.py:144 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:26 msgid "Decline" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/actions/generic.py:149 -#: /home/ron/prace/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:22 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/actions/generic.py:150 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:24 msgid "Accept" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/actions/publish_draft.py:64 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/actions/publish_draft.py:64 msgid "Publish" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/actions/publish_draft.py:97 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/actions/publish_draft.py:97 msgid "Return for correction" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/resolvers/ui.py:333 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/resolvers/ui.py:329 msgid "System user" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/resolvers/ui.py:605 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/resolvers/ui.py:604 msgid "Auto approve" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/services/ui_schema.py:159 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/services/ui_schema.py:159 msgid "status" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:10 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:12 msgid "Create Request" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:11 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:13 msgid "Open dialog for request" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:12 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:14 msgid "My Requests" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:13 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:15 msgid "Requests to Approve" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:14 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:16 msgid "Are you sure?" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:15 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:17 msgid "Cancel" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:16 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:18 msgid "OK" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:17 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:19 msgid "Create request" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:18 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:20 msgid "Submit request" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:19 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:21 msgid "Delete request" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:20 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:22 msgid "Delete" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:21 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:23 msgid "Accept request" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:23 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:25 msgid "Decline request" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:25 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:27 msgid "Create and submit request" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:26 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:28 msgid "Create and submit" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:27 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:29 msgid "Error sending request" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:29 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:31 msgid "Save drafted request" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:30 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:32 msgid "Save" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:31 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:33 msgid "Create" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:32 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:34 msgid "Creator" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:33 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:35 msgid "Receiver" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:34 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:36 msgid "Request type" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:35 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:37 msgid "Created" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:36 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:38 msgid "Timeline" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:37 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:39 msgid "Submit event" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:38 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:40 msgid "No requests to show" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:39 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:41 msgid "api.requests" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:40 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/translations/_only_for_translations.py:42 msgid "api.applicable-requests" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/delete_draft.py:34 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/delete_draft.py:35 msgid "Delete draft" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/delete_draft.py:46 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/delete_draft.py:52 msgid "Request deletion of draft" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/delete_draft.py:63 -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/delete_draft.py:68 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/delete_draft.py:69 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/delete_draft.py:74 msgid "Request draft deletion" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/delete_draft.py:66 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/delete_draft.py:72 msgid "Draft deletion requested" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/delete_draft.py:81 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/delete_draft.py:87 msgid "Click to permanently delete the draft." msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/delete_draft.py:84 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/delete_draft.py:90 msgid "Request permission to delete the draft." msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/delete_draft.py:88 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/delete_draft.py:94 msgid "" "Permission to delete draft requested. You will be notified about the " "decision by email." msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/delete_draft.py:93 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/delete_draft.py:99 msgid "" "You have been asked to approve the request to permanently delete the draft. " "You can approve or reject the request." msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/delete_draft.py:97 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/delete_draft.py:103 msgid "Permission to delete draft (including files) requested. " msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/delete_draft.py:100 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/delete_draft.py:106 msgid "Submit request to get permission to delete the draft." msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/delete_draft.py:101 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/delete_draft.py:107 msgid "You do not have permission to delete the draft." msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/delete_published_record.py:38 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/delete_published_record.py:39 msgid "Delete record" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/delete_published_record.py:51 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/delete_published_record.py:57 msgid "Request deletion of published record" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/delete_published_record.py:68 -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/delete_published_record.py:73 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/delete_published_record.py:74 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/delete_published_record.py:79 msgid "Request record deletion" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/delete_published_record.py:71 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/delete_published_record.py:77 msgid "Record deletion requested" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/delete_published_record.py:86 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/delete_published_record.py:92 msgid "Click to permanently delete the record." msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/delete_published_record.py:89 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/delete_published_record.py:95 msgid "Request permission to delete the record." msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/delete_published_record.py:93 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/delete_published_record.py:99 msgid "" "Permission to delete record requested. You will be notified about the " "decision by email." msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/delete_published_record.py:98 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/delete_published_record.py:104 msgid "" "You have been asked to approve the request to permanently delete the record." " You can approve or reject the request." msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/delete_published_record.py:102 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/delete_published_record.py:108 msgid "Permission to delete record (including files) requested. " msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/delete_published_record.py:105 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/delete_published_record.py:111 msgid "Submit request to get permission to delete the record." msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/delete_published_record.py:106 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/delete_published_record.py:112 msgid "You do not have permission to delete the record." msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/edit_record.py:45 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/edit_record.py:45 msgid "Edit metadata" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/edit_record.py:65 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/edit_record.py:71 msgid "Request re-opening of published record" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/edit_record.py:122 -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/edit_record.py:127 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/edit_record.py:128 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/edit_record.py:133 msgid "Request edit access" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/edit_record.py:125 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/edit_record.py:131 msgid "Edit access requested" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/edit_record.py:140 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/edit_record.py:146 msgid "Click to start editing the metadata of the record." msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/edit_record.py:143 -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/edit_record.py:160 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/edit_record.py:149 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/edit_record.py:166 msgid "" "Request edit access to the record. You will be notified about the decision " "by email." msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/edit_record.py:150 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/edit_record.py:156 msgid "" "Edit access requested. You will be notified about the decision by email." msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/edit_record.py:155 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/edit_record.py:161 msgid "You have been requested to grant edit access to the record." msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/edit_record.py:158 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/edit_record.py:164 msgid "Edit access requested." msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/new_version.py:40 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/new_version.py:40 msgid "New Version" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/new_version.py:61 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/new_version.py:69 msgid "Request requesting creation of new version of a published record." msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/new_version.py:69 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/new_version.py:77 msgid "Keep files:" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/new_version.py:70 -msgid "Keep files in the new version?" +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/new_version.py:78 +msgid "Yes or no" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/new_version.py:71 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/new_version.py:79 msgid "" "If you choose yes, the current record's files will be linked to the new " "version of the record. Then you will be able to add/remove files in the " "form." msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/new_version.py:74 -msgid "No" +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/new_version.py:83 +msgid "Yes" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/new_version.py:75 -msgid "Yes" +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/new_version.py:84 +msgid "No" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/new_version.py:123 -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/new_version.py:128 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/new_version.py:133 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/new_version.py:138 msgid "Request new version access" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/new_version.py:126 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/new_version.py:136 msgid "New version access requested" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/new_version.py:141 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/new_version.py:151 msgid "Click to start creating a new version of the record." msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/new_version.py:144 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/new_version.py:154 msgid "" "Request permission to update record (including files). You will be notified " "about the decision by email." msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/new_version.py:151 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/new_version.py:161 msgid "" "Permission to update record (including files) requested. You will be " "notified about the decision by email." msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/new_version.py:156 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/new_version.py:166 msgid "" "You have been asked to approve the request to update the record. You can " "approve or reject the request." msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/new_version.py:160 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/new_version.py:170 msgid "Permission to update record (including files) requested. " msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/new_version.py:163 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/new_version.py:173 msgid "Submit request to get edit access to the record." msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/new_version.py:164 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/new_version.py:174 msgid "You do not have permission to update the record." msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/publish_draft.py:45 -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/publish_draft.py:154 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/publish_draft.py:45 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/publish_draft.py:154 msgid "Publish draft" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/publish_draft.py:62 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/publish_draft.py:62 msgid "Resource version" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/publish_draft.py:63 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/publish_draft.py:63 msgid "Write down the version (first, second…)." msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/publish_draft.py:78 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/publish_draft.py:78 msgid "Request publishing of a draft" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/publish_draft.py:120 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/publish_draft.py:120 msgid "" "Missing uploaded files. To disable files for this record please mark it as " "metadata-only." msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/publish_draft.py:124 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/publish_draft.py:124 msgid "Missing uploaded files." msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/publish_draft.py:156 -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/publish_draft.py:161 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/publish_draft.py:156 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/publish_draft.py:161 msgid "Submit for review" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/publish_draft.py:159 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/publish_draft.py:159 msgid "Submitted for review" msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/publish_draft.py:174 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/publish_draft.py:174 msgid "" "Click to immediately publish the draft. The draft will be a subject to " "embargo as requested in the side panel. Note: The action is irreversible." msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/publish_draft.py:181 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/publish_draft.py:181 msgid "" "By submitting the draft for review you are requesting the publication of the" " draft. The draft will become locked and no further changes will be possible" @@ -463,39 +463,42 @@ msgid "" "decision by email." msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/publish_draft.py:189 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/publish_draft.py:189 msgid "" "The draft has been submitted for review. It is now locked and no further " "changes are possible. You will be notified about the decision by email." msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/publish_draft.py:195 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/publish_draft.py:195 msgid "" "The draft has been submitted for review. You can now accept or decline the " "request." msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/publish_draft.py:199 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/publish_draft.py:199 msgid "The draft has been submitted for review." msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/publish_draft.py:202 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/publish_draft.py:202 msgid "" "Submit for review. After submitting the draft for review, it will be locked " "and no further modifications will be possible." msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/types/publish_draft.py:206 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/types/publish_draft.py:206 msgid "Request not yet submitted." msgstr "" -#: /home/ron/prace/oarepo-requests/oarepo_requests/ui/templates/semantic-ui/oarepo_requests_ui/RequestDetail.jinja:3 +#: /home/dusanst/Projects/oarepo-requests/oarepo_requests/ui/templates/semantic-ui/oarepo_requests_ui/RequestDetail.jinja:3 msgid "Request" msgstr "" msgid "Cancel request" msgstr "" +msgid "Record has validation errors. Redirecting to form..." +msgstr "" + msgid "Request not created successfully. Please try again in a moment." msgstr "" @@ -623,9 +626,6 @@ msgstr "" msgid "Error loading requests" msgstr "" -msgid "Record has validation errors. Redirecting to form..." -msgstr "" - msgid "Back to requests" msgstr "" diff --git a/oarepo_requests/types/new_version.py b/oarepo_requests/types/new_version.py index eacb47e..e2220fe 100644 --- a/oarepo_requests/types/new_version.py +++ b/oarepo_requests/types/new_version.py @@ -54,7 +54,7 @@ class NewVersionRequestType(NonDuplicableOARepoRequestType): attribute="draft_record:id", data_key="draft_record:id", ), - "keep_files": ma.fields.String(validate=OneOf(["true", "false"])), + "keep_files": ma.fields.String(validate=OneOf(["yes", "no"])), } def get_ui_redirect_url(self, request: Request, ctx: dict) -> str: @@ -86,15 +86,17 @@ def available_actions(cls) -> dict[str, type[RequestAction]]: form = { "field": "keep_files", - "ui_widget": "BooleanCheckbox", + "ui_widget": "Dropdown", "props": { "label": _("Keep files:"), - "placeholder": _("Keep files in the new version?"), + "placeholder": _("Yes or no"), "description": _( "If you choose yes, the current record's files will be linked to the new version of the record. Then you will be able to add/remove files in the form." ), - "falseLabel": _("No"), - "trueLabel": _("Yes"), + "options": [ + {"id": "yes", "title_l10n": _("Yes")}, + {"id": "no", "title_l10n": _("No")}, + ], }, } diff --git a/oarepo_requests/ui/theme/assets/semantic-ui/js/oarepo_requests_ui/common/actions/DirectCreateAndSubmit.jsx b/oarepo_requests/ui/theme/assets/semantic-ui/js/oarepo_requests_ui/common/actions/DirectCreateAndSubmit.jsx index 24a828a..8221796 100644 --- a/oarepo_requests/ui/theme/assets/semantic-ui/js/oarepo_requests_ui/common/actions/DirectCreateAndSubmit.jsx +++ b/oarepo_requests/ui/theme/assets/semantic-ui/js/oarepo_requests_ui/common/actions/DirectCreateAndSubmit.jsx @@ -22,6 +22,7 @@ const DirectCreateAndSubmit = ({ isLoading, mutate: createAndSubmit, isError, + error, reset, } = useAction({ action: saveAndSubmit, @@ -69,9 +70,13 @@ const DirectCreateAndSubmit = ({ {isError && ( - {i18next.t( - "Request not created successfully. Please try again in a moment." - )} + {error?.response?.data?.errors?.length > 0 + ? i18next.t( + "Record has validation errors. Redirecting to form..." + ) + : i18next.t( + "Request not created successfully. Please try again in a moment." + )} )} diff --git a/oarepo_requests/ui/theme/assets/semantic-ui/js/oarepo_requests_ui/common/actions/RequestActionButton.jsx b/oarepo_requests/ui/theme/assets/semantic-ui/js/oarepo_requests_ui/common/actions/RequestActionButton.jsx index a4febd7..7a548f9 100644 --- a/oarepo_requests/ui/theme/assets/semantic-ui/js/oarepo_requests_ui/common/actions/RequestActionButton.jsx +++ b/oarepo_requests/ui/theme/assets/semantic-ui/js/oarepo_requests_ui/common/actions/RequestActionButton.jsx @@ -27,6 +27,7 @@ export const RequestActionButton = ({ requestOrRequestType: requestOrRequestType, formik, modalControl, + requestActionName, }); const handleClick = () => { diff --git a/oarepo_requests/ui/theme/assets/semantic-ui/js/oarepo_requests_ui/common/components/RequestCommentInput.jsx b/oarepo_requests/ui/theme/assets/semantic-ui/js/oarepo_requests_ui/common/components/RequestCommentInput.jsx index d1ee5fb..a96e9c2 100644 --- a/oarepo_requests/ui/theme/assets/semantic-ui/js/oarepo_requests_ui/common/components/RequestCommentInput.jsx +++ b/oarepo_requests/ui/theme/assets/semantic-ui/js/oarepo_requests_ui/common/components/RequestCommentInput.jsx @@ -37,6 +37,7 @@ export const RequestCommentInput = ({ editorConfig={{ auto_focus: true, min_height: 100, + width: "100%", toolbar: "blocks | bold italic | bullist numlist | outdent indent | undo redo", }} diff --git a/oarepo_requests/ui/theme/assets/semantic-ui/js/oarepo_requests_ui/common/components/RequestModalContent.jsx b/oarepo_requests/ui/theme/assets/semantic-ui/js/oarepo_requests_ui/common/components/RequestModalContent.jsx index 7305aa2..6c51f06 100644 --- a/oarepo_requests/ui/theme/assets/semantic-ui/js/oarepo_requests_ui/common/components/RequestModalContent.jsx +++ b/oarepo_requests/ui/theme/assets/semantic-ui/js/oarepo_requests_ui/common/components/RequestModalContent.jsx @@ -38,13 +38,15 @@ export const RequestModalContent = ({ {description && ( {" "} - - ({i18next.t("Request details")}) - + {request?.links?.self_html && ( + + ({i18next.t("Request details")}) + + )} )} diff --git a/oarepo_requests/ui/theme/assets/semantic-ui/js/oarepo_requests_ui/common/components/SideRequestInfo.jsx b/oarepo_requests/ui/theme/assets/semantic-ui/js/oarepo_requests_ui/common/components/SideRequestInfo.jsx index 08db19e..d075ac2 100644 --- a/oarepo_requests/ui/theme/assets/semantic-ui/js/oarepo_requests_ui/common/components/SideRequestInfo.jsx +++ b/oarepo_requests/ui/theme/assets/semantic-ui/js/oarepo_requests_ui/common/components/SideRequestInfo.jsx @@ -10,15 +10,15 @@ export const SideRequestInfo = ({ request }) => { const statusIcon = getRequestStatusIcon(request?.status_code); return ( - {request?.created_by && + {request?.created_by && ( {i18next.t("Creator")} - {_has(request, "links.created_by_html") ? ( + {_has(request, "links.created_by.self_html") ? ( @@ -30,16 +30,16 @@ export const SideRequestInfo = ({ request }) => { - } - {request?.receiver && + )} + {request?.receiver && ( {i18next.t("Receiver")} - {_has(request, "links.receiver_html") ? ( + {_has(request, "links.receiver.self_html") ? ( @@ -51,7 +51,7 @@ export const SideRequestInfo = ({ request }) => { - } + )} {i18next.t("Status")} @@ -65,15 +65,19 @@ export const SideRequestInfo = ({ request }) => { {i18next.t("Created")} {request.created} - {request?.links?.topic_html && ( + {request?.links?.topic?.self_html && ( {i18next.t("Topic")} - + {request?.topic?.label ? _truncate(request?.topic?.label, { - length: 350, - }) + length: 350, + }) : i18next.t("Request topic")} diff --git a/oarepo_requests/ui/theme/assets/semantic-ui/js/oarepo_requests_ui/common/components/TimelineActionEvent.jsx b/oarepo_requests/ui/theme/assets/semantic-ui/js/oarepo_requests_ui/common/components/TimelineActionEvent.jsx index 2ecdb56..2281830 100644 --- a/oarepo_requests/ui/theme/assets/semantic-ui/js/oarepo_requests_ui/common/components/TimelineActionEvent.jsx +++ b/oarepo_requests/ui/theme/assets/semantic-ui/js/oarepo_requests_ui/common/components/TimelineActionEvent.jsx @@ -10,7 +10,8 @@ import { toRelativeTime, Image } from "react-invenio-forms"; export const TimelineActionEvent = ({ event }) => { const createdBy = event?.expanded?.created_by; - const creatorLabel = createdBy?.username || createdBy?.email; + const creatorLabel = + createdBy?.profile?.full_name || createdBy?.username || createdBy?.email; const eventIcon = getRequestStatusIcon(event.payload.event); const feedMessage = getFeedMessage(event.payload.event); diff --git a/oarepo_requests/ui/theme/assets/semantic-ui/js/oarepo_requests_ui/common/components/TimelineCommentEvent.jsx b/oarepo_requests/ui/theme/assets/semantic-ui/js/oarepo_requests_ui/common/components/TimelineCommentEvent.jsx index dadf67d..025d645 100644 --- a/oarepo_requests/ui/theme/assets/semantic-ui/js/oarepo_requests_ui/common/components/TimelineCommentEvent.jsx +++ b/oarepo_requests/ui/theme/assets/semantic-ui/js/oarepo_requests_ui/common/components/TimelineCommentEvent.jsx @@ -15,7 +15,8 @@ import { httpApplicationJson } from "@js/oarepo_ui"; const TimelineCommentEvent = ({ event, requestId, page }) => { const createdBy = event?.expanded?.created_by; - const creatorLabel = createdBy?.username || createdBy?.email; + const creatorLabel = + createdBy?.profile?.full_name || createdBy?.username || createdBy?.email; const [editMode, setEditMode] = useState(false); const [deleteMode, setDeleteMode] = useState(false); const [comment, setComment] = useState(event.payload.content); diff --git a/oarepo_requests/ui/theme/assets/semantic-ui/js/oarepo_requests_ui/common/components/TopicPreview.jsx b/oarepo_requests/ui/theme/assets/semantic-ui/js/oarepo_requests_ui/common/components/TopicPreview.jsx index 4b3e17f..488ebb8 100644 --- a/oarepo_requests/ui/theme/assets/semantic-ui/js/oarepo_requests_ui/common/components/TopicPreview.jsx +++ b/oarepo_requests/ui/theme/assets/semantic-ui/js/oarepo_requests_ui/common/components/TopicPreview.jsx @@ -31,7 +31,7 @@ export const TopicPreview = ({ request }) => { )}