[ckan-changes] [okfn/ckan] 77bcba: [xs] snippets need full template path

GitHub noreply at github.com
Fri Apr 13 12:00:17 UTC 2012


  Branch: refs/heads/master
  Home:   https://github.com/okfn/ckan
  Commit: 77bcba21216017a98a04e7af36036d75682306a2
      https://github.com/okfn/ckan/commit/77bcba21216017a98a04e7af36036d75682306a2
  Author: Toby <toby.junk at gmail.com>
  Date:   2012-04-13 (Fri, 13 Apr 2012)

  Changed paths:
    M ckan/lib/helpers.py
    M ckan/templates/_util.html

  Log Message:
  -----------
  [xs] snippets need full template path


diff --git a/ckan/lib/helpers.py b/ckan/lib/helpers.py
index 85e145e..f660ce7 100644
--- a/ckan/lib/helpers.py
+++ b/ckan/lib/helpers.py
@@ -655,7 +655,6 @@ def snippet(template_name, **kw):
     can be used to pass parameters into the snippet rendering '''
     pylons_globs = pylons_globals()
     genshi_loader = pylons_globs['app_globals'].genshi_loader
-    template_name = 'snippets/%s.html' % template_name
     template = genshi_loader.load(template_name, cls=MarkupTemplate)
     globs = kw
     globs['h'] = pylons_globs['h']
diff --git a/ckan/templates/_util.html b/ckan/templates/_util.html
index 8c62db7..f470b07 100644
--- a/ckan/templates/_util.html
+++ b/ckan/templates/_util.html
@@ -68,7 +68,7 @@
   </py:def>
 
   <py:def function="package_list_from_dict(packages)">
-	${h.snippet('package_list', packages=packages)}
+	${h.snippet('snippets/package_list.html', packages=packages)}
   </py:def>
 
   <!--! List of dataset groups: pass in a collection of dataset groups
@@ -281,7 +281,7 @@
   </py:def>
 
   <py:def function="revision_list_from_dict(revisions, allow_compare=False)">
-    ${h.snippet('revision_list', revisions=revisions, allow_compare=allow_compare)}
+    ${h.snippet('snippets/revision_list.html', revisions=revisions, allow_compare=allow_compare)}
   </py:def>
 
 


================================================================



More information about the ckan-changes mailing list