invenio-app-rdm 13.0.0b4.dev1__py2.py3-none-any.whl → 14.0.0b1.dev8__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- invenio_app_rdm/__init__.py +1 -1
- invenio_app_rdm/administration/moderation/__init__.py +11 -0
- invenio_app_rdm/administration/moderation/requests.py +175 -0
- invenio_app_rdm/administration/records/records.py +9 -7
- invenio_app_rdm/administration/templates/semantic-ui/invenio_app_rdm/administration/requests.html +14 -0
- invenio_app_rdm/administration/templates/semantic-ui/invenio_app_rdm/administration/requests_details.html +91 -0
- invenio_app_rdm/administration/user_moderation/user_moderation.py +4 -4
- invenio_app_rdm/administration/users/users.py +0 -5
- invenio_app_rdm/communities_ui/views/communities.py +9 -5
- invenio_app_rdm/config.py +73 -4
- invenio_app_rdm/ext.py +2 -2
- invenio_app_rdm/fixtures/pages.py +5 -2
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/deposit.html +11 -0
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/detail.html +2 -5
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/citation.html +2 -2
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/details.html +2 -2
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/communities.html +8 -7
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/external_resources.html +5 -6
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/licenses.html +9 -13
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/manage_menu.html +8 -5
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/stats.html +2 -4
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/macros/detail.html +1 -1
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/macros/doi.html +7 -5
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/macros/files.html +21 -4
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/tombstone.html +6 -1
- invenio_app_rdm/records_ui/utils.py +93 -1
- invenio_app_rdm/records_ui/views/decorators.py +24 -14
- invenio_app_rdm/records_ui/views/deposits.py +100 -27
- invenio_app_rdm/records_ui/views/filters.py +11 -4
- invenio_app_rdm/records_ui/views/records.py +23 -13
- invenio_app_rdm/requests_ui/templates/semantic-ui/invenio_requests/file-modification/index.html +88 -0
- invenio_app_rdm/requests_ui/templates/semantic-ui/invenio_requests/guest-access-request/index.html +5 -5
- invenio_app_rdm/requests_ui/templates/semantic-ui/invenio_requests/record-deletion/index.html +95 -0
- invenio_app_rdm/requests_ui/views/requests.py +54 -87
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/auditLogs/ViewRecentChanges.js +8 -8
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/components/ImpersonateUserForm.js +12 -17
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/components/RevisionsDiffViewer.js +14 -16
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/components/SetQuotaAction.js +1 -1
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/api/routes.js +1 -2
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/requests/RequestsSearchResultItem.js +81 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/requests/RequestsSearchbarLayout.js +48 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/requests/index.js +22 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/communityRecordsSearch/CommunityRecordsSearchAppLayout.js +3 -4
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/components/CopyButton.js +38 -19
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/components/FileModificationUntil.js +45 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/components/RecordDeletion/DeletionModal.js +354 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/components/RecordDeletion/DeletionRadioGroup.js +44 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/components/RecordDeletion.js +81 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/deposit/RDMDepositForm.js +55 -5
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/deposit/index.js +4 -1
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/CommunitiesManagement.js +2 -2
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ExportDropdown.js +7 -2
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ManageButton.js +52 -19
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/RecordCitationField.js +15 -14
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/RecordCommunitiesListModal/RecordCommunitiesListModal.js +4 -4
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/RecordCommunitySubmission/RecordCommunitySubmissionModal.js +1 -1
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/RecordManagement.js +17 -3
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/RecordVersionsList.js +16 -17
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/RemoveFromCommunity/RemoveFromCommunityAction.js +5 -5
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/index.js +42 -40
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/theme.js +9 -5
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/requests/timeline/AccessRequestTimelineEdit.js +5 -5
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/requests/timeline/AccessRequestTimelineRead.js +2 -2
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/search/components.js +14 -19
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/theme.js +9 -0
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/file_uploader/uppy.less +37 -0
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/landing_page/licenses.less +5 -3
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/globals/site.overrides +6 -1
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/modules/accordion.overrides +10 -1
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/modules/search.overrides +7 -0
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/modules/search.variables +0 -0
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/i18next.js +1 -1
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/_generatedTranslations.js +66 -0
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ar/messages.po +804 -137
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ar/translations.json +277 -249
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/bg/messages.po +689 -70
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/bg/translations.json +102 -82
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ca/messages.po +699 -80
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ca/translations.json +112 -92
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/cs/messages.po +821 -138
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/cs/translations.json +290 -262
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/da/messages.po +691 -66
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/da/translations.json +91 -71
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/de/messages.po +818 -138
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/de/translations.json +260 -240
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/el/messages.po +698 -78
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/el/translations.json +108 -88
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/en/messages.po +1000 -5
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/en/translations.json +81 -28
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/es/messages.po +810 -137
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/es/translations.json +253 -233
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/et/messages.po +746 -133
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/et/translations.json +130 -110
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/fa/messages.po +688 -69
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/fa/translations.json +103 -79
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/fr/messages.po +809 -126
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/fr/translations.json +277 -257
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/hr/messages.po +695 -70
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/hr/translations.json +101 -79
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/hu/messages.po +801 -135
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/hu/translations.json +254 -234
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/index.js +16 -65
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/it/messages.po +712 -86
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/it/translations.json +116 -96
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ja/messages.po +683 -70
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ja/translations.json +96 -78
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ka/messages.po +689 -70
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ka/translations.json +109 -85
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ko/messages.po +889 -0
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ko/translations.json +277 -0
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/lt/messages.po +702 -71
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/lt/translations.json +113 -85
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/no/messages.po +689 -70
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/no/translations.json +102 -82
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/pl/messages.po +704 -70
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/pl/translations.json +119 -91
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/pt/messages.po +694 -69
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/pt/translations.json +93 -73
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ro/messages.po +717 -85
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ro/translations.json +155 -133
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ru/messages.po +806 -124
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ru/translations.json +288 -260
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/sk/messages.po +713 -82
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/sk/translations.json +119 -91
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/sv/messages.po +807 -141
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/sv/translations.json +260 -240
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/tr/messages.po +799 -128
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/tr/translations.json +259 -239
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/uk/messages.po +756 -131
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/uk/translations.json +124 -96
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/zh_CN/messages.po +736 -123
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/zh_CN/translations.json +130 -108
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/zh_TW/messages.po +683 -70
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/zh_TW/translations.json +100 -78
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/package.json +3 -37
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/translations.pot +243 -94
- invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/help/search.de.html +2 -2
- invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/help/search.en.html +4 -4
- invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/help/search.sv.html +4 -4
- invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/intro_section.html +7 -6
- invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/macros/records_list.html +2 -1
- invenio_app_rdm/theme/templates/semantic-ui/invenio_communities/default_static_page.html +26 -0
- invenio_app_rdm/theme/webpack.py +3 -2
- invenio_app_rdm/translations/ar/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/ar/LC_MESSAGES/messages.po +972 -376
- invenio_app_rdm/translations/bg/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/bg/LC_MESSAGES/messages.po +907 -278
- invenio_app_rdm/translations/ca/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/ca/LC_MESSAGES/messages.po +912 -283
- invenio_app_rdm/translations/cs/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/cs/LC_MESSAGES/messages.po +1069 -405
- invenio_app_rdm/translations/da/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/da/LC_MESSAGES/messages.po +908 -273
- invenio_app_rdm/translations/de/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/de/LC_MESSAGES/messages.po +1017 -406
- invenio_app_rdm/translations/el/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/el/LC_MESSAGES/messages.po +915 -286
- invenio_app_rdm/translations/es/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/es/LC_MESSAGES/messages.po +963 -371
- invenio_app_rdm/translations/et/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/et/LC_MESSAGES/messages.po +938 -362
- invenio_app_rdm/translations/fa/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/fa/LC_MESSAGES/messages.po +906 -277
- invenio_app_rdm/translations/fr/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/fr/LC_MESSAGES/messages.po +1032 -375
- invenio_app_rdm/translations/hr/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/hr/LC_MESSAGES/messages.po +907 -278
- invenio_app_rdm/translations/hu/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/hu/LC_MESSAGES/messages.po +985 -369
- invenio_app_rdm/translations/it/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/it/LC_MESSAGES/messages.po +928 -298
- invenio_app_rdm/translations/ja/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/ja/LC_MESSAGES/messages.po +907 -278
- invenio_app_rdm/translations/ka/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/ka/LC_MESSAGES/messages.po +909 -280
- invenio_app_rdm/translations/ko/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/ko/LC_MESSAGES/messages.po +1361 -0
- invenio_app_rdm/translations/lt/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/lt/LC_MESSAGES/messages.po +910 -281
- invenio_app_rdm/translations/messages.pot +486 -303
- invenio_app_rdm/translations/no/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/no/LC_MESSAGES/messages.po +907 -278
- invenio_app_rdm/translations/pl/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/pl/LC_MESSAGES/messages.po +907 -278
- invenio_app_rdm/translations/pt/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/pt/LC_MESSAGES/messages.po +906 -277
- invenio_app_rdm/translations/ro/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/ro/LC_MESSAGES/messages.po +1042 -384
- invenio_app_rdm/translations/ru/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/ru/LC_MESSAGES/messages.po +1022 -370
- invenio_app_rdm/translations/sk/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/sk/LC_MESSAGES/messages.po +916 -287
- invenio_app_rdm/translations/sv/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/sv/LC_MESSAGES/messages.po +989 -380
- invenio_app_rdm/translations/tr/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/tr/LC_MESSAGES/messages.po +992 -341
- invenio_app_rdm/translations/uk/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/uk/LC_MESSAGES/messages.po +935 -356
- invenio_app_rdm/translations/zh_CN/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/zh_CN/LC_MESSAGES/messages.po +939 -347
- invenio_app_rdm/translations/zh_TW/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/zh_TW/LC_MESSAGES/messages.po +907 -278
- invenio_app_rdm/upgrade_scripts/migrate_12_0_to_13_0.py +190 -62
- {invenio_app_rdm-13.0.0b4.dev1.dist-info → invenio_app_rdm-14.0.0b1.dev8.dist-info}/METADATA +118 -7
- {invenio_app_rdm-13.0.0b4.dev1.dist-info → invenio_app_rdm-14.0.0b1.dev8.dist-info}/RECORD +209 -225
- {invenio_app_rdm-13.0.0b4.dev1.dist-info → invenio_app_rdm-14.0.0b1.dev8.dist-info}/entry_points.txt +2 -0
- {invenio_app_rdm-13.0.0b4.dev1.dist-info → invenio_app_rdm-14.0.0b1.dev8.dist-info}/top_level.txt +0 -1
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/i18next-scanner.config.js +0 -64
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/package-lock.json +0 -1512
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/scripts/compileCatalog.js +0 -40
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/scripts/initCatalog.js +0 -20
- tests/__init__.py +0 -8
- tests/api/__init__.py +0 -8
- tests/api/conftest.py +0 -24
- tests/api/test_protect_files_rest.py +0 -73
- tests/api/test_record_api.py +0 -175
- tests/api/test_stats_api.py +0 -26
- tests/conftest.py +0 -390
- tests/fixtures/__init__.py +0 -8
- tests/fixtures/app_data/oai_sets.yaml +0 -3
- tests/fixtures/app_data/pages/about.html +0 -1
- tests/fixtures/app_data/pages.yaml +0 -4
- tests/fixtures/conftest.py +0 -27
- tests/fixtures/test_cli.py +0 -25
- tests/fixtures/test_fixtures.py +0 -46
- tests/mock_module/__init__.py +0 -7
- tests/mock_module/templates/mock_mail.html +0 -27
- tests/mock_module/views.py +0 -32
- tests/redirector/__init__.py +0 -8
- tests/redirector/conftest.py +0 -54
- tests/redirector/test_redirector.py +0 -28
- tests/test_tasks.py +0 -209
- tests/test_utils.py +0 -67
- tests/test_version.py +0 -16
- tests/test_views.py +0 -43
- tests/ui/__init__.py +0 -8
- tests/ui/conftest.py +0 -115
- tests/ui/test_deposits.py +0 -115
- tests/ui/test_export_formats.py +0 -37
- tests/ui/test_file_download.py +0 -73
- tests/ui/test_filters.py +0 -10
- tests/ui/test_robotstxt.py +0 -35
- tests/ui/test_signposting_ui.py +0 -95
- tests/ui/test_sitemaps.py +0 -85
- tests/ui/test_stats_ui.py +0 -92
- {invenio_app_rdm-13.0.0b4.dev1.dist-info → invenio_app_rdm-14.0.0b1.dev8.dist-info}/WHEEL +0 -0
- {invenio_app_rdm-13.0.0b4.dev1.dist-info → invenio_app_rdm-14.0.0b1.dev8.dist-info}/licenses/LICENSE +0 -0
invenio_app_rdm/__init__.py
CHANGED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
#
|
|
3
|
+
# Copyright (C) 2025 CERN.
|
|
4
|
+
#
|
|
5
|
+
# Invenio App RDM is free software; you can redistribute it and/or modify it
|
|
6
|
+
# under the terms of the MIT License; see LICENSE file for more details.
|
|
7
|
+
"""Requests moderation administration module."""
|
|
8
|
+
|
|
9
|
+
from .requests import ModerationRequestDetailView, ModerationRequestListView
|
|
10
|
+
|
|
11
|
+
__all__ = ("ModerationRequestListView", "ModerationRequestDetailView")
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
#
|
|
3
|
+
# Copyright (C) 2025 CERN.
|
|
4
|
+
#
|
|
5
|
+
# Invenio App RDM is free software; you can redistribute it and/or modify it
|
|
6
|
+
# under the terms of the MIT License; see LICENSE file for more details.
|
|
7
|
+
"""Invenio administration view module for requests moderation."""
|
|
8
|
+
|
|
9
|
+
from functools import partial
|
|
10
|
+
|
|
11
|
+
from flask import current_app, g
|
|
12
|
+
from flask_login import current_user
|
|
13
|
+
from invenio_administration.views.base import (
|
|
14
|
+
AdminResourceDetailView,
|
|
15
|
+
AdminResourceListView,
|
|
16
|
+
)
|
|
17
|
+
from invenio_i18n import lazy_gettext as _
|
|
18
|
+
from invenio_i18n.ext import current_i18n
|
|
19
|
+
from invenio_rdm_records.requests import RecordDeletion
|
|
20
|
+
from invenio_requests.proxies import current_requests
|
|
21
|
+
from invenio_search_ui.searchconfig import search_app_config
|
|
22
|
+
from invenio_users_resources.proxies import current_user_resources
|
|
23
|
+
from invenio_vocabularies.proxies import current_service as vocabulary_service
|
|
24
|
+
from marshmallow_utils.fields.babel import gettext_from_dict
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class ModerationRequestListView(AdminResourceListView):
|
|
28
|
+
"""Requests moderation admin search view."""
|
|
29
|
+
|
|
30
|
+
api_endpoint = "/requests"
|
|
31
|
+
extension_name = "invenio-requests"
|
|
32
|
+
name = "requests"
|
|
33
|
+
resource_config = "requests_resource"
|
|
34
|
+
request_headers = {"Accept": "application/vnd.inveniordm.v1+json"}
|
|
35
|
+
title = _("Requests")
|
|
36
|
+
menu_label = _("Requests")
|
|
37
|
+
category = _("Moderation")
|
|
38
|
+
pid_path = "id"
|
|
39
|
+
icon = "mail"
|
|
40
|
+
template = "invenio_app_rdm/administration/requests.html"
|
|
41
|
+
order = 1
|
|
42
|
+
|
|
43
|
+
display_search = True
|
|
44
|
+
display_delete = False
|
|
45
|
+
display_create = False
|
|
46
|
+
display_edit = False
|
|
47
|
+
display_read = False
|
|
48
|
+
|
|
49
|
+
search_config_name = "APP_RDM_MODERATION_REQUEST_SEARCH"
|
|
50
|
+
search_facets_config_name = "APP_RDM_MODERATION_REQUEST_FACETS"
|
|
51
|
+
search_sort_config_name = "APP_RDM_MODERATION_REQUEST_SORT_OPTIONS"
|
|
52
|
+
|
|
53
|
+
item_field_list = {
|
|
54
|
+
"type": {"text": _("Type"), "order": 1, "width": 3},
|
|
55
|
+
"created": {"text": _("Created"), "order": 2, "width": 3},
|
|
56
|
+
"last_reply": {"text": _("Last reply"), "order": 3, "width": 3},
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
@property
|
|
60
|
+
def request_type(self):
|
|
61
|
+
"""Request type property."""
|
|
62
|
+
request_type = self.resource.service.request_type_registry.lookup(
|
|
63
|
+
"record-deletion"
|
|
64
|
+
)
|
|
65
|
+
return request_type
|
|
66
|
+
|
|
67
|
+
@classmethod
|
|
68
|
+
def get_service_schema(cls):
|
|
69
|
+
"""Get marshmallow schema of the assigned service."""
|
|
70
|
+
request_type = cls.resource.service.request_type_registry.lookup(
|
|
71
|
+
"record-deletion"
|
|
72
|
+
)
|
|
73
|
+
# handle dynamic schema class declaration for requests
|
|
74
|
+
schema_cls = request_type.marshmallow_schema()
|
|
75
|
+
schema = schema_cls()
|
|
76
|
+
return schema
|
|
77
|
+
|
|
78
|
+
@staticmethod
|
|
79
|
+
def disabled():
|
|
80
|
+
"""Disable the view on demand."""
|
|
81
|
+
return False
|
|
82
|
+
|
|
83
|
+
def init_search_config(self):
|
|
84
|
+
"""Build search view config."""
|
|
85
|
+
return partial(
|
|
86
|
+
search_app_config,
|
|
87
|
+
config_name=self.get_search_app_name(),
|
|
88
|
+
available_facets=current_app.config.get(self.search_facets_config_name),
|
|
89
|
+
sort_options=current_app.config[self.search_sort_config_name],
|
|
90
|
+
endpoint=self.get_api_endpoint(),
|
|
91
|
+
headers=self.get_search_request_headers(),
|
|
92
|
+
initial_filters=[["is_open", "true"]],
|
|
93
|
+
hidden_params=[
|
|
94
|
+
["expand", "1"],
|
|
95
|
+
["type", RecordDeletion.type_id],
|
|
96
|
+
],
|
|
97
|
+
pagination_options=(20, 50),
|
|
98
|
+
default_size=20,
|
|
99
|
+
)
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
class ModerationRequestDetailView(AdminResourceDetailView):
|
|
103
|
+
"""Configuration for moderation request detail view."""
|
|
104
|
+
|
|
105
|
+
url = "/requests/<pid_value>"
|
|
106
|
+
extension_name = "invenio-requests"
|
|
107
|
+
api_endpoint = "/requests"
|
|
108
|
+
name = "request_details"
|
|
109
|
+
resource_config = "requests_resource"
|
|
110
|
+
title = _("Request details")
|
|
111
|
+
display_delete = False
|
|
112
|
+
display_edit = False
|
|
113
|
+
|
|
114
|
+
pid_path = "id"
|
|
115
|
+
template = "invenio_app_rdm/administration/requests_details.html"
|
|
116
|
+
|
|
117
|
+
@classmethod
|
|
118
|
+
def get_service_schema(cls):
|
|
119
|
+
"""Get marshmallow schema of the assigned service."""
|
|
120
|
+
request_type = cls.resource.service.request_type_registry.lookup(
|
|
121
|
+
"record-deletion"
|
|
122
|
+
)
|
|
123
|
+
# handle dynamic schema class declaration for requests
|
|
124
|
+
schema_cls = request_type.marshmallow_schema()
|
|
125
|
+
schema = schema_cls()
|
|
126
|
+
return schema
|
|
127
|
+
|
|
128
|
+
def get_context(self, pid_value=None):
|
|
129
|
+
"""Create details view context."""
|
|
130
|
+
name = self.name
|
|
131
|
+
schema = self.get_service_schema()
|
|
132
|
+
serialized_schema = self._schema_to_json(schema)
|
|
133
|
+
fields = self.item_field_list
|
|
134
|
+
request = current_requests.requests_service.read(
|
|
135
|
+
id_=pid_value, identity=g.identity, expand=True
|
|
136
|
+
).to_dict()
|
|
137
|
+
avatar = current_user_resources.users_service.links_item_tpl.expand(
|
|
138
|
+
g.identity, current_user
|
|
139
|
+
)["avatar"]
|
|
140
|
+
permissions = []
|
|
141
|
+
if "reason" in request["payload"]:
|
|
142
|
+
reason_title = vocabulary_service.read(
|
|
143
|
+
g.identity,
|
|
144
|
+
("removalreasons", request["payload"]["reason"]),
|
|
145
|
+
).to_dict()
|
|
146
|
+
|
|
147
|
+
request["payload"]["reason_label"] = gettext_from_dict(
|
|
148
|
+
reason_title["title"],
|
|
149
|
+
current_i18n.locale,
|
|
150
|
+
current_app.config.get("BABEL_DEFAULT_LOCALE", "en"),
|
|
151
|
+
)
|
|
152
|
+
|
|
153
|
+
return {
|
|
154
|
+
"invenio_request": request,
|
|
155
|
+
"user_avatar": avatar,
|
|
156
|
+
"permissions": permissions,
|
|
157
|
+
"request_headers": self.request_headers,
|
|
158
|
+
"name": name,
|
|
159
|
+
"resource_schema": serialized_schema,
|
|
160
|
+
"fields": fields,
|
|
161
|
+
"exclude_fields": self.item_field_exclude_list,
|
|
162
|
+
"ui_config": self.item_field_list,
|
|
163
|
+
"pid": pid_value,
|
|
164
|
+
"api_endpoint": self.get_api_endpoint(),
|
|
165
|
+
"title": self.title,
|
|
166
|
+
"list_endpoint": self.get_list_view_endpoint(),
|
|
167
|
+
"actions": self.serialize_actions(),
|
|
168
|
+
"pid_path": self.pid_path,
|
|
169
|
+
"display_edit": self.display_edit,
|
|
170
|
+
"display_delete": self.display_delete,
|
|
171
|
+
"list_ui_endpoint": self.get_list_view_endpoint(),
|
|
172
|
+
"resource_name": (
|
|
173
|
+
self.resource_name if self.resource_name else self.pid_path
|
|
174
|
+
),
|
|
175
|
+
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
2
|
#
|
|
3
|
-
# Copyright (C) 2023-
|
|
3
|
+
# Copyright (C) 2023-2025 CERN.
|
|
4
4
|
# Copyright (C) 2023 Graz University of Technology.
|
|
5
5
|
# Copyright (C) 2024 KTH Royal Institute of Technology.
|
|
6
6
|
#
|
|
7
|
-
#
|
|
7
|
+
# Invenio-app-rdm is free software; you can redistribute it and/or
|
|
8
8
|
# modify it under the terms of the MIT License; see LICENSE file for more
|
|
9
9
|
# details.
|
|
10
10
|
|
|
11
|
-
"""Invenio administration
|
|
11
|
+
"""Invenio administration records and drafts list views."""
|
|
12
12
|
|
|
13
13
|
from functools import partial
|
|
14
14
|
|
|
@@ -19,7 +19,7 @@ from invenio_search_ui.searchconfig import search_app_config
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
class RecordAdminListView(AdminResourceListView):
|
|
22
|
-
"""Configuration for
|
|
22
|
+
"""Configuration for the records list view."""
|
|
23
23
|
|
|
24
24
|
api_endpoint = "/records"
|
|
25
25
|
name = "records"
|
|
@@ -27,10 +27,11 @@ class RecordAdminListView(AdminResourceListView):
|
|
|
27
27
|
search_request_headers = {"Accept": "application/vnd.inveniordm.v1+json"}
|
|
28
28
|
title = _("Records")
|
|
29
29
|
menu_label = _("Records")
|
|
30
|
-
category = _("
|
|
30
|
+
category = _("Deposits")
|
|
31
31
|
icon = "file"
|
|
32
32
|
template = "invenio_app_rdm/administration/records/records.html"
|
|
33
33
|
extension_name = "invenio-rdm-records"
|
|
34
|
+
order = 1
|
|
34
35
|
|
|
35
36
|
display_search = True
|
|
36
37
|
display_delete = False
|
|
@@ -103,7 +104,7 @@ class RecordAdminListView(AdminResourceListView):
|
|
|
103
104
|
|
|
104
105
|
|
|
105
106
|
class DraftAdminListView(AdminResourceListView):
|
|
106
|
-
"""Configuration for
|
|
107
|
+
"""Configuration for the drafts list view."""
|
|
107
108
|
|
|
108
109
|
api_endpoint = "/user/records"
|
|
109
110
|
name = "drafts"
|
|
@@ -111,10 +112,11 @@ class DraftAdminListView(AdminResourceListView):
|
|
|
111
112
|
search_request_headers = {"Accept": "application/vnd.inveniordm.v1+json"}
|
|
112
113
|
title = _("Drafts")
|
|
113
114
|
menu_label = _("Drafts")
|
|
114
|
-
category = _("
|
|
115
|
+
category = _("Deposits")
|
|
115
116
|
icon = "upload"
|
|
116
117
|
template = "invenio_app_rdm/administration/records/drafts.html"
|
|
117
118
|
extension_name = "invenio-rdm-records"
|
|
119
|
+
order = 2
|
|
118
120
|
|
|
119
121
|
display_search = True
|
|
120
122
|
display_delete = False
|
invenio_app_rdm/administration/templates/semantic-ui/invenio_app_rdm/administration/requests.html
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{#
|
|
2
|
+
Copyright (C) 2025 CERN.
|
|
3
|
+
|
|
4
|
+
Invenio App RDM is free software; you can redistribute it and/or modify it
|
|
5
|
+
under the terms of the MIT License; see LICENSE file for more details.
|
|
6
|
+
#}
|
|
7
|
+
|
|
8
|
+
{% extends "invenio_administration/search.html" %}
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
{% block javascript %}
|
|
12
|
+
{{ super() }}
|
|
13
|
+
{{ webpack['invenio-requests-administration.js'] }}
|
|
14
|
+
{% endblock %}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
{#
|
|
2
|
+
Copyright (C) 2025 CERN.
|
|
3
|
+
|
|
4
|
+
Invenio App RDM is free software; you can redistribute it and/or modify it
|
|
5
|
+
under the terms of the MIT License; see LICENSE file for more details.
|
|
6
|
+
#}
|
|
7
|
+
|
|
8
|
+
{% extends admin_base_template %}
|
|
9
|
+
|
|
10
|
+
{% from "invenio_requests/macros/request_header.html" import inclusion_request_header %}
|
|
11
|
+
|
|
12
|
+
{% set title = invenio_request.title %}
|
|
13
|
+
|
|
14
|
+
{% block page_title %}{% endblock page_title %}
|
|
15
|
+
|
|
16
|
+
{% block admin_page_content %}
|
|
17
|
+
{% set title = _("Request ") %}
|
|
18
|
+
{{ super() }}
|
|
19
|
+
{%- block request_body %}
|
|
20
|
+
<div class="ui container request-detail-page">
|
|
21
|
+
{%- block request_header %}
|
|
22
|
+
{% set back_button_url = url_for("administration.requests") %}
|
|
23
|
+
{{
|
|
24
|
+
inclusion_request_header(
|
|
25
|
+
back_button_url=back_button_url,
|
|
26
|
+
back_button_text=_("Back to requests"),
|
|
27
|
+
request=invenio_request,
|
|
28
|
+
accepted=request_is_accepted
|
|
29
|
+
)
|
|
30
|
+
}}
|
|
31
|
+
|
|
32
|
+
<div class="twelve wide column mt-10">
|
|
33
|
+
<p><strong>{{ _("Reason:") }}</strong> {{ invenio_request["payload"]["reason_label"] }}</p>
|
|
34
|
+
{%- if invenio_request["payload"]["comment"] %}
|
|
35
|
+
<p><strong>{{ _("Justification:") }}</strong> {{ invenio_request["payload"]["comment"] }}</p>
|
|
36
|
+
{%- endif %}
|
|
37
|
+
</div>
|
|
38
|
+
|
|
39
|
+
<div class="ui divider"></div>
|
|
40
|
+
{%- endblock request_header %}
|
|
41
|
+
|
|
42
|
+
{%- block request_timeline %}
|
|
43
|
+
<div id="request-detail"
|
|
44
|
+
data-record='{{ invenio_request | tojson }}'
|
|
45
|
+
data-default-query-config='{{ dict(size=config["REQUESTS_TIMELINE_PAGE_SIZE"]) | tojson }}'
|
|
46
|
+
data-user-avatar='{{ user_avatar | tojson }}'
|
|
47
|
+
data-permissions='{{ permissions | tojson }}'
|
|
48
|
+
data-config='{{ dict(allowGroupReviewers=config["USERS_RESOURCES_GROUPS_ENABLED"], enableReviewers=config["REQUESTS_REVIEWERS_ENABLED"], maxReviewers=config["REQUESTS_REVIEWERS_MAX_NUMBER"]) | tojson }}'
|
|
49
|
+
>{# react app root #}
|
|
50
|
+
<div class="ui grid">
|
|
51
|
+
<div class="stretched row">
|
|
52
|
+
<div class="thirteen wide column">
|
|
53
|
+
<div class="ui">
|
|
54
|
+
<div class="ui fluid placeholder">
|
|
55
|
+
<div class="image header">
|
|
56
|
+
<div class="line"></div>
|
|
57
|
+
<div class="line"></div>
|
|
58
|
+
</div>
|
|
59
|
+
<div class="paragraph">
|
|
60
|
+
{% for i in range(6) %}
|
|
61
|
+
<div class="line"></div>
|
|
62
|
+
{% endfor %}
|
|
63
|
+
</div>
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
<div class="three wide column">
|
|
68
|
+
{% for i in range(6) %}
|
|
69
|
+
<div class="ui fluid placeholder">
|
|
70
|
+
<div class="image header">
|
|
71
|
+
<div class="line"></div>
|
|
72
|
+
<div class="line"></div>
|
|
73
|
+
</div>
|
|
74
|
+
</div>
|
|
75
|
+
<div class="ui divider"></div>
|
|
76
|
+
{% endfor %}
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
</div>
|
|
80
|
+
</div>
|
|
81
|
+
{%- endblock request_timeline %}
|
|
82
|
+
|
|
83
|
+
</div>
|
|
84
|
+
{% endblock request_body %}
|
|
85
|
+
{% endblock admin_page_content %}
|
|
86
|
+
|
|
87
|
+
{% block javascript %}
|
|
88
|
+
{{ super() }}
|
|
89
|
+
{% include config.THEME_JAVASCRIPT_TEMPLATE %}
|
|
90
|
+
{{ webpack['invenio-requests-base.js'] }}
|
|
91
|
+
{% endblock %}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
2
|
#
|
|
3
|
-
# Copyright (C) 2023-
|
|
3
|
+
# Copyright (C) 2023-2025 CERN.
|
|
4
4
|
# Copyright (C) 2024 KTH Royal Institute of Technology.
|
|
5
5
|
#
|
|
6
6
|
# Invenio App RDM is free software; you can redistribute it and/or modify it
|
|
@@ -27,13 +27,13 @@ class UserModerationListView(AdminResourceListView):
|
|
|
27
27
|
name = "moderation"
|
|
28
28
|
resource_config = "requests_resource"
|
|
29
29
|
request_headers = {"Accept": "application/vnd.inveniordm.v1+json"}
|
|
30
|
-
title = _("Moderation")
|
|
31
|
-
menu_label = _("
|
|
30
|
+
title = _("User Moderation")
|
|
31
|
+
menu_label = _("Users")
|
|
32
32
|
category = _("Moderation")
|
|
33
33
|
pid_path = "id"
|
|
34
34
|
icon = "users"
|
|
35
35
|
template = "invenio_app_rdm/administration/user_moderation.html"
|
|
36
|
-
order =
|
|
36
|
+
order = 2
|
|
37
37
|
|
|
38
38
|
display_search = True
|
|
39
39
|
display_delete = False
|
|
@@ -97,11 +97,6 @@ class UsersListView(AdminResourceListView):
|
|
|
97
97
|
},
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
@staticmethod
|
|
101
|
-
def disabled():
|
|
102
|
-
"""Disable the view on demand."""
|
|
103
|
-
return not current_app.config["USERS_RESOURCES_ADMINISTRATION_ENABLED"]
|
|
104
|
-
|
|
105
100
|
def init_search_config(self):
|
|
106
101
|
"""Build search view config."""
|
|
107
102
|
return partial(
|
|
@@ -112,7 +112,8 @@ def communities_home(pid_value, community, community_ui):
|
|
|
112
112
|
return render_community_theme_template(
|
|
113
113
|
"invenio_communities/details/home/index.html",
|
|
114
114
|
theme=community_ui.get("theme", {}),
|
|
115
|
-
community=
|
|
115
|
+
community=community,
|
|
116
|
+
community_ui=community_ui,
|
|
116
117
|
permissions=permissions,
|
|
117
118
|
records=records_ui,
|
|
118
119
|
metrics=metrics,
|
|
@@ -133,7 +134,8 @@ def communities_browse(pid_value, community, community_ui):
|
|
|
133
134
|
return render_community_theme_template(
|
|
134
135
|
"invenio_communities/details/browse/index.html",
|
|
135
136
|
theme=community_ui.get("theme", {}),
|
|
136
|
-
community=
|
|
137
|
+
community=community,
|
|
138
|
+
community_ui=community_ui,
|
|
137
139
|
permissions=permissions,
|
|
138
140
|
roles_can_update=_get_roles_can_update(community.id),
|
|
139
141
|
roles_can_invite=_get_roles_can_invite(community.id),
|
|
@@ -162,8 +164,9 @@ def community_static_page(pid_value, community, community_ui, **kwargs):
|
|
|
162
164
|
return render_community_theme_template(
|
|
163
165
|
page["template_name"],
|
|
164
166
|
theme=community_ui.get("theme", {}),
|
|
167
|
+
community=community,
|
|
168
|
+
community_ui=community_ui,
|
|
165
169
|
page=page,
|
|
166
|
-
community=community_ui,
|
|
167
170
|
permissions=permissions,
|
|
168
171
|
)
|
|
169
172
|
|
|
@@ -192,11 +195,12 @@ def community_collection(
|
|
|
192
195
|
collection_ui = collection.to_dict()
|
|
193
196
|
return render_community_theme_template(
|
|
194
197
|
"invenio_communities/collections/collection.html",
|
|
198
|
+
theme=community_ui.get("theme", {}),
|
|
199
|
+
community=community,
|
|
200
|
+
community_ui=community_ui,
|
|
195
201
|
collection=collection_ui,
|
|
196
202
|
# TODO _collection should not be accessed from here
|
|
197
203
|
tree=collection._collection.collection_tree,
|
|
198
204
|
logo=logo,
|
|
199
|
-
community=community,
|
|
200
205
|
permissions=community.has_permissions_to(HEADER_PERMISSIONS),
|
|
201
|
-
theme=community_ui.get("theme", {}),
|
|
202
206
|
)
|
invenio_app_rdm/config.py
CHANGED
|
@@ -60,6 +60,8 @@ from invenio_rdm_records.notifications.builders import (
|
|
|
60
60
|
GuestAccessRequestSubmitNotificationBuilder,
|
|
61
61
|
GuestAccessRequestSubmittedNotificationBuilder,
|
|
62
62
|
GuestAccessRequestTokenCreateNotificationBuilder,
|
|
63
|
+
RecordDeletionAcceptNotificationBuilder,
|
|
64
|
+
RecordDeletionDeclineNotificationBuilder,
|
|
63
65
|
UserAccessRequestAcceptNotificationBuilder,
|
|
64
66
|
UserAccessRequestCancelNotificationBuilder,
|
|
65
67
|
UserAccessRequestDeclineNotificationBuilder,
|
|
@@ -87,6 +89,7 @@ from invenio_requests.notifications.builders import (
|
|
|
87
89
|
CommentRequestEventCreateNotificationBuilder,
|
|
88
90
|
)
|
|
89
91
|
from invenio_requests.resources.requests.config import request_error_handlers
|
|
92
|
+
from invenio_requests.services.requests import facets
|
|
90
93
|
from invenio_stats.aggregations import StatAggregator
|
|
91
94
|
from invenio_stats.contrib.event_builders import build_file_unique_id
|
|
92
95
|
from invenio_stats.processors import (
|
|
@@ -491,6 +494,10 @@ CELERY_BEAT_SCHEDULE = {
|
|
|
491
494
|
"task": "invenio_sitemap.tasks.update_sitemap_cache",
|
|
492
495
|
"schedule": crontab(minute=0, hour=2),
|
|
493
496
|
},
|
|
497
|
+
"update-collections-size": {
|
|
498
|
+
"task": "invenio_collections.tasks.update_collections_size",
|
|
499
|
+
"schedule": timedelta(hours=1),
|
|
500
|
+
},
|
|
494
501
|
}
|
|
495
502
|
"""Scheduled tasks configuration (aka cronjobs)."""
|
|
496
503
|
|
|
@@ -818,7 +825,7 @@ APP_RDM_RECORD_EXPORTERS = {
|
|
|
818
825
|
"json-ld": {
|
|
819
826
|
"name": _("JSON-LD"),
|
|
820
827
|
"serializer": (
|
|
821
|
-
"invenio_rdm_records.resources.serializers:
|
|
828
|
+
"invenio_rdm_records.resources.serializers:SchemaorgJSONLDSerializer"
|
|
822
829
|
),
|
|
823
830
|
"content-type": "application/ld+json",
|
|
824
831
|
"filename": "{id}.json",
|
|
@@ -866,7 +873,7 @@ APP_RDM_RECORD_EXPORTERS = {
|
|
|
866
873
|
},
|
|
867
874
|
"bibtex": {
|
|
868
875
|
"name": _("BibTeX"),
|
|
869
|
-
"serializer": ("invenio_rdm_records.resources.serializers:
|
|
876
|
+
"serializer": ("invenio_rdm_records.resources.serializers:BibtexSerializer"),
|
|
870
877
|
"params": {},
|
|
871
878
|
"content-type": "application/x-bibtex",
|
|
872
879
|
"filename": "{id}.bib",
|
|
@@ -899,6 +906,13 @@ APP_RDM_RECORD_EXPORTERS = {
|
|
|
899
906
|
"content-type": "application/x-yaml",
|
|
900
907
|
"filename": "{id}.yaml",
|
|
901
908
|
},
|
|
909
|
+
"datapackage": {
|
|
910
|
+
"name": _("Data Package JSON"),
|
|
911
|
+
"serializer": "invenio_rdm_records.resources.serializers:DataPackageSerializer",
|
|
912
|
+
"params": {},
|
|
913
|
+
"content-type": "application/ld+json",
|
|
914
|
+
"filename": "{id}.json",
|
|
915
|
+
},
|
|
902
916
|
}
|
|
903
917
|
|
|
904
918
|
APP_RDM_RECORD_LANDING_PAGE_EXTERNAL_LINKS = []
|
|
@@ -924,6 +938,13 @@ def github_link_render(record):
|
|
|
924
938
|
|
|
925
939
|
APP_RDM_RECORDS_EXPORT_URL = "/records/<pid_value>/export/<export_format>"
|
|
926
940
|
|
|
941
|
+
APP_RDM_DEPOSIT_NG_FILES_UI_ENABLED = False
|
|
942
|
+
"""
|
|
943
|
+
Feature toggle to enable the next-generation (NG) file uploader UI in the deposit form.
|
|
944
|
+
|
|
945
|
+
When enabled, the deposit form will use the new Uppy.io-based file uploader, replacing the current file upload interface.
|
|
946
|
+
"""
|
|
947
|
+
|
|
927
948
|
APP_RDM_DEPOSIT_FORM_DEFAULTS = {
|
|
928
949
|
"publication_date": lambda: datetime.now().strftime("%Y-%m-%d"),
|
|
929
950
|
"rights": [
|
|
@@ -1074,7 +1095,7 @@ RDM_SEARCH_USER_COMMUNITIES = {
|
|
|
1074
1095
|
|
|
1075
1096
|
RDM_SEARCH_USER_REQUESTS = {
|
|
1076
1097
|
"facets": ["type", "status"],
|
|
1077
|
-
"sort": ["bestmatch", "newest", "oldest"],
|
|
1098
|
+
"sort": ["bestmatch", "newest", "oldest", "newestactivity", "oldestactivity"],
|
|
1078
1099
|
}
|
|
1079
1100
|
"""User requests search configuration (i.e list of user requests)"""
|
|
1080
1101
|
|
|
@@ -1163,6 +1184,7 @@ PAGES_DEFAULT_TEMPLATE = "invenio_app_rdm/default_static_page.html"
|
|
|
1163
1184
|
|
|
1164
1185
|
PAGES_TEMPLATES = [
|
|
1165
1186
|
("invenio_app_rdm/default_static_page.html", "Default"),
|
|
1187
|
+
("invenio_communities/default_static_page.html", "Community"),
|
|
1166
1188
|
]
|
|
1167
1189
|
"""List of available templates for pages."""
|
|
1168
1190
|
|
|
@@ -1405,6 +1427,9 @@ NOTIFICATIONS_BUILDERS = {
|
|
|
1405
1427
|
community_notifications.SubComInvitationAccept.type: community_notifications.SubComInvitationAccept,
|
|
1406
1428
|
community_notifications.SubComInvitationDecline.type: community_notifications.SubComInvitationDecline,
|
|
1407
1429
|
community_notifications.SubComInvitationExpire.type: community_notifications.SubComInvitationExpire,
|
|
1430
|
+
# Record deletion
|
|
1431
|
+
RecordDeletionAcceptNotificationBuilder.type: RecordDeletionAcceptNotificationBuilder,
|
|
1432
|
+
RecordDeletionDeclineNotificationBuilder.type: RecordDeletionDeclineNotificationBuilder,
|
|
1408
1433
|
}
|
|
1409
1434
|
"""Notification builders."""
|
|
1410
1435
|
|
|
@@ -1482,7 +1507,6 @@ ADMINISTRATION_THEME_BASE_TEMPLATE = "invenio_app_rdm/administration_page.html"
|
|
|
1482
1507
|
APP_RDM_SUBCOMMUNITIES_LABEL = "Subcommunities"
|
|
1483
1508
|
"""Label for the subcommunities in the community browse page."""
|
|
1484
1509
|
|
|
1485
|
-
|
|
1486
1510
|
RDM_DETAIL_SIDE_BAR_MANAGE_ATTRIBUTES_EXTENSION_TEMPLATE = None
|
|
1487
1511
|
"""Side bar manage attributes extension template."""
|
|
1488
1512
|
|
|
@@ -1493,3 +1517,48 @@ SITEMAP_SECTIONS = [
|
|
|
1493
1517
|
SitemapSectionOfRDMRecords(),
|
|
1494
1518
|
SitemapSectionOfCommunities(),
|
|
1495
1519
|
]
|
|
1520
|
+
|
|
1521
|
+
|
|
1522
|
+
# Moderation requests search configuration
|
|
1523
|
+
# ========================================
|
|
1524
|
+
APP_RDM_MODERATION_REQUEST_SEARCH = {
|
|
1525
|
+
"facets": ["status", "is_open"],
|
|
1526
|
+
"sort": ["bestmatch", "newest", "oldest", "newestactivity", "oldestactivity"],
|
|
1527
|
+
}
|
|
1528
|
+
"""Moderation requests search configuration."""
|
|
1529
|
+
|
|
1530
|
+
APP_RDM_MODERATION_REQUEST_SORT_OPTIONS = {
|
|
1531
|
+
"bestmatch": dict(
|
|
1532
|
+
title=_("Best match"),
|
|
1533
|
+
fields=["_score"],
|
|
1534
|
+
),
|
|
1535
|
+
"newest": dict(
|
|
1536
|
+
title=_("Newest"),
|
|
1537
|
+
fields=["-created"],
|
|
1538
|
+
),
|
|
1539
|
+
"oldest": dict(
|
|
1540
|
+
title=_("Oldest"),
|
|
1541
|
+
fields=["created"],
|
|
1542
|
+
),
|
|
1543
|
+
"newestactivity": dict(
|
|
1544
|
+
title=_("Newest activity"),
|
|
1545
|
+
fields=["-last_activity_at"],
|
|
1546
|
+
),
|
|
1547
|
+
"oldestactivity": dict(
|
|
1548
|
+
title=_("Oldest activity"),
|
|
1549
|
+
fields=["last_activity_at"],
|
|
1550
|
+
),
|
|
1551
|
+
}
|
|
1552
|
+
"""Definitions of available record sort options."""
|
|
1553
|
+
|
|
1554
|
+
|
|
1555
|
+
APP_RDM_MODERATION_REQUEST_FACETS = {
|
|
1556
|
+
"status": {
|
|
1557
|
+
"facet": facets.status,
|
|
1558
|
+
"ui": {
|
|
1559
|
+
"field": "status",
|
|
1560
|
+
},
|
|
1561
|
+
},
|
|
1562
|
+
"is_open": {"facet": facets.is_open, "ui": {"field": "is_open"}},
|
|
1563
|
+
}
|
|
1564
|
+
"""Available facets defined for this module."""
|
invenio_app_rdm/ext.py
CHANGED
|
@@ -33,10 +33,10 @@ def finalize_app(app):
|
|
|
33
33
|
|
|
34
34
|
def init_config(app):
|
|
35
35
|
"""Initialize configuration."""
|
|
36
|
-
record_doi_required = (
|
|
36
|
+
record_doi_required = bool(
|
|
37
37
|
app.config["RDM_PERSISTENT_IDENTIFIERS"].get("doi", {}).get("required")
|
|
38
38
|
)
|
|
39
|
-
parent_doi_required = (
|
|
39
|
+
parent_doi_required = bool(
|
|
40
40
|
app.config["RDM_PARENT_PERSISTENT_IDENTIFIERS"].get("doi", {}).get("required")
|
|
41
41
|
)
|
|
42
42
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
2
|
#
|
|
3
|
-
# Copyright (C) 2022-
|
|
3
|
+
# Copyright (C) 2022-2025 CERN.
|
|
4
4
|
# Copyright (C) 2025 University of Münster.
|
|
5
5
|
#
|
|
6
6
|
# Invenio App RDM is free software; you can redistribute it and/or modify
|
|
@@ -68,6 +68,9 @@ class StaticPages(FixtureMixin):
|
|
|
68
68
|
),
|
|
69
69
|
"lang": lang[0],
|
|
70
70
|
"description": entry.get("description", ""),
|
|
71
|
-
"template_name":
|
|
71
|
+
"template_name": entry.get(
|
|
72
|
+
"template_name",
|
|
73
|
+
current_app.config["PAGES_DEFAULT_TEMPLATE"],
|
|
74
|
+
),
|
|
72
75
|
}
|
|
73
76
|
current_pages_service.create(system_identity, data)
|
|
@@ -5,6 +5,9 @@
|
|
|
5
5
|
{%- block css %}
|
|
6
6
|
{{ super() }}
|
|
7
7
|
<link rel="stylesheet" type="text/css" href="/communities/{{community.slug}}/community-theme-{{ community.revision_id }}.css">
|
|
8
|
+
{%- if config.APP_RDM_DEPOSIT_NG_FILES_UI_ENABLED %}
|
|
9
|
+
{{ webpack['uppy-file-uploader.css'] }}
|
|
10
|
+
{%- endif %}
|
|
8
11
|
{%- endblock %}
|
|
9
12
|
{%- endif %}
|
|
10
13
|
|
|
@@ -45,10 +48,18 @@
|
|
|
45
48
|
value='{{ config.RDM_RECORDS_RESTRICTION_GRACE_PERIOD.days | tojson }}'>
|
|
46
49
|
<input type="hidden" name="deposits-allow-record-restriction"
|
|
47
50
|
value='{{ config.RDM_RECORDS_ALLOW_RESTRICTION_AFTER_GRACE_PERIOD | tojson }}'>
|
|
51
|
+
{% if record_deletion %}
|
|
52
|
+
<input type="hidden" name="deposits-record-deletion" value='{{ record_deletion | tojson }}'>
|
|
53
|
+
{% endif %}
|
|
54
|
+
{% if file_modification %}
|
|
55
|
+
<input type="hidden" name="deposits-file-modification" value='{{ file_modification | tojson }}'>
|
|
56
|
+
{% endif %}
|
|
48
57
|
<input type="hidden" name="config-groups-enabled"
|
|
49
58
|
value='{{ config.USERS_RESOURCES_GROUPS_ENABLED | tojson }}'>
|
|
50
59
|
<input type="hidden" name="records-resources-allow-empty-files"
|
|
51
60
|
value='{{ config.RECORDS_RESOURCES_ALLOW_EMPTY_FILES | tojson }}'>
|
|
61
|
+
<input type="hidden" name="deposits-use-uppy-ui"
|
|
62
|
+
value='{{ config.APP_RDM_DEPOSIT_NG_FILES_UI_ENABLED | tojson }}'>
|
|
52
63
|
|
|
53
64
|
{%- if forms_config %}
|
|
54
65
|
<input type="hidden" name="deposits-config"
|