{# Copyright (C) 2020-2021 CERN. Copyright (C) 2020-2021 Northwestern University. Copyright (C) 2021 New York University. 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. #} {%- from "invenio_app_rdm/records/macros/detail.html" import show_section_custom_fields, show_references, show_add_titles, show_alternate_identifiers, show_related_identifiers, show_funding, show_dates %} {% set hasContent = record.ui.additional_titles or metadata.identifiers or record.ui.related_identifiers or metadata.funding or record.ui.dates or metadata.references or record.custom_fields %} {% set rights = record.ui.get('rights') %} {% set funding = record.ui.get('funding') %} {% set active = true %} {% set active_cf_sections = namespace(items=[]) %} {% if hasContent %}

{{ _('Additional details') }}

{# Tabs #} {# Content #} {% set active = true %} {% if record.ui.additional_titles %} {% set active = false %} {% endif %} {% if metadata.identifiers %} {% set active = false %} {% endif %} {% if record.ui.related_identifiers %} {% set active = false %} {% endif %} {% if funding %} {% set active = false %} {% endif %} {% if record.ui.dates %} {% set active = false %} {% endif %} {% if metadata.references %} {% endif %} {% if record.custom_fields %} {# Needed to use namespace as variable assignments are cleared in the end of for loops i.e cannot set active = false #} {% set active_cf = namespace(value=active) %} {%- for section_cfg in custom_fields_ui if section_cfg.section in active_cf_sections.items %} {% set section_format = section_cfg.section | replace(" ", "-") %} {% set active_cf.value = false %} {%- endfor %} {% endif %}
{% endif %}