[ckan-changes] commit/ckan: dread: [templates]: Display search count if any search options are provided, since user not always provides a q value.

Bitbucket commits-noreply at bitbucket.org
Fri Jul 15 16:29:10 UTC 2011


1 new changeset in ckan:

http://bitbucket.org/okfn/ckan/changeset/742dbad3fec7/
changeset:   742dbad3fec7
branch:      release-v1.4.2
user:        dread
date:        2011-07-15 18:28:12
summary:     [templates]: Display search count if any search options are provided, since user not always provides a q value.
affected #:  1 file (22 bytes)

--- a/ckan/templates/package/search.html	Fri Jul 15 15:31:20 2011 +0100
+++ b/ckan/templates/package/search.html	Fri Jul 15 17:28:12 2011 +0100
@@ -53,10 +53,10 @@
         <p i18n:msg="item_count"><strong>There was an error while searching.</strong> 
             Please try another search term.</p></py:if>
-      <py:if test="c.q">      
+      <py:if test="request.params"><h4 i18n:msg="item_count"><strong>${c.page.item_count}</strong> packages found</h4></py:if>
-      <py:if test="c.page.item_count == 0 and c.q">
+      <py:if test="c.page.item_count == 0 and request.params"><p i18n:msg="">Would you like to <a href="${h.url_for(action='new', id=None)}">create a new package?</a></p></py:if>
       ${package_list(c.page.items)}

Repository URL: https://bitbucket.org/okfn/ckan/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.




More information about the ckan-changes mailing list