Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion assets/js/invenio_app_rdm/overridableRegistry/mapping.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,10 @@
* Add here all the overridden components of your app.
*/

export const overriddenComponents = {}
import { DepositBox } from "@js/invenio_curations/deposit/DepositBox";
import { curationComponentOverrides } from "@js/invenio_curations/requests";

export const overriddenComponents = {
...curationComponentOverrides,
"InvenioAppRdm.Deposit.CardDepositStatusBox.container": DepositBox,
};
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@ dependencies = [
"uwsgi >=2.0",
"uwsgitop >=0.11",
"uwsgi-tools >=1.1.1",
"invenio-curations==0.4.0",
"invenio-global-search>=0.3.0",
"invenio-override ~=0.0.6",
]

[tool.setuptools]
py-modules = []

[tool.uv.sources]
invenio-override = { git = "https://github.com/sharedRDM/invenio-override", branch = "main" }
invenio-curations = { git = "https://github.com/tu-graz-library/invenio-curations", branch = "main"}
70 changes: 70 additions & 0 deletions templates/comment-template.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<!DOCTYPE html>
<html>
<body>
<h3> {{header}} </h3>

{% if adds|length > 0 %}
<h3>{{ _("Added") }}</h3>
<ul>
{% for add in adds %}
{% set result_items = add.diff[2] %}
{% for result in result_items %}
{% set field = result[0] %}
{% set values = result[1:] %}
{% for value in values %}
<li>
<strong>{{ field }}</strong>
<div style="margin-left: 1em;">
<span style="color: green;">New: {{ value|safe }}</span>
</div>
</li>
{% endfor %}
{% endfor %}
{% endfor %}
</ul>
{% endif %}

{% if changes|length > 0 %}
<h3>{{_("Changed")}}</h3>
<ul>
{% for change in changes %}
{% set result = change.diff[2] %}
{% set old = result[0] %}
{% set new = result[1] %}
<li>
<strong>{{ change.diff[1] }}</strong>
<div style="margin-left: 1em;">
<span style="color: red;">Old: {{ old|safe }}</span><br>
<span style="color: green;">New: {{ new|safe }}</span>
</div>
</li>
{% endfor %}
</ul>
{% endif %}

{% if removes|length > 0 %}
<h3>{{ _("Removed") }}</h3>
<ul>
{% for remove in removes %}
{% set result_items = remove.diff[2] %}
{% for result in result_items %}
{% set values = result[1:] %}
{% for value in values %}
{% if remove.diff[1] == "metadata" %}
{% set field = result[0] %}
{% else %}
{% set field = remove.diff[1] %}
{% endif %}
<li>
<strong>{{ field }}</strong>
<div style="margin-left: 1em;">
<span style="color: red;">{{ value|safe }}</span>
</div>
</li>
{% endfor %}
{% endfor %}
{% endfor %}
</ul>
{% endif %}
</body>
</html>
49 changes: 45 additions & 4 deletions themes/MUG/invenio.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@ from datetime import datetime
from invenio_i18n import lazy_gettext as _
from invenio_oauthclient.contrib.keycloak import KeycloakSettingsHelper

from invenio_app_rdm.config import NOTIFICATIONS_BUILDERS as RDM_NOTIFICATIONS_BUILDERS
from invenio_curations.config import CURATIONS_NOTIFICATIONS_BUILDERS
from invenio_curations.services import facets as curations_facets
from invenio_curations.services.components import CurationComponent
from invenio_curations.services.permissions import (
CurationRDMRecordPermissionPolicy,
CurationRDMRequestsPermissionPolicy,
)
from invenio_rdm_records.services.components import DefaultRecordsComponents

def _(x): # needed to avoid start time failure with lazy strings
return x

Expand Down Expand Up @@ -99,9 +109,9 @@ APP_DEFAULT_SECURE_HEADERS = {
# See https://github.com/inveniosoftware/invenio-app-rdm/blob/master/invenio_app_rdm/config.py
# ============================================================================
# Name used in header and UI
THEME_SITENAME = "instance"
THEME_SITENAME = "MUG Repository"
# Frontpage title
THEME_FRONTPAGE_TITLE = "instance"
THEME_FRONTPAGE_TITLE = "Medical University of Graz Repository"
# Header logo
# THEME_LOGO = 'images/invenio-rdm.svg'

Expand Down Expand Up @@ -221,6 +231,37 @@ BABEL_DEFAULT_TIMEZONE = "Europe/Vienna"
# Other supported languages (do not include BABEL_DEFAULT_LOCALE in list).
I18N_LANGUAGES = []

# ============================================================================
# Invenio-Curations
# ============================================================================
NOTIFICATIONS_BUILDERS = {
**RDM_NOTIFICATIONS_BUILDERS,
**CURATIONS_NOTIFICATIONS_BUILDERS,
}

RDM_RECORDS_SERVICE_COMPONENTS = DefaultRecordsComponents + [CurationComponent]

REQUESTS_FACETS = {
"type": {"facet": curations_facets.type, "ui": {"field": "type"}},
"status": {"facet": curations_facets.status, "ui": {"field": "status"}},
}

# Roles that are exempted from curation workflow
CURATIONS_PRIVILEGED_ROLES = [
"administration",
"bypass-curation",
"administration-rdm-records-curation",
]

RDM_PERMISSION_POLICY = CurationRDMRecordPermissionPolicy

REQUESTS_PERMISSION_POLICY = CurationRDMRequestsPermissionPolicy
# ============================================================================
# Invenio-Curations - Comment Template
# ============================================================================
CURATIONS_ENABLE_REQUEST_COMMENTS = True
CURATIONS_COMMENT_TEMPLATE_FILE = "comment-template.html"

# ============================================================================
# Extras
# ============================================================================
Expand Down Expand Up @@ -284,7 +325,7 @@ OVERRIDE_SHIBBOLETH = False
"""Set True if SAML is configured"""

#INVENIO_OVERRIDE_FRONTPAGE_RIGHT=False
OVERRIDE_FRONTPAGE_RIGHT = False
OVERRIDE_FRONTPAGE_RIGHT = True
"""Frontpage right section"""

# Right Section Configuration
Expand All @@ -300,7 +341,7 @@ OVERRIDE_RIGHT_SECTION_CONTACT_EMAIL = "rdmsupport@medunigraz.at"

# Theme and Templates
# --------------
OVERRIDE_RESOURCE_OVERVIEW = True
OVERRIDE_RESOURCE_OVERVIEW = False
"""Resource overview section"""

# ============================================================================
Expand Down
45 changes: 40 additions & 5 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.