invenio-app-rdm 12.0.0.dev8__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 +3 -2
- invenio_app_rdm/{stats/templates/events/record_view/v7 → administration}/__init__.py +1 -3
- invenio_app_rdm/{stats/templates/events/record_view → administration/audit_logs}/__init__.py +6 -4
- invenio_app_rdm/administration/audit_logs/audit_logs.py +81 -0
- invenio_app_rdm/administration/domains/__init__.py +22 -0
- invenio_app_rdm/administration/domains/domains.py +159 -0
- invenio_app_rdm/administration/moderation/__init__.py +11 -0
- invenio_app_rdm/administration/moderation/requests.py +175 -0
- invenio_app_rdm/administration/records/__init__.py +15 -0
- invenio_app_rdm/administration/records/records.py +163 -0
- invenio_app_rdm/administration/templates/semantic-ui/invenio_app_rdm/administration/audit_logs.html +14 -0
- invenio_app_rdm/administration/templates/semantic-ui/invenio_app_rdm/administration/domains_search.html +13 -0
- invenio_app_rdm/administration/templates/semantic-ui/invenio_app_rdm/administration/records/drafts.html +14 -0
- invenio_app_rdm/administration/templates/semantic-ui/invenio_app_rdm/administration/records/records.html +14 -0
- 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/templates/semantic-ui/invenio_app_rdm/administration/user_moderation.html +14 -0
- invenio_app_rdm/administration/templates/semantic-ui/invenio_app_rdm/administration/user_moderation_details.html +14 -0
- invenio_app_rdm/administration/templates/semantic-ui/invenio_app_rdm/administration/users_search.html +14 -0
- invenio_app_rdm/{stats/templates/aggregations/aggr_record_view/v7 → administration/user_moderation}/__init__.py +4 -3
- invenio_app_rdm/administration/user_moderation/user_moderation.py +175 -0
- invenio_app_rdm/administration/users/__init__.py +12 -0
- invenio_app_rdm/administration/users/users.py +130 -0
- invenio_app_rdm/{stats/templates/events/file_download/v7 → administration/views}/__init__.py +4 -3
- invenio_app_rdm/administration/views/ui.py +21 -0
- invenio_app_rdm/cli.py +37 -14
- invenio_app_rdm/communities_ui/searchapp.py +1 -0
- invenio_app_rdm/communities_ui/sitemap.py +63 -0
- invenio_app_rdm/communities_ui/templates/semantic-ui/invenio_communities/collections/collection.html +60 -0
- invenio_app_rdm/communities_ui/templates/semantic-ui/invenio_communities/collections/macros.html +43 -0
- invenio_app_rdm/communities_ui/templates/semantic-ui/invenio_communities/details/browse/index.html +59 -0
- invenio_app_rdm/communities_ui/templates/semantic-ui/invenio_communities/{details → records}/index.html +1 -1
- invenio_app_rdm/communities_ui/views/communities.py +183 -8
- invenio_app_rdm/communities_ui/views/ui.py +52 -42
- invenio_app_rdm/config.py +586 -90
- invenio_app_rdm/ext.py +157 -0
- invenio_app_rdm/fixtures/__init__.py +2 -2
- invenio_app_rdm/fixtures/pages.py +34 -12
- invenio_app_rdm/records_ui/searchapp.py +43 -0
- invenio_app_rdm/records_ui/sitemap.py +44 -0
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/deposit.html +59 -16
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/detail.html +236 -141
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/access-form.html +64 -0
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/citation.html +4 -3
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/contact.html +2 -1
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/creatibutors.html +22 -20
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/description.html +7 -5
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/details.html +290 -230
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/doi.html +3 -24
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/meta.html +36 -0
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/citations.html +6 -0
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/communities.html +30 -22
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/details.html +20 -19
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/export.html +19 -16
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/external_resources.html +55 -0
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/keywords_subjects.html +9 -5
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/licenses.html +62 -49
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/locations.html +23 -0
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/manage_menu.html +24 -4
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/metrics.html +2 -2
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/technical_metadata.html +21 -0
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/versions.html +15 -5
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/stats.html +93 -79
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/subjects.html +1 -1
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/draft_not_found.html +17 -0
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/export.html +2 -1
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/macros/creatibutors.html +54 -39
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/macros/detail.html +182 -93
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/macros/doi.html +36 -0
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/macros/files.html +152 -79
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/macros/locations.html +62 -0
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/macros/version.html +3 -2
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/restricted_with_doi_tombstone.html +33 -0
- invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/tombstone.html +55 -12
- invenio_app_rdm/records_ui/utils.py +126 -1
- invenio_app_rdm/records_ui/views/__init__.py +75 -17
- invenio_app_rdm/records_ui/views/decorators.py +309 -38
- invenio_app_rdm/records_ui/views/deposits.py +302 -51
- invenio_app_rdm/records_ui/views/filters.py +74 -7
- invenio_app_rdm/records_ui/views/records.py +256 -90
- invenio_app_rdm/redirector/resource.py +1 -0
- invenio_app_rdm/requests_ui/templates/semantic-ui/invenio_requests/community-submission/index.html +34 -8
- 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 +66 -0
- invenio_app_rdm/requests_ui/templates/semantic-ui/invenio_requests/macros/request_header.html +5 -3
- invenio_app_rdm/requests_ui/templates/semantic-ui/invenio_requests/record-deletion/index.html +95 -0
- invenio_app_rdm/requests_ui/templates/semantic-ui/invenio_requests/subcommunity/index.html +49 -0
- invenio_app_rdm/requests_ui/templates/semantic-ui/invenio_requests/subcommunity-invitation/index.html +49 -0
- invenio_app_rdm/requests_ui/templates/semantic-ui/invenio_requests/user-access-request/index.html +59 -0
- invenio_app_rdm/requests_ui/views/requests.py +221 -42
- invenio_app_rdm/requests_ui/views/ui.py +17 -4
- invenio_app_rdm/tasks.py +6 -2
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/auditLogs/AuditLogActions.js +136 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/auditLogs/ViewJson.js +35 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/auditLogs/ViewRecentChanges.js +119 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/auditLogs/index.js +31 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/auditLogs/search/SearchResultItemLayout.js +87 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/auditLogs/search/index.js +9 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/components/CompareRevisionsDropdown.js +89 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/components/ImpersonateUser.js +92 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/components/ImpersonateUserForm.js +199 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/components/RevisionsDiffViewer.js +80 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/components/SetQuotaAction.js +109 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/components/SetQuotaForm.js +196 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/components/index.js +9 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/domains/index.js +27 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/domains/search/SearchResultItemLayout.js +185 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/domains/search/index.js +9 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/drafts/index.js +32 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/CompareRevisions.js +129 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/RecordActions.js +75 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/RecordResourceActions.js +185 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/RemovalReasonsSelect.js +85 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/RestoreConfirmation.js +108 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/TombstoneForm.js +212 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/api/api.js +38 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/api/index.js +9 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/api/routes.js +30 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/index.js +40 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/search/AdministrationSearchLayout.js +56 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/search/RecordSearchLayout.js +84 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/search/SearchResultItemLayout.js +171 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/search/filters/DeletionStatusFilter.js +121 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/search/filters/index.js +9 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/search/index.js +10 -0
- 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/administration/userModeration/ModerationActions.js +103 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/userModeration/index.js +29 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/userModeration/search/SearchResultItemLayout.js +151 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/userModeration/search/UserModerationSearchLayout.js +56 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/userModeration/search/index.js +10 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/users/UserActions.js +263 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/users/api/api.js +42 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/users/api/index.js +8 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/users/api/routes.js +38 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/users/index.js +30 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/users/search/SearchResultItemLayout.js +202 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/users/search/UserSearchLayout.js +81 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/users/search/filters/UserStatusFilterComponent.js +114 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/users/search/filters/index.js +1 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/users/search/index.js +10 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/collectionRecordsSearch/index.js +61 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/communityRecordsSearch/CommunityRecordsSearchAppLayout.js +2 -2
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/communityRecordsSearch/CommunityRecordsSearchBarElement.js +1 -1
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/communityRecordsSearch/CommunityRecordsSingleSearchBarElement.js +1 -1
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/communityRecordsSearch/index.js +8 -3
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/components/CompactStats.js +51 -0
- 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/DisplayPartOfCommunities.js +78 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/components/DisplayVerifiedCommunity.js +54 -0
- 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/components/RecordsResultsListItem.js +61 -31
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/deposit/RDMDepositForm.js +680 -486
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/deposit/ShareDraftButton.js +65 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/deposit/config.js +48 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/deposit/index.js +14 -2
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/frontpage/RecordsList.js +61 -21
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/AccessRequestForm.js +254 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/CommunitiesManagement.js +171 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/CommunitiesManagementDropdown.js +186 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/EditButton.js +10 -1
- 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 +140 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ManageDefaultBrandingAction/ManageDefaultBrandingAction.js +129 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/PendingCommunitiesModal/PendingCommunitiesModal.js +63 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/PendingCommunitiesModal/PendingCommunitiesSearch.js +89 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/PendingCommunitiesModal/PendingCommunityRequestItem.js +33 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/RecordCitationField.js +55 -51
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/RecordCommunitiesList.js +87 -89
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/RecordCommunitiesListModal/RecordCommunitiesListModal.js +44 -30
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/RecordCommunitiesListModal/RecordCommunitiesSearch.js +39 -20
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/RecordCommunitiesListModal/RecordCommunitiesSearchItem.js +44 -17
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/RecordCommunitySubmission/RecordCommunitySubmissionModal.js +171 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/RecordManagement.js +111 -62
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/RecordVersionsList.js +99 -61
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/RemoveFromCommunity/RemoveFromCommunityAction.js +188 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ShareOptions/AccessLinks/AccessDropdown.js +93 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ShareOptions/AccessLinks/CreateAccessLink.js +98 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ShareOptions/AccessLinks/LinksSearchItem.js +170 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ShareOptions/AccessLinks/LinksSearchResultContainer.js +216 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ShareOptions/AccessLinks/LinksTab.js +104 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ShareOptions/AccessRequests/AccessRequestsTab.js +230 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ShareOptions/AccessUsersGroups/AccessUsersGroups.js +178 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ShareOptions/AccessUsersGroups/AddUserGroupAccessModal.js +172 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ShareOptions/AccessUsersGroups/GroupsTab.js +88 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ShareOptions/AccessUsersGroups/PeopleTab.js +88 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ShareOptions/AccessUsersGroups/UserGroupAccessSearchResultItem.js +158 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/{ShareButton.js → ShareOptions/ShareButton.js} +13 -4
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ShareOptions/ShareModal.js +238 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ShareOptions/api/api.js +39 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/access.js +24 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/index.js +72 -25
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/theme.js +10 -6
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/overridableRegistry/mapping.js +6 -1
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/requests/AccessRequestExpiration.js +56 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/requests/index.js +1 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/requests/timeline/AccessRequestTimelineEdit.js +177 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/requests/timeline/AccessRequestTimelineRead.js +50 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/requests/timeline/overrides/TimelineFeedHeader.js +34 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/search/components.js +15 -13
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/search/index.js +1 -1
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/subcommunity/browse.js +28 -0
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/theme.js +77 -9
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/user_dashboard/base.js +122 -74
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/user_dashboard/communities.js +1 -11
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/user_dashboard/requests.js +27 -412
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/user_dashboard/uploads.js +15 -14
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/user_dashboard/uploads_items/ComputerTabletUploadsItem.js +47 -27
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/user_dashboard/uploads_items/MobileUploadsItem.js +43 -27
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/utils.js +32 -7
- 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/creatibutors.less +15 -4
- 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/collections/form.overrides +15 -0
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/collections/grid.overrides +24 -33
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/collections/menu.overrides +18 -3
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/collections/message.overrides +19 -3
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/collections/message.variables +2 -0
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/collections/table.overrides +78 -6
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/elements/button.overrides +21 -0
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/elements/container.overrides +30 -7
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/elements/header.overrides +17 -4
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/elements/icon.overrides +2 -0
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/elements/image.overrides +34 -4
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/elements/input.overrides +10 -0
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/elements/label.overrides +48 -4
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/elements/list.overrides +10 -0
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/elements/segment.overrides +16 -13
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/globals/site.overrides +156 -97
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/globals/site.variables +7 -3
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/modules/accordion.overrides +35 -9
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/modules/dropdown.overrides +28 -6
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/modules/dropdown.variables +1 -0
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/modules/modal.overrides +40 -11
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/modules/modal.variables +5 -0
- 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/less/invenio_app_rdm/theme/modules/transition.overrides +8 -8
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/theme.less +2 -5
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/views/card.overrides +4 -2
- invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/views/item.overrides +20 -33
- 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 +805 -138
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ar/translations.json +306 -86
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/bg/messages.po +690 -71
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/bg/translations.json +282 -86
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ca/messages.po +700 -81
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ca/translations.json +282 -86
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/cs/messages.po +822 -139
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/cs/translations.json +294 -86
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/da/messages.po +692 -67
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/da/translations.json +282 -86
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/de/messages.po +819 -139
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/de/translations.json +282 -86
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/el/messages.po +699 -79
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/el/translations.json +282 -86
- 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 +315 -2
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/es/messages.po +811 -138
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/es/translations.json +282 -86
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/et/messages.po +747 -134
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/et/translations.json +282 -86
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/fa/messages.po +689 -70
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/fa/translations.json +282 -86
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/fr/messages.po +810 -127
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/fr/translations.json +282 -86
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/hr/messages.po +696 -71
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/hr/translations.json +288 -86
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/hu/messages.po +804 -137
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/hu/translations.json +282 -86
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/index.js +17 -66
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/it/messages.po +715 -88
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/it/translations.json +282 -86
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ja/messages.po +684 -71
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ja/translations.json +276 -86
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ka/messages.po +690 -71
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ka/translations.json +282 -86
- 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 +703 -72
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/lt/translations.json +294 -86
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/no/messages.po +690 -71
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/no/translations.json +282 -86
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/pl/messages.po +705 -71
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/pl/translations.json +294 -86
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/pt/messages.po +695 -70
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/pt/translations.json +282 -86
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ro/messages.po +718 -86
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ro/translations.json +288 -86
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ru/messages.po +807 -125
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ru/translations.json +294 -86
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/sk/messages.po +714 -83
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/sk/translations.json +294 -86
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/sv/messages.po +809 -142
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/sv/translations.json +282 -86
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/tr/messages.po +800 -129
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/tr/translations.json +282 -86
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/uk/messages.po +717 -83
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/uk/translations.json +294 -86
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/zh_CN/messages.po +737 -124
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/zh_CN/translations.json +276 -86
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/zh_TW/messages.po +684 -71
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/zh_TW/translations.json +276 -86
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/package.json +5 -38
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/translations.pot +863 -127
- invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/administration_page.html +15 -0
- invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/default_static_page.html +8 -8
- invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/files_integrity_report/email/files_integrity_report.html +12 -12
- invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/footer.html +33 -75
- invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/header.html +42 -27
- invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/header_frontpage.html +4 -2
- invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/header_login.html +144 -113
- 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 +11 -6
- invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/help/search.sv.html +254 -0
- invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/help/statistics.sv.html +196 -0
- invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/help/versioning.en.html +149 -0
- invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/help/versioning.sv.html +143 -0
- invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/intro_section.html +15 -16
- invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/macros/records_list.html +33 -3
- invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/page.html +36 -0
- invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/page_cover.html +13 -0
- invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/robots.txt +15 -0
- invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/searchbar.html +43 -15
- invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/settings/notifications.html +17 -0
- invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/site_footer.html +29 -0
- invenio_app_rdm/theme/templates/semantic-ui/invenio_communities/default_static_page.html +26 -0
- invenio_app_rdm/theme/templates/themes/default/invenio_app_rdm/header.html +147 -0
- invenio_app_rdm/theme/templates/themes/default/invenio_app_rdm/site_footer.html +42 -0
- invenio_app_rdm/theme/views.py +80 -28
- invenio_app_rdm/theme/webpack.py +38 -7
- invenio_app_rdm/translations/ar/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/ar/LC_MESSAGES/messages.po +975 -378
- invenio_app_rdm/translations/bg/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/bg/LC_MESSAGES/messages.po +908 -279
- invenio_app_rdm/translations/ca/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/ca/LC_MESSAGES/messages.po +913 -284
- invenio_app_rdm/translations/cs/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/cs/LC_MESSAGES/messages.po +1070 -406
- invenio_app_rdm/translations/da/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/da/LC_MESSAGES/messages.po +909 -274
- invenio_app_rdm/translations/de/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/de/LC_MESSAGES/messages.po +1018 -407
- invenio_app_rdm/translations/el/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/el/LC_MESSAGES/messages.po +916 -287
- invenio_app_rdm/translations/es/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/es/LC_MESSAGES/messages.po +964 -372
- invenio_app_rdm/translations/et/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/et/LC_MESSAGES/messages.po +939 -363
- invenio_app_rdm/translations/fa/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/fa/LC_MESSAGES/messages.po +907 -278
- invenio_app_rdm/translations/fr/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/fr/LC_MESSAGES/messages.po +1033 -376
- invenio_app_rdm/translations/hr/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/hr/LC_MESSAGES/messages.po +908 -279
- invenio_app_rdm/translations/hu/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/hu/LC_MESSAGES/messages.po +989 -372
- invenio_app_rdm/translations/it/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/it/LC_MESSAGES/messages.po +970 -337
- invenio_app_rdm/translations/ja/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/ja/LC_MESSAGES/messages.po +908 -279
- invenio_app_rdm/translations/ka/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/ka/LC_MESSAGES/messages.po +910 -281
- 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 +911 -282
- invenio_app_rdm/translations/messages.pot +982 -289
- invenio_app_rdm/translations/no/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/no/LC_MESSAGES/messages.po +908 -279
- invenio_app_rdm/translations/pl/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/pl/LC_MESSAGES/messages.po +908 -279
- invenio_app_rdm/translations/pt/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/pt/LC_MESSAGES/messages.po +907 -278
- invenio_app_rdm/translations/ro/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/ro/LC_MESSAGES/messages.po +1041 -382
- invenio_app_rdm/translations/ru/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/ru/LC_MESSAGES/messages.po +1023 -371
- invenio_app_rdm/translations/sk/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/sk/LC_MESSAGES/messages.po +917 -288
- invenio_app_rdm/translations/sv/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/sv/LC_MESSAGES/messages.po +1007 -398
- invenio_app_rdm/translations/tr/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/tr/LC_MESSAGES/messages.po +993 -342
- invenio_app_rdm/translations/uk/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/uk/LC_MESSAGES/messages.po +984 -353
- invenio_app_rdm/translations/zh_CN/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/zh_CN/LC_MESSAGES/messages.po +940 -348
- invenio_app_rdm/translations/zh_TW/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/zh_TW/LC_MESSAGES/messages.po +908 -279
- invenio_app_rdm/upgrade_scripts/fix_migrated_records_from_8_0_to_9_0.py +2 -2
- invenio_app_rdm/upgrade_scripts/migrate_10_0_to_11_0.py +1 -1
- invenio_app_rdm/upgrade_scripts/migrate_11_0_to_12_0.py +205 -0
- invenio_app_rdm/upgrade_scripts/migrate_12_0_to_13_0.py +235 -0
- invenio_app_rdm/upgrade_scripts/migrate_2_0_to_3_0.py +1 -1
- invenio_app_rdm/upgrade_scripts/migrate_4_0_to_6_0.py +2 -3
- invenio_app_rdm/upgrade_scripts/migrate_6_0_to_7_0.py +0 -2
- invenio_app_rdm/upgrade_scripts/migrate_8_0_to_9_0.py +2 -2
- invenio_app_rdm/upgrade_scripts/migrate_9_0_to_10_0.py +1 -1
- invenio_app_rdm/users/schemas.py +27 -0
- invenio_app_rdm/users_ui/searchapp.py +9 -1
- invenio_app_rdm/users_ui/templates/semantic-ui/invenio_app_rdm/users/communities.html +1 -0
- invenio_app_rdm/users_ui/templates/semantic-ui/invenio_app_rdm/users/header.html +23 -9
- invenio_app_rdm/users_ui/views/__init__.py +1 -1
- invenio_app_rdm/users_ui/views/dashboard.py +6 -1
- invenio_app_rdm/users_ui/views/ui.py +5 -28
- invenio_app_rdm/utils/files.py +1 -1
- invenio_app_rdm/views.py +21 -0
- invenio_app_rdm-14.0.0b1.dev8.dist-info/METADATA +552 -0
- invenio_app_rdm-14.0.0b1.dev8.dist-info/RECORD +505 -0
- {invenio_app_rdm-12.0.0.dev8.dist-info → invenio_app_rdm-14.0.0b1.dev8.dist-info}/WHEEL +1 -1
- invenio_app_rdm-14.0.0b1.dev8.dist-info/entry_points.txt +44 -0
- invenio_app_rdm/admin.py +0 -36
- invenio_app_rdm/stats/__init__.py +0 -24
- invenio_app_rdm/stats/event_builders.py +0 -112
- invenio_app_rdm/stats/permissions.py +0 -33
- invenio_app_rdm/stats/templates/aggregations/__init__.py +0 -10
- invenio_app_rdm/stats/templates/aggregations/aggr_file_download/__init__.py +0 -10
- invenio_app_rdm/stats/templates/aggregations/aggr_file_download/os-v1/__init__.py +0 -10
- invenio_app_rdm/stats/templates/aggregations/aggr_file_download/os-v1/aggr-file-download-v1.0.0.json +0 -69
- invenio_app_rdm/stats/templates/aggregations/aggr_file_download/os-v2/__init__.py +0 -10
- invenio_app_rdm/stats/templates/aggregations/aggr_file_download/os-v2/aggr-file-download-v1.0.0.json +0 -69
- invenio_app_rdm/stats/templates/aggregations/aggr_file_download/v7/__init__.py +0 -10
- invenio_app_rdm/stats/templates/aggregations/aggr_file_download/v7/aggr-file-download-v1.0.0.json +0 -69
- invenio_app_rdm/stats/templates/aggregations/aggr_record_view/__init__.py +0 -10
- invenio_app_rdm/stats/templates/aggregations/aggr_record_view/os-v1/__init__.py +0 -10
- invenio_app_rdm/stats/templates/aggregations/aggr_record_view/os-v1/aggr-record-view-v1.0.0.json +0 -46
- invenio_app_rdm/stats/templates/aggregations/aggr_record_view/os-v2/__init__.py +0 -10
- invenio_app_rdm/stats/templates/aggregations/aggr_record_view/os-v2/aggr-record-view-v1.0.0.json +0 -46
- invenio_app_rdm/stats/templates/aggregations/aggr_record_view/v7/aggr-record-view-v1.0.0.json +0 -46
- invenio_app_rdm/stats/templates/events/__init__.py +0 -10
- invenio_app_rdm/stats/templates/events/file_download/__init__.py +0 -10
- invenio_app_rdm/stats/templates/events/file_download/os-v1/__init__.py +0 -10
- invenio_app_rdm/stats/templates/events/file_download/os-v1/file-download-v1.0.0.json +0 -93
- invenio_app_rdm/stats/templates/events/file_download/os-v2/__init__.py +0 -10
- invenio_app_rdm/stats/templates/events/file_download/os-v2/file-download-v1.0.0.json +0 -93
- invenio_app_rdm/stats/templates/events/file_download/v7/file-download-v1.0.0.json +0 -93
- invenio_app_rdm/stats/templates/events/record_view/os-v1/__init__.py +0 -10
- invenio_app_rdm/stats/templates/events/record_view/os-v1/record-view-v1.0.0.json +0 -70
- invenio_app_rdm/stats/templates/events/record_view/os-v2/__init__.py +0 -10
- invenio_app_rdm/stats/templates/events/record_view/os-v2/record-view-v1.0.0.json +0 -70
- invenio_app_rdm/stats/templates/events/record_view/v7/record-view-v1.0.0.json +0 -70
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ShareModal.js +0 -262
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/user_dashboard/requests_items/ComputerTabletRequestsItem.js +0 -74
- invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/user_dashboard/requests_items/MobileRequestsItem.js +0 -70
- 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/messages/af/messages.po +0 -272
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/af/translations.json +0 -87
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/et_EE/messages.po +0 -272
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/et_EE/translations.json +0 -87
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/gl/messages.po +0 -272
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/gl/translations.json +0 -87
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/rw/messages.po +0 -272
- invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/rw/translations.json +0 -87
- 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
- invenio_app_rdm/theme/static/robots.txt +0 -5
- invenio_app_rdm/translations/af/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/af/LC_MESSAGES/messages.po +0 -728
- invenio_app_rdm/translations/et_EE/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/et_EE/LC_MESSAGES/messages.po +0 -728
- invenio_app_rdm/translations/gl/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/gl/LC_MESSAGES/messages.po +0 -728
- invenio_app_rdm/translations/rw/LC_MESSAGES/messages.mo +0 -0
- invenio_app_rdm/translations/rw/LC_MESSAGES/messages.po +0 -728
- invenio_app_rdm-12.0.0.dev8.dist-info/AUTHORS.rst +0 -11
- invenio_app_rdm-12.0.0.dev8.dist-info/METADATA +0 -103
- invenio_app_rdm-12.0.0.dev8.dist-info/RECORD +0 -402
- invenio_app_rdm-12.0.0.dev8.dist-info/entry_points.txt +0 -26
- /invenio_app_rdm/{translations/.gitkeep → theme/assets/semantic-ui/js/invenio_app_rdm/administration/userModeration/search/UserModerationBulkActions.js} +0 -0
- {invenio_app_rdm-12.0.0.dev8.dist-info → invenio_app_rdm-14.0.0b1.dev8.dist-info/licenses}/LICENSE +0 -0
- {invenio_app_rdm-12.0.0.dev8.dist-info → invenio_app_rdm-14.0.0b1.dev8.dist-info}/top_level.txt +0 -0
|
@@ -1,41 +1,61 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
2
|
#
|
|
3
|
-
# Copyright (C) 2019-
|
|
3
|
+
# Copyright (C) 2019-2025 CERN.
|
|
4
4
|
# Copyright (C) 2019-2021 Northwestern University.
|
|
5
5
|
# Copyright (C) 2021 TU Wien.
|
|
6
|
-
# Copyright (C) 2022 KTH Royal Institute of Technology
|
|
7
|
-
# Copyright (C) 2023 Graz University of Technology.
|
|
6
|
+
# Copyright (C) 2022-2025 KTH Royal Institute of Technology
|
|
7
|
+
# Copyright (C) 2023-2024 Graz University of Technology.
|
|
8
8
|
#
|
|
9
9
|
# Invenio App RDM is free software; you can redistribute it and/or modify it
|
|
10
10
|
# under the terms of the MIT License; see LICENSE file for more details.
|
|
11
11
|
|
|
12
12
|
"""Routes for record-related pages provided by Invenio-App-RDM."""
|
|
13
13
|
|
|
14
|
-
from
|
|
14
|
+
from copy import deepcopy
|
|
15
|
+
|
|
16
|
+
from flask import current_app, g, redirect
|
|
15
17
|
from flask_login import login_required
|
|
18
|
+
from invenio_communities.communities.resources.serializer import (
|
|
19
|
+
UICommunityJSONSerializer,
|
|
20
|
+
)
|
|
21
|
+
from invenio_communities.errors import CommunityDeletedError
|
|
16
22
|
from invenio_communities.proxies import current_communities
|
|
23
|
+
from invenio_communities.views.communities import render_community_theme_template
|
|
17
24
|
from invenio_i18n import lazy_gettext as _
|
|
18
25
|
from invenio_i18n.ext import current_i18n
|
|
19
26
|
from invenio_rdm_records.proxies import current_rdm_records
|
|
27
|
+
from invenio_rdm_records.records.api import get_files_quota
|
|
20
28
|
from invenio_rdm_records.resources.serializers import UIJSONSerializer
|
|
21
29
|
from invenio_rdm_records.services.schemas import RDMRecordSchema
|
|
22
30
|
from invenio_rdm_records.services.schemas.utils import dump_empty
|
|
31
|
+
from invenio_rdm_records.views import file_transfer_type
|
|
32
|
+
from invenio_records_resources.proxies import current_transfer_registry
|
|
33
|
+
from invenio_records_resources.services.errors import PermissionDeniedError
|
|
23
34
|
from invenio_search.engine import dsl
|
|
24
35
|
from invenio_vocabularies.proxies import current_service as vocabulary_service
|
|
25
36
|
from invenio_vocabularies.records.models import VocabularyScheme
|
|
26
|
-
from invenio_vocabularies.services.custom_fields import VocabularyCF
|
|
27
37
|
from marshmallow_utils.fields.babel import gettext_from_dict
|
|
28
38
|
from sqlalchemy.orm import load_only
|
|
29
39
|
|
|
30
|
-
from ..utils import
|
|
31
|
-
|
|
40
|
+
from ..utils import (
|
|
41
|
+
evaluate_file_modification,
|
|
42
|
+
evaluate_record_deletion,
|
|
43
|
+
set_default_value,
|
|
44
|
+
)
|
|
45
|
+
from .decorators import (
|
|
46
|
+
no_cache_response,
|
|
47
|
+
pass_draft,
|
|
48
|
+
pass_draft_community,
|
|
49
|
+
pass_draft_files,
|
|
50
|
+
secret_link_or_login_required,
|
|
51
|
+
)
|
|
32
52
|
from .filters import get_scheme_label
|
|
33
53
|
|
|
34
54
|
|
|
35
55
|
#
|
|
36
56
|
# Helpers
|
|
37
57
|
#
|
|
38
|
-
def get_form_pids_config():
|
|
58
|
+
def get_form_pids_config(record=None):
|
|
39
59
|
"""Prepare configuration for the pids field.
|
|
40
60
|
|
|
41
61
|
Currently supporting only doi.
|
|
@@ -45,33 +65,74 @@ def get_form_pids_config():
|
|
|
45
65
|
# FIXME: User provider.is_managed() requires tiny fix in config
|
|
46
66
|
can_be_managed = True
|
|
47
67
|
can_be_unmanaged = True
|
|
68
|
+
# We initialize the optional doi to empty to indicate that there is no restriction on the transitions
|
|
69
|
+
# This is valid for new uploads and when the DOI is required in an instance
|
|
70
|
+
optional_doi_transitions = []
|
|
48
71
|
for scheme in service.config.pids_providers.keys():
|
|
49
72
|
if not scheme == "doi":
|
|
50
73
|
continue
|
|
74
|
+
|
|
51
75
|
record_pid_config = current_app.config["RDM_PERSISTENT_IDENTIFIERS"]
|
|
52
76
|
scheme_label = record_pid_config.get(scheme, {}).get("label", scheme)
|
|
77
|
+
is_doi_required = record_pid_config.get(scheme, {}).get("required")
|
|
78
|
+
default_selected = (
|
|
79
|
+
record_pid_config.get(scheme, {}).get("ui", {}).get("default_selected")
|
|
80
|
+
)
|
|
81
|
+
if record is not None and not is_doi_required:
|
|
82
|
+
sitename = current_app.config.get("THEME_SITENAME", "this repository")
|
|
83
|
+
previous_published_record = (
|
|
84
|
+
service.record_cls.get_latest_published_by_parent(record.parent)
|
|
85
|
+
)
|
|
86
|
+
validate_optional_doi = current_app.config["RDM_OPTIONAL_DOI_VALIDATOR"]
|
|
87
|
+
optional_doi_transitions = validate_optional_doi(
|
|
88
|
+
record, previous_published_record, errors=[]
|
|
89
|
+
)
|
|
90
|
+
if optional_doi_transitions:
|
|
91
|
+
optional_doi_transitions["message"] = optional_doi_transitions.get(
|
|
92
|
+
"message"
|
|
93
|
+
).format(sitename=sitename)
|
|
94
|
+
if (
|
|
95
|
+
"external" not in optional_doi_transitions["allowed_providers"]
|
|
96
|
+
and "not_needed"
|
|
97
|
+
not in optional_doi_transitions["allowed_providers"]
|
|
98
|
+
):
|
|
99
|
+
# In case we have locally managed provider(s) as allowed ones, we need to
|
|
100
|
+
# select it by default. That is relevant for the case when the
|
|
101
|
+
# user creates a new version of the record and the previous version
|
|
102
|
+
# had a datacite DOI.
|
|
103
|
+
default_selected = "no"
|
|
104
|
+
|
|
105
|
+
# if the DOI is required but the default selected is not_needed then we set it to yes
|
|
106
|
+
# to force the user to mint a DOI
|
|
107
|
+
if is_doi_required and default_selected == "not_needed":
|
|
108
|
+
default_selected = "yes"
|
|
109
|
+
|
|
53
110
|
pids_provider = {
|
|
54
111
|
"scheme": scheme,
|
|
55
|
-
"field_label": "Digital Object Identifier",
|
|
56
|
-
"pid_label": "DOI",
|
|
57
|
-
"pid_placeholder": "Copy/paste your existing DOI here...",
|
|
112
|
+
"field_label": _("Digital Object Identifier"),
|
|
113
|
+
"pid_label": _("DOI"),
|
|
114
|
+
"pid_placeholder": _("Copy/paste your existing DOI here..."),
|
|
58
115
|
"can_be_managed": can_be_managed,
|
|
59
116
|
"can_be_unmanaged": can_be_unmanaged,
|
|
60
|
-
"btn_label_discard_pid": _(
|
|
61
|
-
scheme_label=scheme_label
|
|
117
|
+
"btn_label_discard_pid": _(
|
|
118
|
+
"Discard the reserved %(scheme_label)s.", scheme_label=scheme_label
|
|
62
119
|
),
|
|
63
|
-
"btn_label_get_pid": _(
|
|
64
|
-
scheme_label=scheme_label
|
|
120
|
+
"btn_label_get_pid": _(
|
|
121
|
+
"Get a %(scheme_label)s now!", scheme_label=scheme_label
|
|
65
122
|
),
|
|
66
123
|
"managed_help_text": _(
|
|
67
|
-
"Reserve a
|
|
124
|
+
"Reserve a %(scheme_label)s by pressing the button "
|
|
68
125
|
"(so it can be included in files prior to upload). "
|
|
69
|
-
"The
|
|
70
|
-
|
|
126
|
+
"The %(scheme_label)s is registered when your upload is published.",
|
|
127
|
+
scheme_label=scheme_label,
|
|
128
|
+
),
|
|
71
129
|
"unmanaged_help_text": _(
|
|
72
|
-
"A
|
|
73
|
-
"unambiguously cited. Example: 10.1234/foo.bar"
|
|
74
|
-
|
|
130
|
+
"A %(scheme_label)s allows your upload to be easily and "
|
|
131
|
+
"unambiguously cited. Example: 10.1234/foo.bar",
|
|
132
|
+
scheme_label=scheme_label,
|
|
133
|
+
),
|
|
134
|
+
"default_selected": default_selected,
|
|
135
|
+
"optional_doi_transitions": optional_doi_transitions,
|
|
75
136
|
}
|
|
76
137
|
pids_providers.append(pids_provider)
|
|
77
138
|
|
|
@@ -144,18 +205,19 @@ class VocabulariesOptions:
|
|
|
144
205
|
{
|
|
145
206
|
"icon": hit.get("icon", ""),
|
|
146
207
|
"id": hit["id"],
|
|
147
|
-
"subtype_name": self._get_type_subtype_label(hit, type_labels)[
|
|
148
|
-
1
|
|
149
|
-
], # noqa
|
|
208
|
+
"subtype_name": self._get_type_subtype_label(hit, type_labels)[1],
|
|
150
209
|
"type_name": self._get_type_subtype_label(hit, type_labels)[0],
|
|
151
210
|
}
|
|
152
211
|
for hit in subset_resource_types.to_dict()["hits"]["hits"]
|
|
153
212
|
]
|
|
154
213
|
|
|
155
|
-
def _dump_vocabulary_w_basic_fields(self, vocabulary_type):
|
|
214
|
+
def _dump_vocabulary_w_basic_fields(self, vocabulary_type, extra_filter=None):
|
|
156
215
|
"""Dump vocabulary with id and title field."""
|
|
157
216
|
results = vocabulary_service.read_all(
|
|
158
|
-
g.identity,
|
|
217
|
+
g.identity,
|
|
218
|
+
fields=["id", "title"],
|
|
219
|
+
type=vocabulary_type,
|
|
220
|
+
extra_filter=extra_filter,
|
|
159
221
|
)
|
|
160
222
|
return [
|
|
161
223
|
{
|
|
@@ -177,10 +239,10 @@ class VocabulariesOptions:
|
|
|
177
239
|
"""Dump subjects vocabulary (limitTo really)."""
|
|
178
240
|
subjects = (
|
|
179
241
|
VocabularyScheme.query.filter_by(parent_id="subjects")
|
|
180
|
-
.options(load_only(
|
|
242
|
+
.options(load_only(VocabularyScheme.id))
|
|
181
243
|
.all()
|
|
182
244
|
)
|
|
183
|
-
limit_to = [{"text": "All", "value": "all"}]
|
|
245
|
+
limit_to = [{"text": _("All"), "value": "all"}]
|
|
184
246
|
# id is human readable and shorter, so we use it
|
|
185
247
|
limit_to += [{"text": s.id, "value": s.id} for s in subjects]
|
|
186
248
|
|
|
@@ -230,24 +292,40 @@ class VocabulariesOptions:
|
|
|
230
292
|
"""Dump linkable resource type vocabulary."""
|
|
231
293
|
return self._resource_types(dsl.Q("term", tags="linkable"))
|
|
232
294
|
|
|
233
|
-
def
|
|
234
|
-
"""Dump
|
|
235
|
-
|
|
236
|
-
"Fake" because identifiers scheme is not a vocabulary.
|
|
237
|
-
"""
|
|
295
|
+
def _dump_identifier_schemes(self, config_key):
|
|
296
|
+
"""Dump identifier schemes from a given config key."""
|
|
238
297
|
return [
|
|
239
298
|
{"text": get_scheme_label(scheme), "value": scheme}
|
|
240
|
-
for scheme in current_app.config.get(
|
|
299
|
+
for scheme in current_app.config.get(config_key, {})
|
|
241
300
|
]
|
|
242
301
|
|
|
243
|
-
def
|
|
244
|
-
"""Dump
|
|
245
|
-
self._vocabularies[
|
|
302
|
+
def _dump_identifiers(self, vocab_key, config_key):
|
|
303
|
+
"""Dump identifiers vocabulary for a given vocab/config key pair."""
|
|
304
|
+
self._vocabularies[vocab_key] = {
|
|
246
305
|
"relations": self.relation_types(),
|
|
247
306
|
"resource_type": self.linkable_resource_types(),
|
|
248
|
-
"scheme": self.
|
|
307
|
+
"scheme": self._dump_identifier_schemes(config_key),
|
|
249
308
|
}
|
|
250
309
|
|
|
310
|
+
def identifiers(self):
|
|
311
|
+
"""Dump identifiers vocabulary."""
|
|
312
|
+
self._dump_identifiers("identifiers", "RDM_RECORDS_IDENTIFIERS_SCHEMES")
|
|
313
|
+
|
|
314
|
+
def related_identifiers(self):
|
|
315
|
+
"""Dump related identifiers vocabulary."""
|
|
316
|
+
self._dump_identifiers(
|
|
317
|
+
"related_identifiers", "RDM_RECORDS_RELATED_IDENTIFIERS_SCHEMES"
|
|
318
|
+
)
|
|
319
|
+
|
|
320
|
+
def deletion_request_removal_reasons(self):
|
|
321
|
+
"""Dump deletion request removal reasons vocabulary."""
|
|
322
|
+
self._vocabularies["deletion_request_removal_reasons"] = (
|
|
323
|
+
self._dump_vocabulary_w_basic_fields(
|
|
324
|
+
"removalreasons", extra_filter=dsl.Q("term", tags="deletion-request")
|
|
325
|
+
)
|
|
326
|
+
)
|
|
327
|
+
return self._vocabularies["deletion_request_removal_reasons"]
|
|
328
|
+
|
|
251
329
|
def dump(self):
|
|
252
330
|
"""Dump into dict."""
|
|
253
331
|
# TODO: Nest vocabularies inside "metadata" key so that frontend dumber
|
|
@@ -259,6 +337,8 @@ class VocabulariesOptions:
|
|
|
259
337
|
self.contributor_roles()
|
|
260
338
|
self.subjects()
|
|
261
339
|
self.identifiers()
|
|
340
|
+
self.related_identifiers()
|
|
341
|
+
self.deletion_request_removal_reasons()
|
|
262
342
|
# We removed
|
|
263
343
|
# vocabularies["relation_type"] = _dump_relation_types_vocabulary()
|
|
264
344
|
return self._vocabularies
|
|
@@ -280,9 +360,14 @@ def load_custom_fields():
|
|
|
280
360
|
# for each custom field. This is the label shown at the top of the upload
|
|
281
361
|
# form
|
|
282
362
|
field_error_label = field.get("props", {}).get("label")
|
|
363
|
+
# Add the field ID to the props to allow overriding the React widgets of custom fields
|
|
364
|
+
field["props"]["id"] = field["field"]
|
|
283
365
|
if field_error_label:
|
|
284
366
|
error_labels[f"custom_fields.{field['field']}"] = field_error_label
|
|
285
367
|
if getattr(field_instance, "relation_cls", None):
|
|
368
|
+
sort_by = field.get("props", {}).get("sort_by")
|
|
369
|
+
if sort_by:
|
|
370
|
+
field_instance.sort_by = sort_by
|
|
286
371
|
# add vocabulary options to field's properties
|
|
287
372
|
field["props"]["options"] = field_instance.options(g.identity)
|
|
288
373
|
# mark field as vocabulary
|
|
@@ -304,6 +389,19 @@ def get_user_communities_memberships():
|
|
|
304
389
|
def get_form_config(**kwargs):
|
|
305
390
|
"""Get the react form configuration."""
|
|
306
391
|
conf = current_app.config
|
|
392
|
+
custom_fields = load_custom_fields()
|
|
393
|
+
# keep only upload form configurable custom fields
|
|
394
|
+
custom_fields["ui"] = [
|
|
395
|
+
cf for cf in custom_fields["ui"] if not cf.get("hide_from_upload_form", False)
|
|
396
|
+
]
|
|
397
|
+
quota = deepcopy(conf.get("APP_RDM_DEPOSIT_FORM_QUOTA", {}))
|
|
398
|
+
max_file_size = conf.get("RDM_FILES_DEFAULT_MAX_FILE_SIZE", None)
|
|
399
|
+
record_quota = kwargs.pop("quota", None)
|
|
400
|
+
if record_quota:
|
|
401
|
+
quota["maxStorage"] = record_quota["quota_size"]
|
|
402
|
+
|
|
403
|
+
record = kwargs.pop("record", None)
|
|
404
|
+
|
|
307
405
|
return dict(
|
|
308
406
|
vocabularies=VocabulariesOptions().dump(),
|
|
309
407
|
autocomplete_names=conf.get(
|
|
@@ -311,8 +409,8 @@ def get_form_config(**kwargs):
|
|
|
311
409
|
),
|
|
312
410
|
current_locale=str(current_i18n.locale),
|
|
313
411
|
default_locale=conf.get("BABEL_DEFAULT_LOCALE", "en"),
|
|
314
|
-
pids=get_form_pids_config(),
|
|
315
|
-
quota=
|
|
412
|
+
pids=get_form_pids_config(record=record),
|
|
413
|
+
quota=dict(**quota, maxFileSize=max_file_size),
|
|
316
414
|
decimal_size_display=conf.get("APP_RDM_DISPLAY_DECIMAL_FILE_SIZES", True),
|
|
317
415
|
links=dict(
|
|
318
416
|
user_dashboard_request=conf["RDM_REQUESTS_ROUTES"][
|
|
@@ -320,14 +418,28 @@ def get_form_config(**kwargs):
|
|
|
320
418
|
]
|
|
321
419
|
),
|
|
322
420
|
user_communities_memberships=get_user_communities_memberships(),
|
|
323
|
-
custom_fields=
|
|
421
|
+
custom_fields=custom_fields,
|
|
324
422
|
publish_modal_extra=current_app.config.get(
|
|
325
423
|
"APP_RDM_DEPOSIT_FORM_PUBLISH_MODAL_EXTRA"
|
|
326
424
|
),
|
|
425
|
+
default_transfer_type=current_transfer_registry.default_transfer_type,
|
|
426
|
+
enabled_transfer_types=list(current_transfer_registry.get_transfer_types()),
|
|
427
|
+
transfer_types=file_transfer_type()["transfer_types"],
|
|
327
428
|
**kwargs,
|
|
328
429
|
)
|
|
329
430
|
|
|
330
431
|
|
|
432
|
+
def get_actual_files_quota(draft):
|
|
433
|
+
"""Report the actual effective quota from the draft's bucket, if available."""
|
|
434
|
+
if draft is not None and draft.bucket is not None:
|
|
435
|
+
return {
|
|
436
|
+
"quota_size": draft.bucket.quota_size,
|
|
437
|
+
"max_file_size": draft.bucket.max_file_size,
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
return get_files_quota(draft)
|
|
441
|
+
|
|
442
|
+
|
|
331
443
|
def get_search_url():
|
|
332
444
|
"""Get the search URL."""
|
|
333
445
|
# TODO: this should not be used
|
|
@@ -337,9 +449,18 @@ def get_search_url():
|
|
|
337
449
|
def new_record():
|
|
338
450
|
"""Create an empty record with default values."""
|
|
339
451
|
record = dump_empty(RDMRecordSchema)
|
|
340
|
-
record["files"] = {"enabled":
|
|
452
|
+
record["files"] = {"enabled": current_app.config.get("RDM_DEFAULT_FILES_ENABLED")}
|
|
341
453
|
if "doi" in current_rdm_records.records_service.config.pids_providers:
|
|
342
|
-
|
|
454
|
+
if (
|
|
455
|
+
current_app.config["RDM_PERSISTENT_IDENTIFIERS"]
|
|
456
|
+
.get("doi", {})
|
|
457
|
+
.get("ui", {})
|
|
458
|
+
.get("default_selected")
|
|
459
|
+
== "yes" # yes, no or not_needed
|
|
460
|
+
):
|
|
461
|
+
record["pids"] = {"doi": {"provider": "external", "identifier": ""}}
|
|
462
|
+
else:
|
|
463
|
+
record["pids"] = {}
|
|
343
464
|
else:
|
|
344
465
|
record["pids"] = {}
|
|
345
466
|
record["status"] = "draft"
|
|
@@ -353,46 +474,176 @@ def new_record():
|
|
|
353
474
|
# Views
|
|
354
475
|
#
|
|
355
476
|
@login_required
|
|
477
|
+
@no_cache_response
|
|
356
478
|
@pass_draft_community
|
|
357
|
-
def deposit_create(community=None):
|
|
479
|
+
def deposit_create(community=None, community_ui=None):
|
|
358
480
|
"""Create a new deposit."""
|
|
359
|
-
|
|
481
|
+
can_create = current_rdm_records.records_service.check_permission(
|
|
482
|
+
g.identity, "create"
|
|
483
|
+
)
|
|
484
|
+
if not can_create:
|
|
485
|
+
raise PermissionDeniedError()
|
|
486
|
+
|
|
487
|
+
community_theme = None
|
|
488
|
+
if community is not None:
|
|
489
|
+
community_theme = community_ui.get("theme", {})
|
|
490
|
+
|
|
491
|
+
community_use_jinja_header = bool(community_theme)
|
|
492
|
+
dashboard_routes = current_app.config["APP_RDM_USER_DASHBOARD_ROUTES"]
|
|
493
|
+
is_doi_required = (
|
|
494
|
+
current_app.config.get("RDM_PERSISTENT_IDENTIFIERS", {})
|
|
495
|
+
.get("doi", {})
|
|
496
|
+
.get("required")
|
|
497
|
+
)
|
|
498
|
+
|
|
499
|
+
return render_community_theme_template(
|
|
360
500
|
current_app.config["APP_RDM_DEPOSIT_FORM_TEMPLATE"],
|
|
361
|
-
|
|
501
|
+
theme=community_theme,
|
|
502
|
+
forms_config=get_form_config(
|
|
503
|
+
dashboard_routes=dashboard_routes,
|
|
504
|
+
createUrl="/api/records",
|
|
505
|
+
quota=get_actual_files_quota(None),
|
|
506
|
+
hide_community_selection=community_use_jinja_header,
|
|
507
|
+
is_doi_required=is_doi_required,
|
|
508
|
+
),
|
|
362
509
|
searchbar_config=dict(searchUrl=get_search_url()),
|
|
363
510
|
record=new_record(),
|
|
511
|
+
community=community,
|
|
512
|
+
community_ui=community_ui,
|
|
513
|
+
community_use_jinja_header=community_use_jinja_header,
|
|
364
514
|
files=dict(default_preview=None, entries=[], links={}),
|
|
365
|
-
preselectedCommunity=
|
|
515
|
+
preselectedCommunity=community_ui,
|
|
516
|
+
files_locked=False,
|
|
366
517
|
permissions=get_record_permissions(
|
|
367
518
|
[
|
|
519
|
+
"manage",
|
|
368
520
|
"manage_files",
|
|
521
|
+
"delete_draft",
|
|
369
522
|
"manage_record_access",
|
|
370
523
|
]
|
|
371
524
|
),
|
|
372
525
|
)
|
|
373
526
|
|
|
374
527
|
|
|
375
|
-
@
|
|
528
|
+
@secret_link_or_login_required()
|
|
376
529
|
@pass_draft(expand=True)
|
|
377
530
|
@pass_draft_files
|
|
378
|
-
|
|
531
|
+
@no_cache_response
|
|
532
|
+
def deposit_edit(pid_value, draft=None, draft_files=None, files_locked=True):
|
|
379
533
|
"""Edit an existing deposit."""
|
|
534
|
+
# don't show draft's deposit form if the user can't edit it
|
|
535
|
+
service = current_rdm_records.records_service
|
|
536
|
+
can_edit_draft = service.check_permission(
|
|
537
|
+
g.identity, "update_draft", record=draft._record
|
|
538
|
+
)
|
|
539
|
+
can_preview_draft = service.check_permission(
|
|
540
|
+
g.identity, "preview", record=draft._record
|
|
541
|
+
)
|
|
542
|
+
if not can_edit_draft:
|
|
543
|
+
if can_preview_draft:
|
|
544
|
+
return redirect(draft["links"]["preview_html"])
|
|
545
|
+
raise PermissionDeniedError()
|
|
546
|
+
|
|
380
547
|
files_dict = None if draft_files is None else draft_files.to_dict()
|
|
381
548
|
ui_serializer = UIJSONSerializer()
|
|
382
549
|
record = ui_serializer.dump_obj(draft.to_dict())
|
|
383
550
|
|
|
384
|
-
|
|
551
|
+
published_record = None
|
|
552
|
+
if record["is_published"]:
|
|
553
|
+
published_record_result = service.read(
|
|
554
|
+
g.identity, id_=record["id"], expand=True
|
|
555
|
+
)
|
|
556
|
+
published_record = ui_serializer.dump_obj(published_record_result.to_dict())
|
|
557
|
+
|
|
558
|
+
record_deletion = evaluate_record_deletion(
|
|
559
|
+
published_record_result._record, g.identity
|
|
560
|
+
)
|
|
561
|
+
file_modification = evaluate_file_modification(
|
|
562
|
+
published_record_result._record, g.identity
|
|
563
|
+
)
|
|
564
|
+
else:
|
|
565
|
+
record_deletion = {}
|
|
566
|
+
file_modification = {}
|
|
567
|
+
|
|
568
|
+
community_ui = None
|
|
569
|
+
community_theme = None
|
|
570
|
+
community = record.get("expanded", {}).get("parent", {}).get("review", {}).get(
|
|
571
|
+
"receiver"
|
|
572
|
+
) or record.get("expanded", {}).get("parent", {}).get("communities", {}).get(
|
|
573
|
+
"default"
|
|
574
|
+
)
|
|
575
|
+
|
|
576
|
+
if community:
|
|
577
|
+
# TODO: handle deleted community
|
|
578
|
+
try:
|
|
579
|
+
community = current_communities.service.read(
|
|
580
|
+
id_=community["id"], identity=g.identity
|
|
581
|
+
)
|
|
582
|
+
community_theme = community.to_dict().get("theme", {})
|
|
583
|
+
community_ui = UICommunityJSONSerializer().dump_obj(community.to_dict())
|
|
584
|
+
except CommunityDeletedError:
|
|
585
|
+
pass
|
|
586
|
+
|
|
587
|
+
# show the community branded header when there is a theme and record is published
|
|
588
|
+
# for unpublished records we fallback to the react component so users can change
|
|
589
|
+
# communities
|
|
590
|
+
community_use_jinja_header = bool(community_theme)
|
|
591
|
+
dashboard_routes = current_app.config["APP_RDM_USER_DASHBOARD_ROUTES"]
|
|
592
|
+
is_doi_required = (
|
|
593
|
+
current_app.config.get("RDM_PERSISTENT_IDENTIFIERS", {})
|
|
594
|
+
.get("doi", {})
|
|
595
|
+
.get("required")
|
|
596
|
+
)
|
|
597
|
+
form_config = get_form_config(
|
|
598
|
+
apiUrl=f"/api/records/{pid_value}/draft",
|
|
599
|
+
dashboard_routes=dashboard_routes,
|
|
600
|
+
# maybe quota should be serialized into the record e.g for admins
|
|
601
|
+
quota=get_actual_files_quota(draft._record),
|
|
602
|
+
# hide react community component
|
|
603
|
+
hide_community_selection=community_use_jinja_header,
|
|
604
|
+
is_doi_required=is_doi_required,
|
|
605
|
+
record=draft._record,
|
|
606
|
+
published_record=published_record,
|
|
607
|
+
)
|
|
608
|
+
|
|
609
|
+
if is_doi_required and not record.get("pids", {}).get("doi"):
|
|
610
|
+
# if the DOI is required but there is no value, we set the default selected pid
|
|
611
|
+
# to no i.e. system should automatically mint a local DOI
|
|
612
|
+
if record["status"] == "new_version_draft":
|
|
613
|
+
doi_provider_config = [
|
|
614
|
+
pid_config
|
|
615
|
+
for pid_config in form_config["pids"]
|
|
616
|
+
if pid_config.get("scheme") == "doi"
|
|
617
|
+
]
|
|
618
|
+
if doi_provider_config:
|
|
619
|
+
doi_provider_config[0]["default_selected"] = "no"
|
|
620
|
+
|
|
621
|
+
return render_community_theme_template(
|
|
385
622
|
current_app.config["APP_RDM_DEPOSIT_FORM_TEMPLATE"],
|
|
386
|
-
|
|
623
|
+
theme=community_theme,
|
|
624
|
+
forms_config=form_config,
|
|
387
625
|
record=record,
|
|
626
|
+
community=community,
|
|
627
|
+
community_ui=community_ui,
|
|
628
|
+
community_use_jinja_header=community_use_jinja_header,
|
|
388
629
|
files=files_dict,
|
|
389
630
|
searchbar_config=dict(searchUrl=get_search_url()),
|
|
631
|
+
files_locked=files_locked,
|
|
390
632
|
permissions=draft.has_permissions_to(
|
|
391
633
|
[
|
|
634
|
+
"manage",
|
|
392
635
|
"new_version",
|
|
393
636
|
"delete_draft",
|
|
394
637
|
"manage_files",
|
|
395
638
|
"manage_record_access",
|
|
396
639
|
]
|
|
397
640
|
),
|
|
641
|
+
record_deletion=record_deletion,
|
|
642
|
+
file_modification=file_modification,
|
|
398
643
|
)
|
|
644
|
+
|
|
645
|
+
|
|
646
|
+
def community_upload(pid_value):
|
|
647
|
+
"""Redirection for upload to community."""
|
|
648
|
+
routes = current_app.config.get("APP_RDM_ROUTES")
|
|
649
|
+
return redirect(f"{routes['deposit_create']}?community={pid_value}")
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
2
|
#
|
|
3
|
-
# Copyright (C) 2019-
|
|
3
|
+
# Copyright (C) 2019-2025 CERN.
|
|
4
4
|
# Copyright (C) 2019-2020 Northwestern University.
|
|
5
5
|
# Copyright (C) 2021 TU Wien.
|
|
6
|
+
# Copyright (C) 2024 Graz University of Technology.
|
|
6
7
|
#
|
|
7
8
|
# Invenio App RDM is free software; you can redistribute it and/or modify it
|
|
8
9
|
# under the terms of the MIT License; see LICENSE file for more details.
|
|
@@ -13,14 +14,14 @@ from os.path import splitext
|
|
|
13
14
|
|
|
14
15
|
import idutils
|
|
15
16
|
from babel.numbers import format_compact_decimal, format_decimal
|
|
16
|
-
from flask import current_app
|
|
17
|
+
from flask import current_app, url_for
|
|
18
|
+
from invenio_base.utils import obj_or_import_string
|
|
19
|
+
from invenio_i18n import get_locale
|
|
17
20
|
from invenio_previewer.views import is_previewable
|
|
18
21
|
from invenio_records_files.api import FileObject
|
|
19
22
|
from invenio_records_permissions.policies import get_record_permission_policy
|
|
20
23
|
|
|
21
|
-
from
|
|
22
|
-
previewable_extensions as image_extensions,
|
|
23
|
-
)
|
|
24
|
+
from ..previewer.iiif_simple import previewable_extensions as image_extensions
|
|
24
25
|
|
|
25
26
|
|
|
26
27
|
def make_files_preview_compatible(files):
|
|
@@ -113,15 +114,25 @@ def order_entries(files):
|
|
|
113
114
|
return files_.pop(idx)
|
|
114
115
|
|
|
115
116
|
files = [get_file(key) for key in order]
|
|
117
|
+
else:
|
|
118
|
+
# sort alphabetically by filekey
|
|
119
|
+
files = sorted(files, key=lambda x: x["key"].lower())
|
|
116
120
|
|
|
117
121
|
return files
|
|
118
122
|
|
|
119
123
|
|
|
120
124
|
def get_scheme_label(scheme):
|
|
121
125
|
"""Convert backend scheme to frontend label."""
|
|
122
|
-
|
|
126
|
+
configs = [
|
|
127
|
+
current_app.config.get("RDM_RECORDS_IDENTIFIERS_SCHEMES", {}),
|
|
128
|
+
current_app.config.get("RDM_RECORDS_RELATED_IDENTIFIERS_SCHEMES", {}),
|
|
129
|
+
]
|
|
130
|
+
|
|
131
|
+
for cfg in configs:
|
|
132
|
+
if scheme in cfg:
|
|
133
|
+
return cfg[scheme].get("label", scheme)
|
|
123
134
|
|
|
124
|
-
return
|
|
135
|
+
return scheme
|
|
125
136
|
|
|
126
137
|
|
|
127
138
|
def localize_number(value):
|
|
@@ -150,3 +161,59 @@ def truncate_number(value, max_value):
|
|
|
150
161
|
if int(value) > max_value:
|
|
151
162
|
number = compact_number(value, max_value=1_000_000)
|
|
152
163
|
return number
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
def namespace_url(field):
|
|
167
|
+
"""Get custom field namespace url."""
|
|
168
|
+
namespace_array = field.split(":")
|
|
169
|
+
namespace = namespace_array[0]
|
|
170
|
+
namespace_value = namespace_array[1]
|
|
171
|
+
namespaces = current_app.config.get("RDM_NAMESPACES")
|
|
172
|
+
|
|
173
|
+
if not namespaces.get(namespace):
|
|
174
|
+
return None
|
|
175
|
+
|
|
176
|
+
return namespaces[namespace] + namespace_value
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
def custom_fields_search(field, field_value, field_cfg=None):
|
|
180
|
+
"""Get custom field search url."""
|
|
181
|
+
namespace_array = field.split(":")
|
|
182
|
+
namespace = namespace_array[0]
|
|
183
|
+
namespaces = current_app.config.get("RDM_NAMESPACES")
|
|
184
|
+
|
|
185
|
+
if not namespaces.get(namespace):
|
|
186
|
+
return None
|
|
187
|
+
|
|
188
|
+
localised_title = (field_cfg or {}).get("locale")
|
|
189
|
+
if localised_title:
|
|
190
|
+
locale = get_locale()
|
|
191
|
+
if not locale:
|
|
192
|
+
locale = current_app.config.get("BABEL_DEFAULT_LOCALE", "en")
|
|
193
|
+
# example: cern:experiments.title.en
|
|
194
|
+
# the \ is necessary for the lucene syntax but produces a SyntaxWarning.
|
|
195
|
+
# The r marks the string as raw and prevents the warning
|
|
196
|
+
# https://docs.python.org/3/reference/lexical_analysis.html#escape-sequences
|
|
197
|
+
namespace_string = r"\:".join(namespace_array) + f".{localised_title}.{locale}"
|
|
198
|
+
else:
|
|
199
|
+
namespace_string = r"\:".join(namespace_array)
|
|
200
|
+
|
|
201
|
+
return url_for(
|
|
202
|
+
"invenio_search_ui.search", q=f"custom_fields.{namespace_string}:{field_value}"
|
|
203
|
+
)
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
def transform_record(record, serializer, module=None, throws=True, **kwargs):
|
|
207
|
+
"""Transform a record using a serializer."""
|
|
208
|
+
try:
|
|
209
|
+
module = module or "invenio_rdm_records.resources.serializers"
|
|
210
|
+
import_str = f"{module}:{serializer}"
|
|
211
|
+
serializer = obj_or_import_string(import_str)
|
|
212
|
+
if serializer:
|
|
213
|
+
return serializer().dump_obj(record)
|
|
214
|
+
if throws:
|
|
215
|
+
raise Exception("No serializer found.")
|
|
216
|
+
except Exception:
|
|
217
|
+
current_app.logger.exception("Record transformation failed.")
|
|
218
|
+
if throws:
|
|
219
|
+
raise
|