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.
Files changed (479) hide show
  1. invenio_app_rdm/__init__.py +3 -2
  2. invenio_app_rdm/{stats/templates/events/record_view/v7 → administration}/__init__.py +1 -3
  3. invenio_app_rdm/{stats/templates/events/record_view → administration/audit_logs}/__init__.py +6 -4
  4. invenio_app_rdm/administration/audit_logs/audit_logs.py +81 -0
  5. invenio_app_rdm/administration/domains/__init__.py +22 -0
  6. invenio_app_rdm/administration/domains/domains.py +159 -0
  7. invenio_app_rdm/administration/moderation/__init__.py +11 -0
  8. invenio_app_rdm/administration/moderation/requests.py +175 -0
  9. invenio_app_rdm/administration/records/__init__.py +15 -0
  10. invenio_app_rdm/administration/records/records.py +163 -0
  11. invenio_app_rdm/administration/templates/semantic-ui/invenio_app_rdm/administration/audit_logs.html +14 -0
  12. invenio_app_rdm/administration/templates/semantic-ui/invenio_app_rdm/administration/domains_search.html +13 -0
  13. invenio_app_rdm/administration/templates/semantic-ui/invenio_app_rdm/administration/records/drafts.html +14 -0
  14. invenio_app_rdm/administration/templates/semantic-ui/invenio_app_rdm/administration/records/records.html +14 -0
  15. invenio_app_rdm/administration/templates/semantic-ui/invenio_app_rdm/administration/requests.html +14 -0
  16. invenio_app_rdm/administration/templates/semantic-ui/invenio_app_rdm/administration/requests_details.html +91 -0
  17. invenio_app_rdm/administration/templates/semantic-ui/invenio_app_rdm/administration/user_moderation.html +14 -0
  18. invenio_app_rdm/administration/templates/semantic-ui/invenio_app_rdm/administration/user_moderation_details.html +14 -0
  19. invenio_app_rdm/administration/templates/semantic-ui/invenio_app_rdm/administration/users_search.html +14 -0
  20. invenio_app_rdm/{stats/templates/aggregations/aggr_record_view/v7 → administration/user_moderation}/__init__.py +4 -3
  21. invenio_app_rdm/administration/user_moderation/user_moderation.py +175 -0
  22. invenio_app_rdm/administration/users/__init__.py +12 -0
  23. invenio_app_rdm/administration/users/users.py +130 -0
  24. invenio_app_rdm/{stats/templates/events/file_download/v7 → administration/views}/__init__.py +4 -3
  25. invenio_app_rdm/administration/views/ui.py +21 -0
  26. invenio_app_rdm/cli.py +37 -14
  27. invenio_app_rdm/communities_ui/searchapp.py +1 -0
  28. invenio_app_rdm/communities_ui/sitemap.py +63 -0
  29. invenio_app_rdm/communities_ui/templates/semantic-ui/invenio_communities/collections/collection.html +60 -0
  30. invenio_app_rdm/communities_ui/templates/semantic-ui/invenio_communities/collections/macros.html +43 -0
  31. invenio_app_rdm/communities_ui/templates/semantic-ui/invenio_communities/details/browse/index.html +59 -0
  32. invenio_app_rdm/communities_ui/templates/semantic-ui/invenio_communities/{details → records}/index.html +1 -1
  33. invenio_app_rdm/communities_ui/views/communities.py +183 -8
  34. invenio_app_rdm/communities_ui/views/ui.py +52 -42
  35. invenio_app_rdm/config.py +586 -90
  36. invenio_app_rdm/ext.py +157 -0
  37. invenio_app_rdm/fixtures/__init__.py +2 -2
  38. invenio_app_rdm/fixtures/pages.py +34 -12
  39. invenio_app_rdm/records_ui/searchapp.py +43 -0
  40. invenio_app_rdm/records_ui/sitemap.py +44 -0
  41. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/deposit.html +59 -16
  42. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/detail.html +236 -141
  43. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/access-form.html +64 -0
  44. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/citation.html +4 -3
  45. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/contact.html +2 -1
  46. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/creatibutors.html +22 -20
  47. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/description.html +7 -5
  48. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/details.html +290 -230
  49. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/doi.html +3 -24
  50. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/meta.html +36 -0
  51. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/citations.html +6 -0
  52. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/communities.html +30 -22
  53. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/details.html +20 -19
  54. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/export.html +19 -16
  55. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/external_resources.html +55 -0
  56. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/keywords_subjects.html +9 -5
  57. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/licenses.html +62 -49
  58. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/locations.html +23 -0
  59. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/manage_menu.html +24 -4
  60. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/metrics.html +2 -2
  61. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/technical_metadata.html +21 -0
  62. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/versions.html +15 -5
  63. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/stats.html +93 -79
  64. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/subjects.html +1 -1
  65. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/draft_not_found.html +17 -0
  66. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/export.html +2 -1
  67. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/macros/creatibutors.html +54 -39
  68. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/macros/detail.html +182 -93
  69. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/macros/doi.html +36 -0
  70. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/macros/files.html +152 -79
  71. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/macros/locations.html +62 -0
  72. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/macros/version.html +3 -2
  73. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/restricted_with_doi_tombstone.html +33 -0
  74. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/tombstone.html +55 -12
  75. invenio_app_rdm/records_ui/utils.py +126 -1
  76. invenio_app_rdm/records_ui/views/__init__.py +75 -17
  77. invenio_app_rdm/records_ui/views/decorators.py +309 -38
  78. invenio_app_rdm/records_ui/views/deposits.py +302 -51
  79. invenio_app_rdm/records_ui/views/filters.py +74 -7
  80. invenio_app_rdm/records_ui/views/records.py +256 -90
  81. invenio_app_rdm/redirector/resource.py +1 -0
  82. invenio_app_rdm/requests_ui/templates/semantic-ui/invenio_requests/community-submission/index.html +34 -8
  83. invenio_app_rdm/requests_ui/templates/semantic-ui/invenio_requests/file-modification/index.html +88 -0
  84. invenio_app_rdm/requests_ui/templates/semantic-ui/invenio_requests/guest-access-request/index.html +66 -0
  85. invenio_app_rdm/requests_ui/templates/semantic-ui/invenio_requests/macros/request_header.html +5 -3
  86. invenio_app_rdm/requests_ui/templates/semantic-ui/invenio_requests/record-deletion/index.html +95 -0
  87. invenio_app_rdm/requests_ui/templates/semantic-ui/invenio_requests/subcommunity/index.html +49 -0
  88. invenio_app_rdm/requests_ui/templates/semantic-ui/invenio_requests/subcommunity-invitation/index.html +49 -0
  89. invenio_app_rdm/requests_ui/templates/semantic-ui/invenio_requests/user-access-request/index.html +59 -0
  90. invenio_app_rdm/requests_ui/views/requests.py +221 -42
  91. invenio_app_rdm/requests_ui/views/ui.py +17 -4
  92. invenio_app_rdm/tasks.py +6 -2
  93. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/auditLogs/AuditLogActions.js +136 -0
  94. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/auditLogs/ViewJson.js +35 -0
  95. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/auditLogs/ViewRecentChanges.js +119 -0
  96. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/auditLogs/index.js +31 -0
  97. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/auditLogs/search/SearchResultItemLayout.js +87 -0
  98. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/auditLogs/search/index.js +9 -0
  99. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/components/CompareRevisionsDropdown.js +89 -0
  100. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/components/ImpersonateUser.js +92 -0
  101. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/components/ImpersonateUserForm.js +199 -0
  102. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/components/RevisionsDiffViewer.js +80 -0
  103. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/components/SetQuotaAction.js +109 -0
  104. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/components/SetQuotaForm.js +196 -0
  105. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/components/index.js +9 -0
  106. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/domains/index.js +27 -0
  107. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/domains/search/SearchResultItemLayout.js +185 -0
  108. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/domains/search/index.js +9 -0
  109. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/drafts/index.js +32 -0
  110. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/CompareRevisions.js +129 -0
  111. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/RecordActions.js +75 -0
  112. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/RecordResourceActions.js +185 -0
  113. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/RemovalReasonsSelect.js +85 -0
  114. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/RestoreConfirmation.js +108 -0
  115. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/TombstoneForm.js +212 -0
  116. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/api/api.js +38 -0
  117. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/api/index.js +9 -0
  118. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/api/routes.js +30 -0
  119. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/index.js +40 -0
  120. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/search/AdministrationSearchLayout.js +56 -0
  121. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/search/RecordSearchLayout.js +84 -0
  122. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/search/SearchResultItemLayout.js +171 -0
  123. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/search/filters/DeletionStatusFilter.js +121 -0
  124. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/search/filters/index.js +9 -0
  125. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/search/index.js +10 -0
  126. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/requests/RequestsSearchResultItem.js +81 -0
  127. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/requests/RequestsSearchbarLayout.js +48 -0
  128. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/requests/index.js +22 -0
  129. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/userModeration/ModerationActions.js +103 -0
  130. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/userModeration/index.js +29 -0
  131. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/userModeration/search/SearchResultItemLayout.js +151 -0
  132. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/userModeration/search/UserModerationSearchLayout.js +56 -0
  133. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/userModeration/search/index.js +10 -0
  134. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/users/UserActions.js +263 -0
  135. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/users/api/api.js +42 -0
  136. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/users/api/index.js +8 -0
  137. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/users/api/routes.js +38 -0
  138. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/users/index.js +30 -0
  139. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/users/search/SearchResultItemLayout.js +202 -0
  140. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/users/search/UserSearchLayout.js +81 -0
  141. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/users/search/filters/UserStatusFilterComponent.js +114 -0
  142. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/users/search/filters/index.js +1 -0
  143. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/users/search/index.js +10 -0
  144. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/collectionRecordsSearch/index.js +61 -0
  145. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/communityRecordsSearch/CommunityRecordsSearchAppLayout.js +2 -2
  146. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/communityRecordsSearch/CommunityRecordsSearchBarElement.js +1 -1
  147. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/communityRecordsSearch/CommunityRecordsSingleSearchBarElement.js +1 -1
  148. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/communityRecordsSearch/index.js +8 -3
  149. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/components/CompactStats.js +51 -0
  150. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/components/CopyButton.js +38 -19
  151. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/components/DisplayPartOfCommunities.js +78 -0
  152. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/components/DisplayVerifiedCommunity.js +54 -0
  153. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/components/FileModificationUntil.js +45 -0
  154. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/components/RecordDeletion/DeletionModal.js +354 -0
  155. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/components/RecordDeletion/DeletionRadioGroup.js +44 -0
  156. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/components/RecordDeletion.js +81 -0
  157. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/components/RecordsResultsListItem.js +61 -31
  158. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/deposit/RDMDepositForm.js +680 -486
  159. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/deposit/ShareDraftButton.js +65 -0
  160. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/deposit/config.js +48 -0
  161. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/deposit/index.js +14 -2
  162. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/frontpage/RecordsList.js +61 -21
  163. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/AccessRequestForm.js +254 -0
  164. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/CommunitiesManagement.js +171 -0
  165. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/CommunitiesManagementDropdown.js +186 -0
  166. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/EditButton.js +10 -1
  167. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ExportDropdown.js +7 -2
  168. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ManageButton.js +140 -0
  169. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ManageDefaultBrandingAction/ManageDefaultBrandingAction.js +129 -0
  170. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/PendingCommunitiesModal/PendingCommunitiesModal.js +63 -0
  171. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/PendingCommunitiesModal/PendingCommunitiesSearch.js +89 -0
  172. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/PendingCommunitiesModal/PendingCommunityRequestItem.js +33 -0
  173. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/RecordCitationField.js +55 -51
  174. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/RecordCommunitiesList.js +87 -89
  175. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/RecordCommunitiesListModal/RecordCommunitiesListModal.js +44 -30
  176. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/RecordCommunitiesListModal/RecordCommunitiesSearch.js +39 -20
  177. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/RecordCommunitiesListModal/RecordCommunitiesSearchItem.js +44 -17
  178. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/RecordCommunitySubmission/RecordCommunitySubmissionModal.js +171 -0
  179. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/RecordManagement.js +111 -62
  180. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/RecordVersionsList.js +99 -61
  181. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/RemoveFromCommunity/RemoveFromCommunityAction.js +188 -0
  182. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ShareOptions/AccessLinks/AccessDropdown.js +93 -0
  183. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ShareOptions/AccessLinks/CreateAccessLink.js +98 -0
  184. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ShareOptions/AccessLinks/LinksSearchItem.js +170 -0
  185. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ShareOptions/AccessLinks/LinksSearchResultContainer.js +216 -0
  186. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ShareOptions/AccessLinks/LinksTab.js +104 -0
  187. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ShareOptions/AccessRequests/AccessRequestsTab.js +230 -0
  188. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ShareOptions/AccessUsersGroups/AccessUsersGroups.js +178 -0
  189. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ShareOptions/AccessUsersGroups/AddUserGroupAccessModal.js +172 -0
  190. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ShareOptions/AccessUsersGroups/GroupsTab.js +88 -0
  191. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ShareOptions/AccessUsersGroups/PeopleTab.js +88 -0
  192. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ShareOptions/AccessUsersGroups/UserGroupAccessSearchResultItem.js +158 -0
  193. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/{ShareButton.js → ShareOptions/ShareButton.js} +13 -4
  194. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ShareOptions/ShareModal.js +238 -0
  195. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ShareOptions/api/api.js +39 -0
  196. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/access.js +24 -0
  197. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/index.js +72 -25
  198. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/theme.js +10 -6
  199. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/overridableRegistry/mapping.js +6 -1
  200. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/requests/AccessRequestExpiration.js +56 -0
  201. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/requests/index.js +1 -0
  202. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/requests/timeline/AccessRequestTimelineEdit.js +177 -0
  203. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/requests/timeline/AccessRequestTimelineRead.js +50 -0
  204. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/requests/timeline/overrides/TimelineFeedHeader.js +34 -0
  205. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/search/components.js +15 -13
  206. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/search/index.js +1 -1
  207. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/subcommunity/browse.js +28 -0
  208. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/theme.js +77 -9
  209. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/user_dashboard/base.js +122 -74
  210. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/user_dashboard/communities.js +1 -11
  211. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/user_dashboard/requests.js +27 -412
  212. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/user_dashboard/uploads.js +15 -14
  213. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/user_dashboard/uploads_items/ComputerTabletUploadsItem.js +47 -27
  214. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/user_dashboard/uploads_items/MobileUploadsItem.js +43 -27
  215. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/utils.js +32 -7
  216. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/file_uploader/uppy.less +37 -0
  217. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/landing_page/creatibutors.less +15 -4
  218. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/landing_page/licenses.less +5 -3
  219. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/collections/form.overrides +15 -0
  220. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/collections/grid.overrides +24 -33
  221. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/collections/menu.overrides +18 -3
  222. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/collections/message.overrides +19 -3
  223. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/collections/message.variables +2 -0
  224. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/collections/table.overrides +78 -6
  225. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/elements/button.overrides +21 -0
  226. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/elements/container.overrides +30 -7
  227. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/elements/header.overrides +17 -4
  228. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/elements/icon.overrides +2 -0
  229. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/elements/image.overrides +34 -4
  230. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/elements/input.overrides +10 -0
  231. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/elements/label.overrides +48 -4
  232. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/elements/list.overrides +10 -0
  233. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/elements/segment.overrides +16 -13
  234. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/globals/site.overrides +156 -97
  235. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/globals/site.variables +7 -3
  236. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/modules/accordion.overrides +35 -9
  237. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/modules/dropdown.overrides +28 -6
  238. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/modules/dropdown.variables +1 -0
  239. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/modules/modal.overrides +40 -11
  240. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/modules/modal.variables +5 -0
  241. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/modules/search.overrides +7 -0
  242. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/modules/search.variables +0 -0
  243. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/modules/transition.overrides +8 -8
  244. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/theme.less +2 -5
  245. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/views/card.overrides +4 -2
  246. invenio_app_rdm/theme/assets/semantic-ui/less/invenio_app_rdm/theme/views/item.overrides +20 -33
  247. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/i18next.js +1 -1
  248. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/_generatedTranslations.js +66 -0
  249. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ar/messages.po +805 -138
  250. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ar/translations.json +306 -86
  251. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/bg/messages.po +690 -71
  252. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/bg/translations.json +282 -86
  253. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ca/messages.po +700 -81
  254. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ca/translations.json +282 -86
  255. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/cs/messages.po +822 -139
  256. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/cs/translations.json +294 -86
  257. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/da/messages.po +692 -67
  258. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/da/translations.json +282 -86
  259. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/de/messages.po +819 -139
  260. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/de/translations.json +282 -86
  261. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/el/messages.po +699 -79
  262. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/el/translations.json +282 -86
  263. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/en/messages.po +1000 -5
  264. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/en/translations.json +315 -2
  265. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/es/messages.po +811 -138
  266. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/es/translations.json +282 -86
  267. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/et/messages.po +747 -134
  268. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/et/translations.json +282 -86
  269. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/fa/messages.po +689 -70
  270. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/fa/translations.json +282 -86
  271. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/fr/messages.po +810 -127
  272. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/fr/translations.json +282 -86
  273. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/hr/messages.po +696 -71
  274. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/hr/translations.json +288 -86
  275. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/hu/messages.po +804 -137
  276. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/hu/translations.json +282 -86
  277. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/index.js +17 -66
  278. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/it/messages.po +715 -88
  279. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/it/translations.json +282 -86
  280. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ja/messages.po +684 -71
  281. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ja/translations.json +276 -86
  282. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ka/messages.po +690 -71
  283. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ka/translations.json +282 -86
  284. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ko/messages.po +889 -0
  285. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ko/translations.json +277 -0
  286. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/lt/messages.po +703 -72
  287. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/lt/translations.json +294 -86
  288. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/no/messages.po +690 -71
  289. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/no/translations.json +282 -86
  290. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/pl/messages.po +705 -71
  291. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/pl/translations.json +294 -86
  292. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/pt/messages.po +695 -70
  293. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/pt/translations.json +282 -86
  294. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ro/messages.po +718 -86
  295. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ro/translations.json +288 -86
  296. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ru/messages.po +807 -125
  297. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ru/translations.json +294 -86
  298. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/sk/messages.po +714 -83
  299. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/sk/translations.json +294 -86
  300. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/sv/messages.po +809 -142
  301. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/sv/translations.json +282 -86
  302. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/tr/messages.po +800 -129
  303. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/tr/translations.json +282 -86
  304. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/uk/messages.po +717 -83
  305. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/uk/translations.json +294 -86
  306. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/zh_CN/messages.po +737 -124
  307. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/zh_CN/translations.json +276 -86
  308. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/zh_TW/messages.po +684 -71
  309. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/zh_TW/translations.json +276 -86
  310. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/package.json +5 -38
  311. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/translations.pot +863 -127
  312. invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/administration_page.html +15 -0
  313. invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/default_static_page.html +8 -8
  314. invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/files_integrity_report/email/files_integrity_report.html +12 -12
  315. invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/footer.html +33 -75
  316. invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/header.html +42 -27
  317. invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/header_frontpage.html +4 -2
  318. invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/header_login.html +144 -113
  319. invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/help/search.de.html +2 -2
  320. invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/help/search.en.html +11 -6
  321. invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/help/search.sv.html +254 -0
  322. invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/help/statistics.sv.html +196 -0
  323. invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/help/versioning.en.html +149 -0
  324. invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/help/versioning.sv.html +143 -0
  325. invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/intro_section.html +15 -16
  326. invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/macros/records_list.html +33 -3
  327. invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/page.html +36 -0
  328. invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/page_cover.html +13 -0
  329. invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/robots.txt +15 -0
  330. invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/searchbar.html +43 -15
  331. invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/settings/notifications.html +17 -0
  332. invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/site_footer.html +29 -0
  333. invenio_app_rdm/theme/templates/semantic-ui/invenio_communities/default_static_page.html +26 -0
  334. invenio_app_rdm/theme/templates/themes/default/invenio_app_rdm/header.html +147 -0
  335. invenio_app_rdm/theme/templates/themes/default/invenio_app_rdm/site_footer.html +42 -0
  336. invenio_app_rdm/theme/views.py +80 -28
  337. invenio_app_rdm/theme/webpack.py +38 -7
  338. invenio_app_rdm/translations/ar/LC_MESSAGES/messages.mo +0 -0
  339. invenio_app_rdm/translations/ar/LC_MESSAGES/messages.po +975 -378
  340. invenio_app_rdm/translations/bg/LC_MESSAGES/messages.mo +0 -0
  341. invenio_app_rdm/translations/bg/LC_MESSAGES/messages.po +908 -279
  342. invenio_app_rdm/translations/ca/LC_MESSAGES/messages.mo +0 -0
  343. invenio_app_rdm/translations/ca/LC_MESSAGES/messages.po +913 -284
  344. invenio_app_rdm/translations/cs/LC_MESSAGES/messages.mo +0 -0
  345. invenio_app_rdm/translations/cs/LC_MESSAGES/messages.po +1070 -406
  346. invenio_app_rdm/translations/da/LC_MESSAGES/messages.mo +0 -0
  347. invenio_app_rdm/translations/da/LC_MESSAGES/messages.po +909 -274
  348. invenio_app_rdm/translations/de/LC_MESSAGES/messages.mo +0 -0
  349. invenio_app_rdm/translations/de/LC_MESSAGES/messages.po +1018 -407
  350. invenio_app_rdm/translations/el/LC_MESSAGES/messages.mo +0 -0
  351. invenio_app_rdm/translations/el/LC_MESSAGES/messages.po +916 -287
  352. invenio_app_rdm/translations/es/LC_MESSAGES/messages.mo +0 -0
  353. invenio_app_rdm/translations/es/LC_MESSAGES/messages.po +964 -372
  354. invenio_app_rdm/translations/et/LC_MESSAGES/messages.mo +0 -0
  355. invenio_app_rdm/translations/et/LC_MESSAGES/messages.po +939 -363
  356. invenio_app_rdm/translations/fa/LC_MESSAGES/messages.mo +0 -0
  357. invenio_app_rdm/translations/fa/LC_MESSAGES/messages.po +907 -278
  358. invenio_app_rdm/translations/fr/LC_MESSAGES/messages.mo +0 -0
  359. invenio_app_rdm/translations/fr/LC_MESSAGES/messages.po +1033 -376
  360. invenio_app_rdm/translations/hr/LC_MESSAGES/messages.mo +0 -0
  361. invenio_app_rdm/translations/hr/LC_MESSAGES/messages.po +908 -279
  362. invenio_app_rdm/translations/hu/LC_MESSAGES/messages.mo +0 -0
  363. invenio_app_rdm/translations/hu/LC_MESSAGES/messages.po +989 -372
  364. invenio_app_rdm/translations/it/LC_MESSAGES/messages.mo +0 -0
  365. invenio_app_rdm/translations/it/LC_MESSAGES/messages.po +970 -337
  366. invenio_app_rdm/translations/ja/LC_MESSAGES/messages.mo +0 -0
  367. invenio_app_rdm/translations/ja/LC_MESSAGES/messages.po +908 -279
  368. invenio_app_rdm/translations/ka/LC_MESSAGES/messages.mo +0 -0
  369. invenio_app_rdm/translations/ka/LC_MESSAGES/messages.po +910 -281
  370. invenio_app_rdm/translations/ko/LC_MESSAGES/messages.mo +0 -0
  371. invenio_app_rdm/translations/ko/LC_MESSAGES/messages.po +1361 -0
  372. invenio_app_rdm/translations/lt/LC_MESSAGES/messages.mo +0 -0
  373. invenio_app_rdm/translations/lt/LC_MESSAGES/messages.po +911 -282
  374. invenio_app_rdm/translations/messages.pot +982 -289
  375. invenio_app_rdm/translations/no/LC_MESSAGES/messages.mo +0 -0
  376. invenio_app_rdm/translations/no/LC_MESSAGES/messages.po +908 -279
  377. invenio_app_rdm/translations/pl/LC_MESSAGES/messages.mo +0 -0
  378. invenio_app_rdm/translations/pl/LC_MESSAGES/messages.po +908 -279
  379. invenio_app_rdm/translations/pt/LC_MESSAGES/messages.mo +0 -0
  380. invenio_app_rdm/translations/pt/LC_MESSAGES/messages.po +907 -278
  381. invenio_app_rdm/translations/ro/LC_MESSAGES/messages.mo +0 -0
  382. invenio_app_rdm/translations/ro/LC_MESSAGES/messages.po +1041 -382
  383. invenio_app_rdm/translations/ru/LC_MESSAGES/messages.mo +0 -0
  384. invenio_app_rdm/translations/ru/LC_MESSAGES/messages.po +1023 -371
  385. invenio_app_rdm/translations/sk/LC_MESSAGES/messages.mo +0 -0
  386. invenio_app_rdm/translations/sk/LC_MESSAGES/messages.po +917 -288
  387. invenio_app_rdm/translations/sv/LC_MESSAGES/messages.mo +0 -0
  388. invenio_app_rdm/translations/sv/LC_MESSAGES/messages.po +1007 -398
  389. invenio_app_rdm/translations/tr/LC_MESSAGES/messages.mo +0 -0
  390. invenio_app_rdm/translations/tr/LC_MESSAGES/messages.po +993 -342
  391. invenio_app_rdm/translations/uk/LC_MESSAGES/messages.mo +0 -0
  392. invenio_app_rdm/translations/uk/LC_MESSAGES/messages.po +984 -353
  393. invenio_app_rdm/translations/zh_CN/LC_MESSAGES/messages.mo +0 -0
  394. invenio_app_rdm/translations/zh_CN/LC_MESSAGES/messages.po +940 -348
  395. invenio_app_rdm/translations/zh_TW/LC_MESSAGES/messages.mo +0 -0
  396. invenio_app_rdm/translations/zh_TW/LC_MESSAGES/messages.po +908 -279
  397. invenio_app_rdm/upgrade_scripts/fix_migrated_records_from_8_0_to_9_0.py +2 -2
  398. invenio_app_rdm/upgrade_scripts/migrate_10_0_to_11_0.py +1 -1
  399. invenio_app_rdm/upgrade_scripts/migrate_11_0_to_12_0.py +205 -0
  400. invenio_app_rdm/upgrade_scripts/migrate_12_0_to_13_0.py +235 -0
  401. invenio_app_rdm/upgrade_scripts/migrate_2_0_to_3_0.py +1 -1
  402. invenio_app_rdm/upgrade_scripts/migrate_4_0_to_6_0.py +2 -3
  403. invenio_app_rdm/upgrade_scripts/migrate_6_0_to_7_0.py +0 -2
  404. invenio_app_rdm/upgrade_scripts/migrate_8_0_to_9_0.py +2 -2
  405. invenio_app_rdm/upgrade_scripts/migrate_9_0_to_10_0.py +1 -1
  406. invenio_app_rdm/users/schemas.py +27 -0
  407. invenio_app_rdm/users_ui/searchapp.py +9 -1
  408. invenio_app_rdm/users_ui/templates/semantic-ui/invenio_app_rdm/users/communities.html +1 -0
  409. invenio_app_rdm/users_ui/templates/semantic-ui/invenio_app_rdm/users/header.html +23 -9
  410. invenio_app_rdm/users_ui/views/__init__.py +1 -1
  411. invenio_app_rdm/users_ui/views/dashboard.py +6 -1
  412. invenio_app_rdm/users_ui/views/ui.py +5 -28
  413. invenio_app_rdm/utils/files.py +1 -1
  414. invenio_app_rdm/views.py +21 -0
  415. invenio_app_rdm-14.0.0b1.dev8.dist-info/METADATA +552 -0
  416. invenio_app_rdm-14.0.0b1.dev8.dist-info/RECORD +505 -0
  417. {invenio_app_rdm-12.0.0.dev8.dist-info → invenio_app_rdm-14.0.0b1.dev8.dist-info}/WHEEL +1 -1
  418. invenio_app_rdm-14.0.0b1.dev8.dist-info/entry_points.txt +44 -0
  419. invenio_app_rdm/admin.py +0 -36
  420. invenio_app_rdm/stats/__init__.py +0 -24
  421. invenio_app_rdm/stats/event_builders.py +0 -112
  422. invenio_app_rdm/stats/permissions.py +0 -33
  423. invenio_app_rdm/stats/templates/aggregations/__init__.py +0 -10
  424. invenio_app_rdm/stats/templates/aggregations/aggr_file_download/__init__.py +0 -10
  425. invenio_app_rdm/stats/templates/aggregations/aggr_file_download/os-v1/__init__.py +0 -10
  426. invenio_app_rdm/stats/templates/aggregations/aggr_file_download/os-v1/aggr-file-download-v1.0.0.json +0 -69
  427. invenio_app_rdm/stats/templates/aggregations/aggr_file_download/os-v2/__init__.py +0 -10
  428. invenio_app_rdm/stats/templates/aggregations/aggr_file_download/os-v2/aggr-file-download-v1.0.0.json +0 -69
  429. invenio_app_rdm/stats/templates/aggregations/aggr_file_download/v7/__init__.py +0 -10
  430. invenio_app_rdm/stats/templates/aggregations/aggr_file_download/v7/aggr-file-download-v1.0.0.json +0 -69
  431. invenio_app_rdm/stats/templates/aggregations/aggr_record_view/__init__.py +0 -10
  432. invenio_app_rdm/stats/templates/aggregations/aggr_record_view/os-v1/__init__.py +0 -10
  433. invenio_app_rdm/stats/templates/aggregations/aggr_record_view/os-v1/aggr-record-view-v1.0.0.json +0 -46
  434. invenio_app_rdm/stats/templates/aggregations/aggr_record_view/os-v2/__init__.py +0 -10
  435. invenio_app_rdm/stats/templates/aggregations/aggr_record_view/os-v2/aggr-record-view-v1.0.0.json +0 -46
  436. invenio_app_rdm/stats/templates/aggregations/aggr_record_view/v7/aggr-record-view-v1.0.0.json +0 -46
  437. invenio_app_rdm/stats/templates/events/__init__.py +0 -10
  438. invenio_app_rdm/stats/templates/events/file_download/__init__.py +0 -10
  439. invenio_app_rdm/stats/templates/events/file_download/os-v1/__init__.py +0 -10
  440. invenio_app_rdm/stats/templates/events/file_download/os-v1/file-download-v1.0.0.json +0 -93
  441. invenio_app_rdm/stats/templates/events/file_download/os-v2/__init__.py +0 -10
  442. invenio_app_rdm/stats/templates/events/file_download/os-v2/file-download-v1.0.0.json +0 -93
  443. invenio_app_rdm/stats/templates/events/file_download/v7/file-download-v1.0.0.json +0 -93
  444. invenio_app_rdm/stats/templates/events/record_view/os-v1/__init__.py +0 -10
  445. invenio_app_rdm/stats/templates/events/record_view/os-v1/record-view-v1.0.0.json +0 -70
  446. invenio_app_rdm/stats/templates/events/record_view/os-v2/__init__.py +0 -10
  447. invenio_app_rdm/stats/templates/events/record_view/os-v2/record-view-v1.0.0.json +0 -70
  448. invenio_app_rdm/stats/templates/events/record_view/v7/record-view-v1.0.0.json +0 -70
  449. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ShareModal.js +0 -262
  450. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/user_dashboard/requests_items/ComputerTabletRequestsItem.js +0 -74
  451. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/user_dashboard/requests_items/MobileRequestsItem.js +0 -70
  452. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/i18next-scanner.config.js +0 -64
  453. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/af/messages.po +0 -272
  454. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/af/translations.json +0 -87
  455. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/et_EE/messages.po +0 -272
  456. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/et_EE/translations.json +0 -87
  457. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/gl/messages.po +0 -272
  458. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/gl/translations.json +0 -87
  459. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/rw/messages.po +0 -272
  460. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/rw/translations.json +0 -87
  461. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/package-lock.json +0 -1512
  462. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/scripts/compileCatalog.js +0 -40
  463. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/scripts/initCatalog.js +0 -20
  464. invenio_app_rdm/theme/static/robots.txt +0 -5
  465. invenio_app_rdm/translations/af/LC_MESSAGES/messages.mo +0 -0
  466. invenio_app_rdm/translations/af/LC_MESSAGES/messages.po +0 -728
  467. invenio_app_rdm/translations/et_EE/LC_MESSAGES/messages.mo +0 -0
  468. invenio_app_rdm/translations/et_EE/LC_MESSAGES/messages.po +0 -728
  469. invenio_app_rdm/translations/gl/LC_MESSAGES/messages.mo +0 -0
  470. invenio_app_rdm/translations/gl/LC_MESSAGES/messages.po +0 -728
  471. invenio_app_rdm/translations/rw/LC_MESSAGES/messages.mo +0 -0
  472. invenio_app_rdm/translations/rw/LC_MESSAGES/messages.po +0 -728
  473. invenio_app_rdm-12.0.0.dev8.dist-info/AUTHORS.rst +0 -11
  474. invenio_app_rdm-12.0.0.dev8.dist-info/METADATA +0 -103
  475. invenio_app_rdm-12.0.0.dev8.dist-info/RECORD +0 -402
  476. invenio_app_rdm-12.0.0.dev8.dist-info/entry_points.txt +0 -26
  477. /invenio_app_rdm/{translations/.gitkeep → theme/assets/semantic-ui/js/invenio_app_rdm/administration/userModeration/search/UserModerationBulkActions.js} +0 -0
  478. {invenio_app_rdm-12.0.0.dev8.dist-info → invenio_app_rdm-14.0.0b1.dev8.dist-info/licenses}/LICENSE +0 -0
  479. {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-2021 CERN.
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 flask import current_app, g, render_template
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 set_default_value
31
- from .decorators import pass_draft, pass_draft_community, pass_draft_files
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": _("Discard the reserved {scheme_label}.").format(
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": _("Get a {scheme_label} now!").format(
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 {scheme_label} by pressing the button "
124
+ "Reserve a %(scheme_label)s by pressing the button "
68
125
  "(so it can be included in files prior to upload). "
69
- "The {scheme_label} is registered when your upload is published."
70
- ).format(scheme_label=scheme_label),
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 {scheme_label} allows your upload to be easily and "
73
- "unambiguously cited. Example: 10.1234/foo.bar"
74
- ).format(scheme_label=scheme_label),
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, fields=["id", "title"], type=vocabulary_type
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("id"))
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 identifier_schemes(self):
234
- """Dump identifiers scheme (fake) vocabulary.
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("RDM_RECORDS_IDENTIFIERS_SCHEMES", {})
299
+ for scheme in current_app.config.get(config_key, {})
241
300
  ]
242
301
 
243
- def identifiers(self):
244
- """Dump related identifiers vocabulary."""
245
- self._vocabularies["identifiers"] = {
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.identifier_schemes(),
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=conf.get("APP_RDM_DEPOSIT_FORM_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=load_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": True}
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
- record["pids"] = {"doi": {"provider": "external", "identifier": ""}}
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
- return render_template(
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
- forms_config=get_form_config(createUrl="/api/records"),
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=community,
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
- @login_required
528
+ @secret_link_or_login_required()
376
529
  @pass_draft(expand=True)
377
530
  @pass_draft_files
378
- def deposit_edit(pid_value, draft=None, draft_files=None):
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
- return render_template(
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
- forms_config=get_form_config(apiUrl=f"/api/records/{pid_value}/draft"),
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-2020 CERN.
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 invenio_app_rdm.records_ui.previewer.iiif_simple import (
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
- scheme_to_label = current_app.config.get("RDM_RECORDS_IDENTIFIERS_SCHEMES", {})
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 scheme_to_label.get(scheme, {}).get("label", scheme)
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