Skip to content

Commit

Permalink
[#2375] do not pass resources to resource snippet
Browse files Browse the repository at this point in the history
  • Loading branch information
tobes committed Jun 28, 2012
1 parent f614af8 commit 67d425e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ckan/templates/package/pages/form_page.html
Expand Up @@ -33,6 +33,6 @@ <h2 class="module-heading"><i class="icon-large icon-info-sign"></i> {{ _('What

{% block resources_module %}
{# TODO: Pass in a list of previously created resources and the current package dict #}
{% snippet "package/snippets/resources.html", resources=[], pkg={}, action='new_resource' %}
{% snippet "package/snippets/resources.html", pkg={}, action='new_resource' %}
{% endblock %}
{% endblock %}
2 changes: 1 addition & 1 deletion ckan/templates/package/resource_read.html
Expand Up @@ -104,7 +104,7 @@ <h2 class="module-heading"><i class="icon-medium icon-info-sign"></i> Resource I
</ul>
</section>

{% snippet "package/snippets/resources.html", resources=pkg.resources, pkg=pkg, active=res.id %}
{% snippet "package/snippets/resources.html", pkg=pkg, active=res.id %}

{% snippet "snippets/social.html" %}
{% endblock %}
4 changes: 2 additions & 2 deletions ckan/templates/package/snippets/resources.html
Expand Up @@ -2,16 +2,16 @@
Displays a sidebard module with navigation containing the provided resources.
If no resources are provided then the module will not be displayed.

resources - A list of resource dicts to display.
pkg - The package dict that owns the resources.
active - The id of the currently displayed resource.
action - The controller action to use (default: 'resource_read').

Example:

{% snippet "package/snippets/resources.html", resources=pkg.resources, pkg=pkg, active=res.id %}
{% snippet "package/snippets/resources.html", pkg=pkg, active=res.id %}

#}
{% set resources = pkg.resources or [] %}
{% if resources %}
<section class="module module-narrow resources">
<h2 class="module-heading">{{ _("Resources") }}</h2>
Expand Down

0 comments on commit 67d425e

Please sign in to comment.