Skip to content

Commit

Permalink
Fix dataset count display for groups
Browse files Browse the repository at this point in the history
Dataset counts were not displayed at all for group items because
the template checked `packages` rather than `package_count`.
  • Loading branch information
kmbn authored and smotornyuk committed Jul 21, 2017
1 parent 548ddc6 commit ee91052
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ckan/templates/group/snippets/group_item.html
Expand Up @@ -28,9 +28,9 @@ <h3 class="media-heading">{{ group.display_name }}</h3>
{% endif %}
{% endblock %}
{% block datasets %}
{% if group.packages %}
<strong class="count">{{ ungettext('{num} Dataset', '{num} Datasets', group.packages).format(num=group.packages) }}</strong>
{% elif group.packages == 0 %}
{% if group.package_count %}
<strong class="count">{{ ungettext('{num} Dataset', '{num} Datasets', group.package_count).format(num=group.package_count) }}</strong>
{% elif group.package_count == 0 %}
<span class="count">{{ _('0 Datasets') }}</span>
{% endif %}
{% endblock %}
Expand Down

0 comments on commit ee91052

Please sign in to comment.