Skip to content

Commit

Permalink
frontpage: display verified community logo
Browse files Browse the repository at this point in the history
* closes #716
  • Loading branch information
anikachurilova committed Feb 19, 2024
1 parent 53374ee commit 874de2b
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions templates/semantic-ui/zenodo_rdm/macros/record_item.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,21 @@
<i class="icon {{ access_status_icon }}" aria-hidden="true"></i>
{{ access_status }}
</div>
</div>

{% 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 %}
<div class="ui mini image right-floated">
<img src="/api/communities/{{ branded_community_id }}/logo" />
</div>
<i class="ui icon green check circle right-floated" aria-hidden="true"></i>
{% endif %}
{% endfor %}
{% endif %}
</div>

{# Title #}
<div class="header theme-primary-text">
Expand All @@ -71,7 +85,9 @@
{# Communities list #}
<h5>
{% set communities_entries = record.parent.communities.entries %}
<b>{{ _("Part of:")}} {{ communities_list(communities=communities_entries) }}</b>
{% if communities_entries %}
<b>{{ _("Part of:")}} {{ communities_list(communities=communities_entries) }}</b>
{% endif %}
</h5>

<div class="extra">
Expand Down

0 comments on commit 874de2b

Please sign in to comment.