From 874de2b3ccf5adf0f5d5c3ac752de8904838c865 Mon Sep 17 00:00:00 2001 From: Anika Churilova Date: Mon, 19 Feb 2024 11:18:08 +0100 Subject: [PATCH] frontpage: display verified community logo * closes https://github.com/zenodo/zenodo-rdm/issues/716 --- .../zenodo_rdm/macros/record_item.html | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/templates/semantic-ui/zenodo_rdm/macros/record_item.html b/templates/semantic-ui/zenodo_rdm/macros/record_item.html index 66b85da6..0cb9aeb4 100644 --- a/templates/semantic-ui/zenodo_rdm/macros/record_item.html +++ b/templates/semantic-ui/zenodo_rdm/macros/record_item.html @@ -46,7 +46,21 @@ {{ access_status }} - + + {% set communities = record.parent.communities.entries %} + {% set branded_community_id = record.parent.communities.default %} + + {% if communities and branded_community_id %} + {% for community in communities %} + {% if community.id == branded_community_id and community.theme %} +
+ +
+ + {% endif %} + {% endfor %} + {% endif %} + {# Title #}
@@ -71,7 +85,9 @@ {# Communities list #}
{% set communities_entries = record.parent.communities.entries %} - {{ _("Part of:")}} {{ communities_list(communities=communities_entries) }} + {% if communities_entries %} + {{ _("Part of:")}} {{ communities_list(communities=communities_entries) }} + {% endif %}