Skip to content

Commit 9b1f18d

Browse files
authored
Enable curations UI on deposit form by including invenio-curations-deposit.js bundle (#58)
1 parent 1cde1ff commit 9b1f18d

2 files changed

Lines changed: 64 additions & 0 deletions

File tree

Dockerfile.mug

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ COPY ./static/ ${INVENIO_INSTANCE_PATH}/static/
1414
COPY ./translations ${INVENIO_INSTANCE_PATH}/translations/
1515
COPY ./templates ${INVENIO_INSTANCE_PATH}/templates/
1616

17+
COPY themes/MUG/templates/ ${INVENIO_INSTANCE_PATH}/templates/
18+
1719
# Replace variables.less
1820
COPY themes/MUG/variables.less /opt/env/lib/python3.12/site-packages/invenio_override/assets/semantic-ui/less/invenio_override/variables.less
1921
COPY themes/MUG/overrides.less /opt/env/lib/python3.12/site-packages/invenio_override/assets/semantic-ui/less/invenio_override/overrides.less
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{%- extends config.BASE_TEMPLATE %}
2+
3+
{%- if community and community.theme and community.theme.enabled %}
4+
{%- block css %}
5+
{{ super() }}
6+
<link rel="stylesheet" type="text/css" href="/communities/{{community.slug}}/community-theme-{{ community.revision_id }}.css">
7+
{%- endblock %}
8+
{%- endif %}
9+
10+
{%- if not record.is_published and record.versions.index and record.versions.index > 1 %}
11+
{%- set title = _("New version") %}
12+
{%- elif not record.is_published %}
13+
{%- set title = _("New upload") %}
14+
{% else %}
15+
{%- set title = _("Edit upload") %}
16+
{%- endif %}
17+
18+
{%- block page_body %}
19+
20+
{%- if community_use_jinja_header %}
21+
{%- include "invenio_communities/details/header.html" %}
22+
{%- endif %}
23+
24+
{%- if record %}
25+
<input id="deposits-record" type="hidden" name="deposits-record"
26+
value='{{ record | tojson }}'>
27+
28+
<input id="deposits-record-locked-files" type="hidden"
29+
name="deposits-record-locked-files"
30+
value='{{ files_locked | tojson }}'>
31+
{%- endif %}
32+
33+
{%- if preselectedCommunity %}
34+
<input id="deposits-draft-community" type="hidden" name="deposits-draft-community"
35+
value='{{ preselectedCommunity | tojson }}'>
36+
{%- endif %}
37+
38+
{%- if files %}
39+
<input id="deposits-record-files" type="hidden" name="deposits-record-files"
40+
value='{{ files | tojson }}'>
41+
{%- endif %}
42+
43+
{%- if forms_config %}
44+
<input type="hidden" name="deposits-config"
45+
value='{{ forms_config | tojson }}'>
46+
{%- endif %}
47+
48+
{%- if permissions %}
49+
<input id="deposits-record-permissions" type="hidden"
50+
name="deposits-record-permissions"
51+
value='{{ permissions | tojson }}'>
52+
{%- endif %}
53+
54+
<div id="deposit-form"></div>
55+
56+
{%- endblock page_body %}
57+
58+
{%- block javascript %}
59+
{{ super() }}
60+
{{ webpack['invenio-app-rdm-deposit.js'] }}
61+
{{ webpack['invenio-curations-deposit.js'] }}
62+
{%- endblock %}

0 commit comments

Comments
 (0)