Skip to content

Commit

Permalink
communities-ui: make verified icon display depend on parent community
Browse files Browse the repository at this point in the history
  • Loading branch information
slint committed Oct 18, 2024
1 parent be124c9 commit fc64133
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export const CommunityCompactItemComputer = ({
aria-label={`${metadata.title} (${i18next.t("opens in new tab")})`}
>
{metadata.title}{" "}
{result.is_verified && (
{result.parent?.is_verified && (
<p className="ml-5 display-inline-block">
<Popup
content="Verified community"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export const CommunityCompactItemMobile = ({
aria-label={`${metadata.title} (${i18next.t("opens in new tab")})`}
>
{metadata.title}{" "}
{result.is_verified && (
{result.parent?.is_verified && (
<p className="ml-5 display-inline-block">
<Popup
content="Verified community"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const CommunityItemComputer = ({ result }) => {
)}
<Header as="a" className="ui medium header" href={result.links.self_html}>
{result.metadata.title}
{result.is_verified && (
{result.parent?.is_verified && (
<p className="ml-5 display-inline-block">
<Popup
content="Verified community"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const CommunityItemMobile = ({ result, index }) => {
<div>
<Header as="a" className="ui medium header" href={result.links.self_html}>
{result.metadata.title}
{result.is_verified && (
{result.parent?.is_verified && (
<p className="ml-5 display-inline-block">
<Popup
content="Verified community"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<a href="{{ url_for('invenio_app_rdm_communities.communities_detail', pid_value=community.slug) }}" class="ui small header">
{{ community.metadata.title }}
</a>
{% if community.is_verified %}
{% if community.parent and community.parent.is_verified %}
<p class="ml-2 mb-0 display-inline-block">
<i class="green check circle outline icon"></i>
</p>
Expand All @@ -53,7 +53,7 @@
/>
</div>

<div class="mobile only">
<div class="mobile only">
{{community_title(community)}}
</div>
</div>
Expand All @@ -73,9 +73,9 @@
<div class="mobile only rel-mb-1">
{{ access_status_label() }}
</div>
{% endif %}
{% endif %}
{% if community.parent %}
<div class="inline-computer mt-5 rel-mr-1">
<div class="inline-computer mt-5 rel-mr-1">
<span class="ui tiny header">Part of </span>
<a
href="{{ url_for('invenio_app_rdm_communities.communities_home', pid_value=community.parent.slug) }}">
Expand Down

0 comments on commit fc64133

Please sign in to comment.