Skip to content

Commit

Permalink
[2375] More updates to the dataset search results page
Browse files Browse the repository at this point in the history
  • Loading branch information
aron committed May 14, 2012
1 parent 8a34888 commit 29d27cf
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
13 changes: 7 additions & 6 deletions ckan/templates/package/search.html
Expand Up @@ -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}" />
Expand Down Expand Up @@ -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>
Expand Down
8 changes: 5 additions & 3 deletions ckan/templates/snippets/facet_list.html
Expand Up @@ -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)">

This comment has been minimized.

Copy link
@aron

aron May 14, 2012

Author Contributor

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

<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>

This comment has been minimized.

Copy link
@aron

aron May 14, 2012

Author Contributor

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

</section>

0 comments on commit 29d27cf

Please sign in to comment.