Skip to content

Commit

Permalink
[#613] Bulk process add new sort and update simple search template
Browse files Browse the repository at this point in the history
  • Loading branch information
tobes committed Mar 13, 2013
1 parent 45f540a commit 0f9fd61
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
7 changes: 1 addition & 6 deletions ckan/templates/organization/bulk_process.html
Expand Up @@ -84,12 +84,7 @@ <h3 class="dataset-heading">
{% endif %}
</div>
<aside class="tertiary">
<form method="GET">
<span class="control-group search-normal">
<input type="text" class="search" name="q" value="{{ c.q }}" autocomplete="off" placeholder="{{ _('Search datasets...') }}" />
<button type="submit"><i class="icon-search"></i> <span>{{ _('Search') }}</span></button>
</span>
</form>
{% snippet 'snippets/simple_search.html', q=c.q, sort=c.sort_by_selected, placeholder=_('Search datasets...'), extra_sort=[(_('Last Modified'), 'data_modified asc')]%}
{{ h.snippet('snippets/facet_list.html', title='Tags', name='tags', within_tertiary=true, extras={'id':c.group_dict.name}) }}
{{ h.snippet('snippets/facet_list.html', title='Formats', name='res_format', within_tertiary=true, extras={'id':c.group_dict.name}) }}
</aside>
Expand Down
6 changes: 4 additions & 2 deletions ckan/templates/snippets/simple_search.html
Expand Up @@ -6,8 +6,10 @@
<span class="form-select control-group control-order-by">
<label for="field-order-by">{{ _('Order by') }}</label>
<select id="field-order-by" name="sort">
<option value="name asc"{% if sort=='name asc' %} selected="selected"{% endif %}>{{ _('Name Ascending') }}</option>
<option value="name desc"{% if sort=='name desc' %} selected="selected"{% endif %}>{{ _('Name Descending') }}</option>
{% set sort_items = [(_('Name Ascending'), 'name asc'), (_('Name Descending'), 'name desc')] %}
{% for item in sort_items + (extra_sort or []) %}
<option value="{{ item[1] }}"{% if sort==item[1] %} selected="selected"{% endif %}>{{ item[0] }}</option>
{% endfor %}
</select>
<button class="btn js-hide" type="submit">{{ _('Go') }}</button>
</span>
Expand Down

0 comments on commit 0f9fd61

Please sign in to comment.