Skip to content

Commit

Permalink
[#2001] Changing template to use sort by title. Add doc for organizat…
Browse files Browse the repository at this point in the history
…ion_list.
  • Loading branch information
David Read committed Nov 25, 2014
1 parent 88ebc69 commit bbf0003
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion ckan/controllers/group.py
Expand Up @@ -222,7 +222,6 @@ def _read(self, id, limit):
# most search operations should reset the page counter:
params_nopage = [(k, v) for k, v in request.params.items()
if k != 'page']
#sort_by = request.params.get('sort', 'name asc')
sort_by = request.params.get('sort', None)

def search_url(params):
Expand Down
2 changes: 1 addition & 1 deletion ckan/logic/action/get.py
Expand Up @@ -481,7 +481,7 @@ def organization_list(context, data_dict):
:type order_by: string
:param sort: sorting of the search results. Optional. Default:
"name asc" string of field name and sort-order. The allowed fields are
'name' and 'package_count'
'name', 'package_count' and 'title'
:type sort: string
:param organizations: a list of names of the groups to return,
if given only groups whose names are in this list will be
Expand Down
2 changes: 1 addition & 1 deletion ckan/templates/group/index.html
Expand Up @@ -17,7 +17,7 @@
{% block primary_content_inner %}
<h1 class="hide-heading">{{ _('Groups') }}</h1>
{% block groups_search_form %}
{% snippet 'snippets/search_form.html', type='group', query=c.q, sorting_selected=c.sort_by_selected, count=c.page.item_count, placeholder=_('Search groups...'), show_empty=request.params, no_bottom_border=true if c.page.items %}
{% snippet 'snippets/search_form.html', type='group', query=c.q, sorting_selected=c.sort_by_selected, count=c.page.item_count, placeholder=_('Search groups...'), show_empty=request.params, no_bottom_border=true if c.page.items, sorting = [(_('Name Ascending'), 'title asc'), (_('Name Descending'), 'title desc')] %}
{% endblock %}
{% block groups_list %}
{% if c.page.items or request.params %}
Expand Down

0 comments on commit bbf0003

Please sign in to comment.