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
|
@@ -10,33 +10,43 @@
|
|
|
10
10
|
"""Views related to records and deposits."""
|
|
11
11
|
|
|
12
12
|
from flask import Blueprint
|
|
13
|
+
from invenio_drafts_resources.resources.records.errors import DraftNotCreatedError
|
|
13
14
|
from invenio_pidstore.errors import (
|
|
14
15
|
PIDDeletedError,
|
|
15
16
|
PIDDoesNotExistError,
|
|
16
17
|
PIDUnregistered,
|
|
17
18
|
)
|
|
19
|
+
from invenio_rdm_records.services.errors import RecordDeletedException
|
|
18
20
|
from invenio_records_resources.services.errors import (
|
|
19
21
|
FileKeyNotFoundError,
|
|
20
22
|
PermissionDeniedError,
|
|
23
|
+
RecordPermissionDeniedError,
|
|
21
24
|
)
|
|
25
|
+
from sqlalchemy.orm.exc import NoResultFound
|
|
26
|
+
|
|
27
|
+
from invenio_app_rdm.views import create_url_rule
|
|
22
28
|
|
|
23
29
|
from ..searchapp import search_app_context
|
|
24
|
-
from .deposits import deposit_create, deposit_edit
|
|
30
|
+
from .deposits import community_upload, deposit_create, deposit_edit
|
|
25
31
|
from .filters import (
|
|
26
32
|
can_list_files,
|
|
27
33
|
compact_number,
|
|
34
|
+
custom_fields_search,
|
|
28
35
|
get_scheme_label,
|
|
29
36
|
has_images,
|
|
30
37
|
has_previewable_files,
|
|
31
38
|
localize_number,
|
|
32
39
|
make_files_preview_compatible,
|
|
40
|
+
namespace_url,
|
|
33
41
|
order_entries,
|
|
34
42
|
pid_url,
|
|
35
43
|
select_preview_file,
|
|
36
44
|
to_previewer_files,
|
|
45
|
+
transform_record,
|
|
37
46
|
truncate_number,
|
|
38
47
|
)
|
|
39
48
|
from .records import (
|
|
49
|
+
draft_not_found_error,
|
|
40
50
|
not_found_error,
|
|
41
51
|
record_detail,
|
|
42
52
|
record_export,
|
|
@@ -44,7 +54,9 @@ from .records import (
|
|
|
44
54
|
record_file_preview,
|
|
45
55
|
record_from_pid,
|
|
46
56
|
record_latest,
|
|
57
|
+
record_media_file_download,
|
|
47
58
|
record_permission_denied_error,
|
|
59
|
+
record_thumbnail,
|
|
48
60
|
record_tombstone_error,
|
|
49
61
|
)
|
|
50
62
|
|
|
@@ -55,6 +67,7 @@ from .records import (
|
|
|
55
67
|
def create_blueprint(app):
|
|
56
68
|
"""Register blueprint routes on app."""
|
|
57
69
|
routes = app.config.get("APP_RDM_ROUTES")
|
|
70
|
+
communities_routes = app.config.get("COMMUNITIES_ROUTES")
|
|
58
71
|
|
|
59
72
|
blueprint = Blueprint(
|
|
60
73
|
"invenio_app_rdm_records",
|
|
@@ -64,13 +77,17 @@ def create_blueprint(app):
|
|
|
64
77
|
|
|
65
78
|
# Record URL rules
|
|
66
79
|
blueprint.add_url_rule(
|
|
67
|
-
|
|
68
|
-
|
|
80
|
+
**create_url_rule(
|
|
81
|
+
routes["record_detail"],
|
|
82
|
+
default_view_func=record_detail,
|
|
83
|
+
)
|
|
69
84
|
)
|
|
70
85
|
|
|
71
86
|
blueprint.add_url_rule(
|
|
72
|
-
|
|
73
|
-
|
|
87
|
+
**create_url_rule(
|
|
88
|
+
routes["record_latest"],
|
|
89
|
+
default_view_func=record_latest,
|
|
90
|
+
)
|
|
74
91
|
)
|
|
75
92
|
|
|
76
93
|
rdm_records_ext = app.extensions["invenio-rdm-records"]
|
|
@@ -78,33 +95,65 @@ def create_blueprint(app):
|
|
|
78
95
|
schemes = ",".join(schemes)
|
|
79
96
|
if schemes:
|
|
80
97
|
blueprint.add_url_rule(
|
|
81
|
-
|
|
82
|
-
|
|
98
|
+
**create_url_rule(
|
|
99
|
+
routes["record_from_pid"].format(schemes=schemes),
|
|
100
|
+
default_view_func=record_from_pid,
|
|
101
|
+
)
|
|
83
102
|
)
|
|
84
103
|
|
|
85
104
|
blueprint.add_url_rule(
|
|
86
|
-
|
|
87
|
-
|
|
105
|
+
**create_url_rule(
|
|
106
|
+
routes["record_export"],
|
|
107
|
+
default_view_func=record_export,
|
|
108
|
+
)
|
|
88
109
|
)
|
|
89
110
|
|
|
90
111
|
blueprint.add_url_rule(
|
|
91
|
-
|
|
92
|
-
|
|
112
|
+
**create_url_rule(
|
|
113
|
+
routes["record_file_preview"],
|
|
114
|
+
default_view_func=record_file_preview,
|
|
115
|
+
)
|
|
93
116
|
)
|
|
94
117
|
|
|
95
118
|
blueprint.add_url_rule(
|
|
96
|
-
|
|
97
|
-
|
|
119
|
+
**create_url_rule(
|
|
120
|
+
routes["record_file_download"],
|
|
121
|
+
default_view_func=record_file_download,
|
|
122
|
+
)
|
|
123
|
+
)
|
|
124
|
+
blueprint.add_url_rule(
|
|
125
|
+
**create_url_rule(
|
|
126
|
+
routes["record_thumbnail"],
|
|
127
|
+
default_view_func=record_thumbnail,
|
|
128
|
+
)
|
|
98
129
|
)
|
|
99
130
|
|
|
100
131
|
blueprint.add_url_rule(
|
|
101
|
-
|
|
102
|
-
|
|
132
|
+
**create_url_rule(
|
|
133
|
+
routes["record_media_file_download"],
|
|
134
|
+
default_view_func=record_media_file_download,
|
|
135
|
+
)
|
|
103
136
|
)
|
|
104
137
|
|
|
105
138
|
blueprint.add_url_rule(
|
|
106
|
-
|
|
107
|
-
|
|
139
|
+
**create_url_rule(
|
|
140
|
+
routes["deposit_create"],
|
|
141
|
+
default_view_func=deposit_create,
|
|
142
|
+
)
|
|
143
|
+
)
|
|
144
|
+
|
|
145
|
+
blueprint.add_url_rule(
|
|
146
|
+
**create_url_rule(
|
|
147
|
+
routes["deposit_edit"],
|
|
148
|
+
default_view_func=deposit_edit,
|
|
149
|
+
)
|
|
150
|
+
)
|
|
151
|
+
|
|
152
|
+
blueprint.add_url_rule(
|
|
153
|
+
**create_url_rule(
|
|
154
|
+
communities_routes["upload"],
|
|
155
|
+
default_view_func=community_upload,
|
|
156
|
+
)
|
|
108
157
|
)
|
|
109
158
|
|
|
110
159
|
# Register error handlers
|
|
@@ -113,9 +162,15 @@ def create_blueprint(app):
|
|
|
113
162
|
blueprint.register_error_handler(PIDUnregistered, not_found_error)
|
|
114
163
|
blueprint.register_error_handler(KeyError, not_found_error)
|
|
115
164
|
blueprint.register_error_handler(FileKeyNotFoundError, not_found_error)
|
|
165
|
+
blueprint.register_error_handler(NoResultFound, not_found_error)
|
|
166
|
+
blueprint.register_error_handler(DraftNotCreatedError, draft_not_found_error)
|
|
116
167
|
blueprint.register_error_handler(
|
|
117
168
|
PermissionDeniedError, record_permission_denied_error
|
|
118
169
|
)
|
|
170
|
+
blueprint.register_error_handler(
|
|
171
|
+
RecordPermissionDeniedError, record_permission_denied_error
|
|
172
|
+
)
|
|
173
|
+
blueprint.register_error_handler(RecordDeletedException, record_tombstone_error)
|
|
119
174
|
|
|
120
175
|
# Register template filters
|
|
121
176
|
blueprint.add_app_template_filter(can_list_files)
|
|
@@ -130,6 +185,9 @@ def create_blueprint(app):
|
|
|
130
185
|
blueprint.add_app_template_filter(localize_number)
|
|
131
186
|
blueprint.add_app_template_filter(compact_number)
|
|
132
187
|
blueprint.add_app_template_filter(truncate_number)
|
|
188
|
+
blueprint.add_app_template_filter(namespace_url)
|
|
189
|
+
blueprint.add_app_template_filter(custom_fields_search)
|
|
190
|
+
blueprint.add_app_template_filter(transform_record)
|
|
133
191
|
|
|
134
192
|
# Register context processor
|
|
135
193
|
blueprint.app_context_processor(search_app_context)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
2
|
#
|
|
3
|
-
# Copyright (C) 2019-
|
|
4
|
-
# Copyright (C) 2019-
|
|
3
|
+
# Copyright (C) 2019-2025 CERN.
|
|
4
|
+
# Copyright (C) 2019-2025 Northwestern University.
|
|
5
5
|
# Copyright (C) 2021 TU Wien.
|
|
6
6
|
#
|
|
7
7
|
# Invenio App RDM is free software; you can redistribute it and/or modify it
|
|
@@ -11,12 +11,19 @@
|
|
|
11
11
|
|
|
12
12
|
from functools import wraps
|
|
13
13
|
|
|
14
|
-
from flask import g, request
|
|
14
|
+
from flask import current_app, g, make_response, redirect, request, session, url_for
|
|
15
|
+
from flask_login import login_required
|
|
16
|
+
from invenio_base import invenio_url_for
|
|
15
17
|
from invenio_communities.communities.resources.serializer import (
|
|
16
18
|
UICommunityJSONSerializer,
|
|
17
19
|
)
|
|
18
20
|
from invenio_communities.proxies import current_communities
|
|
21
|
+
from invenio_pidstore.errors import PIDDoesNotExistError
|
|
19
22
|
from invenio_rdm_records.proxies import current_rdm_records
|
|
23
|
+
from invenio_rdm_records.resources.serializers.signposting import (
|
|
24
|
+
FAIRSignpostingProfileLvl1Serializer,
|
|
25
|
+
)
|
|
26
|
+
from invenio_rdm_records.services.errors import RecordDeletedException
|
|
20
27
|
from invenio_records_resources.services.errors import PermissionDeniedError
|
|
21
28
|
from sqlalchemy.orm.exc import NoResultFound
|
|
22
29
|
|
|
@@ -31,11 +38,21 @@ def files_service():
|
|
|
31
38
|
return current_rdm_records.records_service.files
|
|
32
39
|
|
|
33
40
|
|
|
41
|
+
def media_files_service():
|
|
42
|
+
"""Get the record files service."""
|
|
43
|
+
return current_rdm_records.records_media_files_service.files
|
|
44
|
+
|
|
45
|
+
|
|
34
46
|
def draft_files_service():
|
|
35
47
|
"""Get the record files service."""
|
|
36
48
|
return current_rdm_records.records_service.draft_files
|
|
37
49
|
|
|
38
50
|
|
|
51
|
+
def draft_media_files_service():
|
|
52
|
+
"""Get the record files service."""
|
|
53
|
+
return current_rdm_records.records_media_files_service.draft_files
|
|
54
|
+
|
|
55
|
+
|
|
39
56
|
def pass_record_latest(f):
|
|
40
57
|
"""Decorate a view to pass the latest version of a record."""
|
|
41
58
|
|
|
@@ -56,13 +73,27 @@ def pass_draft(expand=False):
|
|
|
56
73
|
@wraps(f)
|
|
57
74
|
def view(**kwargs):
|
|
58
75
|
pid_value = kwargs.get("pid_value")
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
76
|
+
try:
|
|
77
|
+
record_service = service()
|
|
78
|
+
draft = record_service.read_draft(
|
|
79
|
+
id_=pid_value,
|
|
80
|
+
identity=g.identity,
|
|
81
|
+
expand=expand,
|
|
82
|
+
)
|
|
83
|
+
kwargs["draft"] = draft
|
|
84
|
+
kwargs["files_locked"] = draft._record.files.bucket.locked
|
|
85
|
+
return f(**kwargs)
|
|
86
|
+
except PIDDoesNotExistError:
|
|
87
|
+
# Redirect to /records/:id because users are interchangeably
|
|
88
|
+
# using /records/:id and /uploads/:id when sharing links, so in
|
|
89
|
+
# case a draft doesn't exists, when check if the record exists
|
|
90
|
+
# always.
|
|
91
|
+
return redirect(
|
|
92
|
+
url_for(
|
|
93
|
+
"invenio_app_rdm_records.record_detail",
|
|
94
|
+
pid_value=pid_value,
|
|
95
|
+
)
|
|
96
|
+
)
|
|
66
97
|
|
|
67
98
|
return view
|
|
68
99
|
|
|
@@ -74,11 +105,23 @@ def pass_is_preview(f):
|
|
|
74
105
|
|
|
75
106
|
@wraps(f)
|
|
76
107
|
def view(**kwargs):
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
108
|
+
kwargs["is_preview"] = request.args.get("preview") == "1"
|
|
109
|
+
return f(**kwargs)
|
|
110
|
+
|
|
111
|
+
return view
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
# TODO to be improved as a request arg schema (following the REST views)
|
|
115
|
+
def pass_include_deleted(f):
|
|
116
|
+
"""Decorate a view to check if it's a include deleted."""
|
|
117
|
+
|
|
118
|
+
@wraps(f)
|
|
119
|
+
def view(**kwargs):
|
|
120
|
+
deleted_arg = request.args.get("include_deleted")
|
|
121
|
+
include_deleted = False
|
|
122
|
+
if deleted_arg == "1":
|
|
123
|
+
include_deleted = True
|
|
124
|
+
kwargs["include_deleted"] = include_deleted
|
|
82
125
|
return f(**kwargs)
|
|
83
126
|
|
|
84
127
|
return view
|
|
@@ -112,16 +155,45 @@ def pass_record_or_draft(expand=False):
|
|
|
112
155
|
def view(**kwargs):
|
|
113
156
|
pid_value = kwargs.get("pid_value")
|
|
114
157
|
is_preview = kwargs.get("is_preview")
|
|
115
|
-
|
|
158
|
+
include_deleted = kwargs.get("include_deleted", False)
|
|
159
|
+
read_kwargs = {
|
|
160
|
+
"id_": pid_value,
|
|
161
|
+
"identity": g.identity,
|
|
162
|
+
"expand": expand,
|
|
163
|
+
}
|
|
116
164
|
|
|
117
165
|
if is_preview:
|
|
118
166
|
try:
|
|
119
167
|
record = service().read_draft(**read_kwargs)
|
|
120
168
|
except NoResultFound:
|
|
121
|
-
|
|
169
|
+
try:
|
|
170
|
+
record = service().read(
|
|
171
|
+
include_deleted=include_deleted, **read_kwargs
|
|
172
|
+
)
|
|
173
|
+
except NoResultFound:
|
|
174
|
+
# If the parent pid is being used we can get the id of the latest record and redirect
|
|
175
|
+
latest_version = service().read_latest(**read_kwargs)
|
|
176
|
+
return redirect(
|
|
177
|
+
url_for(
|
|
178
|
+
"invenio_app_rdm_records.record_detail",
|
|
179
|
+
pid_value=latest_version.id,
|
|
180
|
+
preview=1,
|
|
181
|
+
)
|
|
182
|
+
)
|
|
122
183
|
else:
|
|
123
|
-
|
|
124
|
-
|
|
184
|
+
try:
|
|
185
|
+
record = service().read(
|
|
186
|
+
include_deleted=include_deleted, **read_kwargs
|
|
187
|
+
)
|
|
188
|
+
except NoResultFound:
|
|
189
|
+
# If the parent pid is being used we can get the id of the latest record and redirect
|
|
190
|
+
latest_version = service().read_latest(**read_kwargs)
|
|
191
|
+
return redirect(
|
|
192
|
+
url_for(
|
|
193
|
+
"invenio_app_rdm_records.record_detail",
|
|
194
|
+
pid_value=latest_version.id,
|
|
195
|
+
)
|
|
196
|
+
)
|
|
125
197
|
kwargs["record"] = record
|
|
126
198
|
return f(**kwargs)
|
|
127
199
|
|
|
@@ -130,28 +202,51 @@ def pass_record_or_draft(expand=False):
|
|
|
130
202
|
return decorator
|
|
131
203
|
|
|
132
204
|
|
|
133
|
-
def pass_file_item(
|
|
134
|
-
"""
|
|
205
|
+
def pass_file_item(is_media=False):
|
|
206
|
+
"""Decorator to pass a file or media file item using the corresponding service."""
|
|
135
207
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
208
|
+
def decorator(f):
|
|
209
|
+
@wraps(f)
|
|
210
|
+
def view(**kwargs):
|
|
211
|
+
pid_value = kwargs.get("pid_value")
|
|
212
|
+
file_key = kwargs.get("filename")
|
|
213
|
+
is_preview = kwargs.get("is_preview")
|
|
214
|
+
read_kwargs = {
|
|
215
|
+
"id_": pid_value,
|
|
216
|
+
"file_key": file_key,
|
|
217
|
+
"identity": g.identity,
|
|
218
|
+
}
|
|
219
|
+
draft_service = (
|
|
220
|
+
draft_media_files_service if is_media else draft_files_service
|
|
221
|
+
)
|
|
222
|
+
record_service = media_files_service if is_media else files_service
|
|
142
223
|
|
|
143
|
-
if is_preview:
|
|
144
224
|
try:
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
225
|
+
if is_preview:
|
|
226
|
+
try:
|
|
227
|
+
item = draft_service().get_file_content(**read_kwargs)
|
|
228
|
+
except NoResultFound:
|
|
229
|
+
item = record_service().get_file_content(**read_kwargs)
|
|
230
|
+
else:
|
|
231
|
+
item = record_service().get_file_content(**read_kwargs)
|
|
232
|
+
|
|
233
|
+
kwargs["file_item"] = item
|
|
234
|
+
return f(**kwargs)
|
|
235
|
+
|
|
236
|
+
except RecordDeletedException:
|
|
237
|
+
# Redirect to the record page which has proper tombstone handling
|
|
238
|
+
return redirect(
|
|
239
|
+
url_for(
|
|
240
|
+
"invenio_app_rdm_records.record_detail",
|
|
241
|
+
pid_value=pid_value,
|
|
242
|
+
),
|
|
243
|
+
# Use 302 (temporary) instead of 301 since records can be restored
|
|
244
|
+
code=302,
|
|
245
|
+
)
|
|
150
246
|
|
|
151
|
-
|
|
152
|
-
return f(**kwargs)
|
|
247
|
+
return view
|
|
153
248
|
|
|
154
|
-
return
|
|
249
|
+
return decorator
|
|
155
250
|
|
|
156
251
|
|
|
157
252
|
def pass_file_metadata(f):
|
|
@@ -209,6 +304,37 @@ def pass_record_files(f):
|
|
|
209
304
|
return view
|
|
210
305
|
|
|
211
306
|
|
|
307
|
+
def pass_record_media_files(f):
|
|
308
|
+
"""Decorate a view to pass a record's media files using the files service."""
|
|
309
|
+
|
|
310
|
+
@wraps(f)
|
|
311
|
+
def view(**kwargs):
|
|
312
|
+
is_preview = kwargs.get("is_preview")
|
|
313
|
+
pid_value = kwargs.get("pid_value")
|
|
314
|
+
read_kwargs = {"id_": pid_value, "identity": g.identity}
|
|
315
|
+
|
|
316
|
+
try:
|
|
317
|
+
if is_preview:
|
|
318
|
+
try:
|
|
319
|
+
media_files = draft_media_files_service().list_files(**read_kwargs)
|
|
320
|
+
except NoResultFound:
|
|
321
|
+
media_files = media_files_service().list_files(**read_kwargs)
|
|
322
|
+
else:
|
|
323
|
+
media_files = media_files_service().list_files(**read_kwargs)
|
|
324
|
+
|
|
325
|
+
kwargs["media_files"] = media_files
|
|
326
|
+
|
|
327
|
+
except PermissionDeniedError:
|
|
328
|
+
# this is handled here because we don't want a 404 on the landing
|
|
329
|
+
# page when a user is allowed to read the metadata but not the
|
|
330
|
+
# files
|
|
331
|
+
kwargs["media_files"] = None
|
|
332
|
+
|
|
333
|
+
return f(**kwargs)
|
|
334
|
+
|
|
335
|
+
return view
|
|
336
|
+
|
|
337
|
+
|
|
212
338
|
def pass_draft_files(f):
|
|
213
339
|
"""Decorate a view to pass a draft's files using the files service."""
|
|
214
340
|
|
|
@@ -218,7 +344,6 @@ def pass_draft_files(f):
|
|
|
218
344
|
pid_value = kwargs.get("pid_value")
|
|
219
345
|
files = draft_files_service().list_files(id_=pid_value, identity=g.identity)
|
|
220
346
|
kwargs["draft_files"] = files
|
|
221
|
-
|
|
222
347
|
except PermissionDeniedError:
|
|
223
348
|
# this is handled here because we don't want a 404 on the landing
|
|
224
349
|
# page when a user is allowed to read the metadata but not the
|
|
@@ -242,10 +367,156 @@ def pass_draft_community(f):
|
|
|
242
367
|
comid = request.args.get("community")
|
|
243
368
|
if comid:
|
|
244
369
|
community = current_communities.service.read(id_=comid, identity=g.identity)
|
|
245
|
-
kwargs["community"] =
|
|
370
|
+
kwargs["community"] = community
|
|
371
|
+
kwargs["community_ui"] = UICommunityJSONSerializer().dump_obj(
|
|
246
372
|
community.to_dict()
|
|
247
373
|
)
|
|
248
374
|
|
|
249
375
|
return f(**kwargs)
|
|
250
376
|
|
|
251
377
|
return view
|
|
378
|
+
|
|
379
|
+
|
|
380
|
+
def _get_header(rel, value, link_type=None):
|
|
381
|
+
header = f'<{value}> ; rel="{rel}"'
|
|
382
|
+
if link_type:
|
|
383
|
+
header += f' ; type="{link_type}"'
|
|
384
|
+
return header
|
|
385
|
+
|
|
386
|
+
|
|
387
|
+
def _get_signposting_collection(pid_value):
|
|
388
|
+
ui_url = invenio_url_for(
|
|
389
|
+
"invenio_app_rdm_records.record_detail", pid_value=pid_value
|
|
390
|
+
)
|
|
391
|
+
return _get_header("collection", ui_url, "text/html")
|
|
392
|
+
|
|
393
|
+
|
|
394
|
+
def _get_signposting_describes(pid_value):
|
|
395
|
+
ui_url = invenio_url_for(
|
|
396
|
+
"invenio_app_rdm_records.record_detail", pid_value=pid_value
|
|
397
|
+
)
|
|
398
|
+
return _get_header("describes", ui_url, "text/html")
|
|
399
|
+
|
|
400
|
+
|
|
401
|
+
def _get_signposting_linkset(pid_value):
|
|
402
|
+
api_url = invenio_url_for("records.read", pid_value=pid_value)
|
|
403
|
+
return _get_header("linkset", api_url, "application/linkset+json")
|
|
404
|
+
|
|
405
|
+
|
|
406
|
+
def add_signposting_landing_page(f):
|
|
407
|
+
"""Add signposting links to the landing page view's response headers."""
|
|
408
|
+
|
|
409
|
+
@wraps(f)
|
|
410
|
+
def view(*args, **kwargs):
|
|
411
|
+
response = make_response(f(*args, **kwargs))
|
|
412
|
+
|
|
413
|
+
# Relies on other decorators having operated before it
|
|
414
|
+
if current_app.config[
|
|
415
|
+
"APP_RDM_RECORD_LANDING_PAGE_FAIR_SIGNPOSTING_LEVEL_1_ENABLED"
|
|
416
|
+
]:
|
|
417
|
+
record = kwargs["record"]
|
|
418
|
+
|
|
419
|
+
signposting_headers = (
|
|
420
|
+
FAIRSignpostingProfileLvl1Serializer().serialize_object(
|
|
421
|
+
record.to_dict()
|
|
422
|
+
)
|
|
423
|
+
)
|
|
424
|
+
|
|
425
|
+
response.headers["Link"] = signposting_headers
|
|
426
|
+
else:
|
|
427
|
+
pid_value = kwargs["pid_value"]
|
|
428
|
+
signposting_link = invenio_url_for("records.read", pid_value=pid_value)
|
|
429
|
+
|
|
430
|
+
response.headers["Link"] = (
|
|
431
|
+
f'<{signposting_link}> ; rel="linkset" ; type="application/linkset+json"' # fmt: skip
|
|
432
|
+
)
|
|
433
|
+
|
|
434
|
+
return response
|
|
435
|
+
|
|
436
|
+
return view
|
|
437
|
+
|
|
438
|
+
|
|
439
|
+
def add_signposting_content_resources(f):
|
|
440
|
+
"""Add signposting links to the content resources view's response headers."""
|
|
441
|
+
|
|
442
|
+
@wraps(f)
|
|
443
|
+
def view(*args, **kwargs):
|
|
444
|
+
response = make_response(f(*args, **kwargs))
|
|
445
|
+
|
|
446
|
+
# Relies on other decorators having operated before it
|
|
447
|
+
pid_value = kwargs["pid_value"]
|
|
448
|
+
|
|
449
|
+
signposting_headers = [
|
|
450
|
+
_get_signposting_collection(pid_value),
|
|
451
|
+
_get_signposting_linkset(pid_value),
|
|
452
|
+
]
|
|
453
|
+
|
|
454
|
+
response.headers["Link"] = " , ".join(signposting_headers)
|
|
455
|
+
|
|
456
|
+
return response
|
|
457
|
+
|
|
458
|
+
return view
|
|
459
|
+
|
|
460
|
+
|
|
461
|
+
def add_signposting_metadata_resources(f):
|
|
462
|
+
"""Add signposting links to the metadata resources view's response headers."""
|
|
463
|
+
|
|
464
|
+
@wraps(f)
|
|
465
|
+
def view(*args, **kwargs):
|
|
466
|
+
response = make_response(f(*args, **kwargs))
|
|
467
|
+
|
|
468
|
+
# Relies on other decorators having operated before it
|
|
469
|
+
pid_value = kwargs["pid_value"]
|
|
470
|
+
|
|
471
|
+
signposting_headers = [
|
|
472
|
+
_get_signposting_describes(pid_value),
|
|
473
|
+
_get_signposting_linkset(pid_value),
|
|
474
|
+
]
|
|
475
|
+
|
|
476
|
+
response.headers["Link"] = " , ".join(signposting_headers)
|
|
477
|
+
|
|
478
|
+
return response
|
|
479
|
+
|
|
480
|
+
return view
|
|
481
|
+
|
|
482
|
+
|
|
483
|
+
def secret_link_or_login_required():
|
|
484
|
+
"""Skip login redirection check for requests with secret links.
|
|
485
|
+
|
|
486
|
+
If access has been granted via a secret link, then permissions are checked
|
|
487
|
+
in the dedicated view.
|
|
488
|
+
"""
|
|
489
|
+
|
|
490
|
+
def decorator(f):
|
|
491
|
+
@wraps(f)
|
|
492
|
+
def view(**kwargs):
|
|
493
|
+
secret_link_token_arg = "token"
|
|
494
|
+
session_token = session.get(secret_link_token_arg, None)
|
|
495
|
+
if session_token is None:
|
|
496
|
+
login_required(f)
|
|
497
|
+
return f(**kwargs)
|
|
498
|
+
|
|
499
|
+
return view
|
|
500
|
+
|
|
501
|
+
return decorator
|
|
502
|
+
|
|
503
|
+
|
|
504
|
+
def no_cache_response(f):
|
|
505
|
+
"""Add appropriate response headers to force no caching.
|
|
506
|
+
|
|
507
|
+
This decorator is used to prevent caching of the response in the browser. This is needed
|
|
508
|
+
in the deposit form as we initialize the form with the record metadata included in the html page
|
|
509
|
+
and we don't want the browser to cache this page so that the user always gets the latest version of the record.
|
|
510
|
+
"""
|
|
511
|
+
|
|
512
|
+
@wraps(f)
|
|
513
|
+
def view(*args, **kwargs):
|
|
514
|
+
response = make_response(f(*args, **kwargs))
|
|
515
|
+
|
|
516
|
+
response.cache_control.no_cache = True
|
|
517
|
+
response.cache_control.no_store = True
|
|
518
|
+
response.cache_control.must_revalidate = True
|
|
519
|
+
|
|
520
|
+
return response
|
|
521
|
+
|
|
522
|
+
return view
|