{# -*- coding: utf-8 -*- Copyright (C) 2020 - 2024 CERN. Copyright (C) 2020 - 2021 Northwestern University. Copyright (C) 2021 Graz University of Technology. Copyright (C) 2021 - 2022 New York University. Copyright (C) 2021 - 2024 TU Wien. Invenio RDM Records is free software; you can redistribute it and/or modify it under the terms of the MIT License; see LICENSE file for more details. #} {#- base: invenio-app-rdm v12.0.0rc2 #} {#- changes: schema.org json-ld in header, removed inline style #} {%- if use_theme_basic_template|default(true) -%} {%- extends config.BASE_TEMPLATE %} {%- block css %} {{ super() }} {% if community and community.theme and community.theme.enabled %} {% endif %} {%- endblock css %} {%- endif -%} {%- from "invenio_app_rdm/records/macros/files.html" import file_list_box, preview_file_box, media_file_list_box %} {%- set title = record.metadata.title -%} {%- set metadata = record.metadata -%} {%- set can_manage_record = permissions is defined and (permissions.can_edit or permissions.can_review) %} {#- preview_submission_request is set to true when coming from a community submission request #} {%- set is_preview_submission_request = preview_submission_request or false %} {%- set show_record_management_menu = can_manage_record and (not is_preview or is_preview_submission_request) %} {#- change: added this block for google datasets #} {%- block tuw_metadata -%} {#- this is where the schema.org metadata (as fetched from datacite) is inserted, for google datasets #} {%- set schemaorg_metadata = tuw_create_schemaorg_metadata(record) %} {%- if schemaorg_metadata %} {%- endif %} {%- endblock tuw_metadata %} {%- if record.parent.access.settings %} {%- set allow_user_requests = not current_user.is_anonymous and record.parent.access.settings.allow_user_requests %} {%- set allow_guest_requests = current_user.is_anonymous and record.parent.access.settings.allow_guest_requests %} {%- endif %} {%- block head_meta %} {% if use_theme_basic_template|default(true) %} {{ super() }} {% endif %} {%- include "invenio_app_rdm/records/details/meta.html" %} {%- endblock head_meta %} {%- block page_body -%}
{#- COMMUNITY HEADER: hide it when displaying the submission request #} {% if not is_preview_submission_request %} {% if community %} {% set is_community_restricted = community.access.visibility == 'restricted' %} {% if community.theme and community.theme.enabled %} {% include "invenio_communities/details/header.html" %} {% else %}
{{ community.metadata.title }} {% if is_community_restricted %} {{ _("Restricted") }} {% endif %}
{% endif %} {% endif %} {% endif %} {#- /COMMUNITY HEADER #} {#- PREVIEW HEADER #} {%- if is_preview %}
{{ _("Preview") }}

{%- if not is_draft %} {{ _("You are previewing a published record.") }} {%- elif record.is_published %} {{ _("You are previewing changes that have not yet been published.") }} {%- elif not record.is_published and record.versions.index == 1 %} {{ _("You are previewing a new record that has not yet been published.") }} {%- elif not record.is_published and record.versions.index > 1 %} {{ _("You are previewing a new record version that has not yet been published.") }} {%- endif %}

{%- endif %} {#- /PREVIEW HEADER #} {%- if record.is_published and record.links.latest_html and not record.versions.is_latest %}

{% trans link_start=('')|safe, link_end=''|safe %} There is a {{ link_start }}newer version{{ link_end }} of the record available. {% endtrans %}

{%- endif %}
{#- Main content #}
{%- if record.access.record == 'restricted' %}
{{ record.ui.access_status.title_l10n }} {{ record.ui.access_status.description_l10n }} {%- if record.access.embargo.reason %}

{{ _("Reason") }}: {{ record.access.embargo.reason }}

{%- endif %}
{%- endif %} {%- block record_body -%} {%- block record_header -%} {%- block record_header_button -%} {%- if is_preview and not is_preview_submission_request and can_manage_record and is_draft %} {%- endif %} {%- endblock record_header_button -%} {% if show_record_management_menu %}
{% endif %}
{{ _('Published') }} {{ record.ui.publication_date_l10n_long }} | {{ _('Version {version_number}').format(version_number=record.ui.version) }}
{% if record.ui.resource_type %} {{ record.ui.resource_type.title_l10n }} {% endif %} {% if record.ui.access_status.icon %} {% endif %} {{ record.ui.access_status.title_l10n }}
{%- endblock record_header %} {#- Title #} {%- block record_title -%}

{{ metadata.title }}

{% if record.ui.creators or record.ui.contributors %}
{%- include "invenio_app_rdm/records/details/creatibutors.html" %}
{% endif %}
{%- endblock record_title %} {#- Description #} {%- block record_content -%} {%- include "invenio_app_rdm/records/details/description.html" %} {%- endblock record_content %} {# Files #} {%- block record_files -%} {# record has files BUT passed files are empty. This happens when we display are request. #} {%- if record.files.enabled -%}
{%- if permissions.can_read_files -%} {# record has files AND user can see files #} {%- set files = files | order_entries | selectattr("status", "==", "completed") | list %} {%- if files|length > 0 -%}

{{ _('Files') }}

{%- if files|has_previewable_files -%} {%-set preview_file = files|select_preview_file(default_preview=record.files.default_preview) %} {{ preview_file_box(preview_file, record.id, is_preview, record, include_deleted) }} {%- endif -%} {{ file_list_box(files, record.id, is_preview, include_deleted, record) }} {% endif %} {% else %} {# record has files BUT user does not have permission to see files #}

{{ _("Files") }}

{{ record.ui.access_status.title_l10n }}

{{ record.ui.access_status.description_l10n }}

{% if record.access.embargo.reason %}

{{ _("Reason") }}: {{ record.access.embargo.reason }}

{% endif %} {% block record_files_access_request %} {%- if allow_user_requests or allow_guest_requests %}

{{ _("Request access") }}

{{ _("If you would like to request access to these files, please fill out the form below.") }}

{%- if record.parent.access.settings %} {%- set accept_conditions_text = record.parent.access.settings.accept_conditions_text %} {%- endif %} {%- if accept_conditions_text %}

{{ _("You need to satisfy these conditions in order for this request to be accepted:") }}

{{ accept_conditions_text | safe }}
{%- endif %} {%- include "invenio_app_rdm/records/details/access-form.html" %} {%- endif %} {% endblock record_files_access_request %}
{%- endif %}
{%- endif %} {%- endblock record_files -%} {# Media files #} {%- block record_media_files -%} {# record has media files AND user can see files #} {# can_media_read_files is false when record is fully restricted and users can't see the landing page at all #} {%- if media_files and media_files.enabled and media_files.entries and permissions.can_media_read_files -%} {%- set any_visible = media_files.entries | selectattr('access.hidden', 'equalto', false) | list | length > 0 %} {%- if any_visible %}
{%- set media_files = media_files | order_entries | selectattr("status", "==", "completed") | list %} {%- if media_files|length > 0 -%} {{ media_file_list_box(media_files, record.id, is_preview, include_deleted, record) }} {%- endif %}
{%- endif %} {%- endif %} {%- endblock record_media_files -%} {#- Additional details #} {%- block record_details -%}
{%- include "invenio_app_rdm/records/details/details.html" %}
{%- endblock record_details -%} {#- Record footer #} {%- block record_footer -%} {%- endblock record_footer -%} {%- endblock record_body -%}
{#- Sidebar #}
{# Jump up button #} {%- block jump -%}
{%- endblock jump -%}
{%- endblock page_body -%} {%- block javascript %} {% if config.THEME_MATHJAX_CDN %} {% endif %} {%- if use_theme_basic_template|default(true) %} {{ super() }} {%- else %} {% include config.THEME_JAVASCRIPT_TEMPLATE %} {%- endif %} {%- block record_jsonld %} {% set jsonld_serialization = record | transform_record('SchemaorgJSONLDSerializer', throws=False) %} {%- if jsonld_serialization %} {%- endif %} {%- endblock record_jsonld %} {{ webpack['invenio-app-rdm-landing-page-theme.js'] }} {{ webpack['invenio-app-rdm-landing-page.js'] }} {{ webpack['previewer_theme.js'] }} {%- endblock javascript -%}