From 327147e266b788108c1d59f8dc8007bea44bef8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl-Ulrich=20Kr=C3=A4gelin?= Date: Wed, 13 Nov 2024 15:18:20 +0100 Subject: [PATCH 1/4] records/macros/detail.html: Allow funding entry with award number only --- .../records/macros/detail.html | 26 ++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) 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 fd36855a1..972a82b07 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 @@ -98,7 +98,8 @@

{{ add_description.type.title_l10n }} + +
{% if item.award.acronym %} {{ item.award.acronym }} – @@ -122,6 +123,29 @@

{{ add_description.type.title_l10n }} + {%- else -%} +
+ + {% if item.award.acronym %} + {{ item.award.acronym }} – + {% endif %} + + + {%- if item.award.number -%} + + {{ item.award.number }} + + {%- endif -%} + + {%- if item.award.identifiers -%} + {% for identifier in item.award.identifiers if 'url' == identifier.scheme %} + + + + {%- endfor -%} + {%- endif -%} +
{%- endif -%}
{{ item.funder.name if item.funder }}
{%- else -%} From b503c108390c9e326e7047a15d40f80d12ab8b1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl=20Kr=C3=A4gelin?= <8436596+karkraeg@users.noreply.github.com> Date: Mon, 18 Nov 2024 13:13:44 +0100 Subject: [PATCH 2/4] records/macros/detail.html: Simplify _show_funding_item macro --- .../records/macros/detail.html | 75 ++++++------------- 1 file changed, 24 insertions(+), 51 deletions(-) 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 972a82b07..697ca11c5 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 @@ -96,64 +96,37 @@

{{ add_description.type.title_l10n }} {{ item.funder.name if item.funder }}

{%- if item.award -%} - {%- if item.award.title_l10n -%} - -
- - {% if item.award.acronym %} - {{ item.award.acronym }} – - {% endif %} - - {{ item.award.title_l10n }} - - - {%- if item.award.number -%} - - {{ item.award.number }} - - {%- endif -%} +
+ + {% if item.award.acronym %} + {{ item.award.acronym }} – + {% endif %} + + {%- if item.award.title_l10n -%} + {{ item.award.title_l10n }} + {%- endif -%} + - {%- if item.award.identifiers -%} - {% for identifier in item.award.identifiers if 'url' == identifier.scheme %} - - - - {%- endfor -%} - {%- endif -%} -
- {%- else -%} -
- - {% if item.award.acronym %} - {{ item.award.acronym }} – - {% endif %} + {%- if item.award.number -%} + + {{ item.award.number }} + {%- endif -%} - {%- if item.award.number -%} - - {{ item.award.number }} - - {%- endif -%} - - {%- if item.award.identifiers -%} - {% for identifier in item.award.identifiers if 'url' == identifier.scheme %} - - - - {%- endfor -%} - {%- endif -%} -
+ {%- if item.award.identifiers -%} + {% for identifier in item.award.identifiers if 'url' == identifier.scheme %} + + + + {%- endfor -%} {%- endif -%} -
{{ item.funder.name if item.funder }}
- {%- else -%} -
{{ item.funder.name if item.funder }}
- {%- endif -%} + +{%- endif -%} {% endmacro %} - {% macro show_references(references) %}
    {% for reference in references %} From 32bc035f4750a3ef151096158b07fe01c76539c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl=20Kr=C3=A4gelin?= <8436596+karkraeg@users.noreply.github.com> Date: Tue, 19 Nov 2024 10:45:08 +0100 Subject: [PATCH 3/4] Update detail.html: different styles for funder, number and title --- .../semantic-ui/invenio_app_rdm/records/macros/detail.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 697ca11c5..1a07a43c1 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 @@ -99,7 +99,7 @@

    {{ add_description.type.title_l10n }} {{ item.funder.name if item.funder }} {%- if item.award -%}
    - + {% if item.award.acronym %} {{ item.award.acronym }} – {% endif %} @@ -110,7 +110,7 @@

    {{ add_description.type.title_l10n }} {%- if item.award.number -%} - + {{ item.award.number }} {%- endif -%} From bf817a321249ca53ac9a37ef8f6308b1aac79fe8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl=20Kr=C3=A4gelin?= <8436596+karkraeg@users.noreply.github.com> Date: Mon, 6 Jan 2025 14:39:25 +0100 Subject: [PATCH 4/4] Update invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/macros/detail.html Co-authored-by: Tom Morrell --- .../semantic-ui/invenio_app_rdm/records/macros/detail.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 1a07a43c1..fbcb8cf6a 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 @@ -110,7 +110,7 @@

    {{ add_description.type.title_l10n }} {%- if item.award.number -%} - + {{ item.award.number }} {%- endif -%}