Skip to content

Commit

Permalink
[2375] Fix display of resource items on dataset page
Browse files Browse the repository at this point in the history
  • Loading branch information
aron committed Jun 12, 2012
1 parent 3353f69 commit 00dc1d9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ckan/templates/package/read.html
Expand Up @@ -50,7 +50,7 @@ <h3>Data and Resources</h3>
{% if c.pkg_dict.resources %}
<ul class="resource-list">
{% for res in c.pkg_dict.resources %}
{{ h.snippets('package/snippets/resource_item.html', resource=res) }}
{% snippet 'package/snippets/resource_item.html', pkg=c.pkg_dict, res=res %}
{% endfor %}
</ul>
{% else %}
Expand Down
4 changes: 2 additions & 2 deletions ckan/templates/package/snippets/resource_item.html
@@ -1,11 +1,11 @@
{% set url = h.url_for(controller='package', action='resource_read', id=c.pkg_dict['name'], resource_id=res['id']) %}
{% set url = h.url_for(controller='package', action='resource_read', id=pkg.name, resource_id=res.id) %}
<li class="resource-item">
<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' }}">{{ res.format }}</span>
{{ h.popular('views', res.tracking_summary.total, min=10) }}
</a>
<p class="description">
{% if res.name %}
{% if res.description %}
{{ h.markdown_extract(res.description, extract_length=80) }}
{% else %}
<span class="empty">{{ _('No description for this resource') }}</span>
Expand Down

0 comments on commit 00dc1d9

Please sign in to comment.