Skip to content

Commit

Permalink
feat: Don't show group member count if no value for it
Browse files Browse the repository at this point in the history
On the group list and user pages, we get the member count for each group and we can display it. On the dataset groups tab, we don't have the member count for each group, so we should not display anything rather than falsely saying each group has no members.
  • Loading branch information
bellisk committed Nov 18, 2024
1 parent 06d6da8 commit a9e56b5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ckanext/switzerland/templates/group/snippets/group_item.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{% block members %}
{% if 'member_count' in group and group.member_count %}
<strong class="count">{{ ungettext('{num} Member', '{num} Members', group.member_count).format(num=group.member_count) }}</strong>
{% else %}
{% elif 'member_count' in group %}
<span class="count">{{ _('0 Members') }}</span>
{% else %}
{% endif %}
{% endblock %}

0 comments on commit a9e56b5

Please sign in to comment.