{# 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 = namespace(value=false) %} {% set hasContent.value = record_ui["ui"]["additional_titles"] or metadata.identifiers or record_ui["ui"]["related_identifiers"] or metadata.funding or record_ui["ui"]["dates"] or metadata.references %} {# Check if custom field has values if no other content #} {% if record_ui["ui"]["custom_fields"] and not hasContent.value %} {% for section_cfg in custom_fields_ui %} {% for field_cfg in section_cfg.fields %} {% if record_ui["custom_fields"].get(field_cfg.field) %} {% set hasContent.value = true %} {% endif %} {% endfor %} {% endfor %} {% endif %} {% set rights = record_ui["ui"].get('rights') %} {% set funding = record_ui["ui"].get('funding') %} {% if hasContent.value %}