{# # This file is part of Zenodo. # Copyright (C) 2016, 2017 CERN. # # Zenodo is free software; you can redistribute it # and/or modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later version. # # Zenodo is distributed in the hope that it will be # useful, but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Zenodo; if not, write to the # Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, # MA 02111-1307, USA. # # In applying this license, CERN does not # waive the privileges and immunities granted to it by virtue of its status # as an Intergovernmental Organization or submit itself to any jurisdiction. -#} {%- extends "invenio_deposit/edit.html" %} {%- block javascript %} {% assets "zenodo_deposit_js" %}{% endassets %} {% assets "zenodo_theme_js" %}{% endassets %} {%- endblock javascript %} {%- set is_published = record.is_published and record.is_published() %} {%- set pid_versioning = (record.conceptrecid|pid_from_value|to_versioning_api(child=False)) if record.conceptrecid else None %} {%- set is_local_doi = "doi" in record and (record.doi|doi_locally_managed) %} {%- set has_conceptdoi = "conceptdoi" in record %} {%- set new_version_depid = pid_versioning and pid_versioning.draft_child_deposit %} {%- set has_new_version_deposit = new_version_depid and (pid_versioning.children.all()|length > 0) %} {%- set is_new_version = has_new_version_deposit and new_version_depid == pid %} {%- set has_versioning_permissions = is_published and (current_user|has_record_perm(record, 'newversion')) %} {%- set deposit_template_params = { 'messages': config.DEPOSIT_UI_RESPONSE_MESSAGES, 'is_published': is_published or False, 'is_local_doi': is_local_doi or False, 'has_conceptdoi': has_conceptdoi or False, 'is_new_version': is_new_version or False, 'has_versioning_permissions': has_versioning_permissions or False, 'has_new_version_deposit': has_new_version_deposit or False, 'newversionmodal_template': url_for('static', filename='templates/zenodo_deposit/neweversionmodal.html'), 'upgradeversioningmodal_template': url_for('static', filename='templates/zenodo_deposit/upgradeversioningmodal.html') } %} {# Show banner alert if there's a new verion draft #} {%- if pid_versioning and pid_versioning.exists and pid_versioning.draft_child_deposit and pid_versioning.draft_child_deposit != pid %} {%- set draft_deposit_url = url_for('invenio_deposit_ui.depid', pid_value=pid_versioning.draft_child_deposit.pid_value) %} {%- set draft_deposit_msg %} There is a new version of the upload being edited here. {%- endset %} {%- set banner_messages = banner_messages|d([]) + [('warning', draft_deposit_msg|safe)] %} {%- endif %} {%- block page_body %}
{%- if is_published %}

Edit upload

{%- elif is_new_version %}

New version

{%- else %}

New upload

{%- endif %} {%- if community %}

{{community.title}}

{%- endif %}

Instructions: (i) Upload minimum one file or fill-in required fields (marked with a red star ). (ii) Press "Save" to save your upload for editing later. (iii) When ready, press "Publish" to finalize and make your upload public.

{%- endblock %}