diff --git a/invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/macros/detail.html b/invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/macros/detail.html index 7789a358d..ca8b4221e 100644 --- a/invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/macros/detail.html +++ b/invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/macros/detail.html @@ -61,8 +61,8 @@ {% macro show_add_descriptions(add_descriptions) %} {% for add_description in add_descriptions %}
-

{{ add_description.type.title_l10n if add_description.type is defined else _('Missing Additional description type!') }} + aria-label="{{ _(add_description.type.title_l10n) if add_description.type is defined else _('Missing description type!') }}">

+

{{ add_description.type.title_l10n if add_description.type is defined else _('Missing description type!') }} {{ '(' + add_description.lang.title_l10n + ')' if add_description.lang is defined else '' }} @@ -82,7 +82,7 @@

{{ add_description.type.title_l10n if add_description.type is defined else _ {% macro show_dates(dates) %} {% for date in dates %} -
{{ date.type.title_l10n }}
+
{{ date.type.title_l10n if date.type is defined else _('Unknown date type') }}
{{ date.date }}
{{ date.description }}
@@ -160,16 +160,19 @@

{{ add_description.type.title_l10n if add_description.type is defined else _ {{ identifier.resource_type.title_l10n }}: {% endif %} - {% set url = identifier.identifier|pid_url %} + {% set ident_val = identifier.identifier if identifier.identifier is defined else '' %} + {% set url = ident_val|pid_url %} {% if url %} - {{ identifier.identifier }} + {{ ident_val }} {% else %} - {{ identifier.identifier }} + {{ ident_val }} {% endif %} - {{ ' (' + identifier.scheme | get_scheme_label + ')' }} + {% if identifier.scheme is defined %} + {{ ' (' ~ (identifier.scheme|get_scheme_label) ~ ')' }} + {% endif %}

{% endfor %} {% endmacro %} @@ -177,7 +180,7 @@

{{ add_description.type.title_l10n if add_description.type is defined else _ {% macro show_related_identifiers(related_identifiers) %}
- {%- for group in related_identifiers | groupby('relation_type.title_l10n') %} + {%- for group in (related_identifiers|selectattr("relation_type","defined")|list) | groupby('relation_type.title_l10n') %}
{{ group.grouper }}
{{ _identifiers_for_group(group.list) }} {%- endfor %}