Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[2375] More updates to the dataset search results page

  • Loading branch information...
commit 29d27cf895a1c590fd92516dd45b3489e025052e 1 parent 8a34888
@aron aron authored
View
13 ckan/templates/package/search.html
@@ -17,8 +17,10 @@
<section class="module">
<div class="content">
<form id="dataset-search" class="dataset-search clearfix" method="GET">
- <input type="search" class="search" name="q" value="${c.q}" autocomplete="off" results="0" placeholder="${_('Search...')}" />
- <input type="submit" hidden="hidden" value="${_('Search')}" class="btn btn-large button" />
+ <span class="search-giant">
+ <input type="text" class="search" name="q" value="${c.q}" autocomplete="off" results="0" placeholder="${_('Search...')}" />
+ <button type="submit" value="${_('Search')}">Submit</button>
+ </span>
<span py:if="c.fields">
<py:for each="(k, v) in c.fields">
<input type="hidden" name="${k}" value="${v}" />
@@ -54,13 +56,12 @@
${c.page.pager(q=c.q)}
</section>
-
- <section class="module">
- <p class="content">
+ <section class="module info">
+ <small class="content">
You can also access this registry using the ${h.link_to(_('API'), h.url_for(controller='api', action='get_api', id=None, ver=1))}
(see ${h.link_to(_('API Docs'), 'http://docs.ckan.org/en/latest/api.html')})
<py:if test="c.dumps_url">or download a <a href="${c.dumps_url}">full ${dumps_format} dump</a></py:if>.
- </p>
+ </small>
</section>
</content>
<sidebar>
View
8 ckan/templates/snippets/facet_list.html
@@ -23,14 +23,16 @@
how a facet-item's count is displayed.
-->
-<section class="module" xmlns:py="http://genshi.edgewall.org/">
+<section class="module" xmlns:py="http://genshi.edgewall.org/" py:with="items=h.unselected_facet_items(name, 10)">
@aron
aron added a note

@tobes I need this to display facet items including unselected ones, could you create a helper for me?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
<h2 class="heading">${h.facet_title(title)}</h2>
<nav>
<ul class="unstyled nav nav-simple">
- <py:for each="item in h.unselected_facet_items(name, 10)">
+ <py:for each="item in items">
${h.snippet('snippets/facet_item.html', name=name, item=item)}
</py:for>
</ul>
</nav>
- <p class="footer">View all</p>
+ <p class="footer" py:if="items">
+ <a href="#" class="read-more">Show All ${h.facet_title(title)}</a>
+ </p>
@aron
aron added a note

@tobes again I need to know if there are more than the limit (currently 10) and only display this footer if there are.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
</section>
Please sign in to comment.
Something went wrong with that request. Please try again.