|
| 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