Skip to content

Commit

Permalink
Only show tracking_summary if it exists in the package_dict, which is…
Browse files Browse the repository at this point in the history
… not true when viewing old versions of datasets.
  • Loading branch information
David Read committed Jun 29, 2018
1 parent fb5fb9c commit 91521de
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ckan/templates-bs2/package/snippets/resource_item.html
Expand Up @@ -5,7 +5,7 @@
{% block resource_item_title %}
<a class="heading" href="{{ url }}" title="{{ res.name or res.description }}">
{{ h.resource_display_name(res) | truncate(50) }}<span class="format-label" property="dc:format" data-format="{{ res.format.lower() or 'data' }}">{{ h.get_translated(res, 'format') }}</span>
{{ h.popular('views', res.tracking_summary.total, min=10) }}
{{ h.popular('views', res.tracking_summary.total, min=10) if res.tracking_summary }}
</a>
{% endblock %}
{% block resource_item_description %}
Expand Down
2 changes: 1 addition & 1 deletion ckan/templates/package/snippets/resource_item.html
Expand Up @@ -5,7 +5,7 @@
{% block resource_item_title %}
<a class="heading" href="{{ url }}" title="{{ res.name or res.description }}">
{{ h.resource_display_name(res) | truncate(50) }}<span class="format-label" property="dc:format" data-format="{{ res.format.lower() or 'data' }}">{{ h.get_translated(res, 'format') }}</span>
{{ h.popular('views', res.tracking_summary.total, min=10) }}
{{ h.popular('views', res.tracking_summary.total, min=10) if res.tracking_summary }}
</a>
{% endblock %}
{% block resource_item_description %}
Expand Down

0 comments on commit 91521de

Please sign in to comment.