Extensions list: sort_by parameter #159
@ -66,7 +66,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="dropdown dropdown-filter-sort">
|
<div class="dropdown dropdown-filter-sort">
|
||||||
<button class="dropdown-toggle js-dropdown-toggle" data-toggle-menu-id="js-dropdown-menu-sort">
|
<button class="dropdown-toggle js-dropdown-toggle" data-toggle-menu-id="js-dropdown-menu-sort">
|
||||||
Sort by <i class="i-chevron-down"></i>
|
Sort by {{ sort_by_option_name }} <i class="i-chevron-down"></i>
|
||||||
</button>
|
</button>
|
||||||
<ul class="dropdown-menu dropdown-menu-filter-sort dropdown-menu-right js-dropdown-menu" id="js-dropdown-menu-sort">
|
<ul class="dropdown-menu dropdown-menu-filter-sort dropdown-menu-right js-dropdown-menu" id="js-dropdown-menu-sort">
|
||||||
{% for option_sort_by, name in sort_by_options.items %}
|
{% for option_sort_by, name in sort_by_options.items %}
|
||||||
|
@ -141,7 +141,9 @@ class SearchView(ListedExtensionsView):
|
|||||||
if self.kwargs.get('team_slug'):
|
if self.kwargs.get('team_slug'):
|
||||||
context['team'] = get_object_or_404(teams.models.Team, slug=self.kwargs['team_slug'])
|
context['team'] = get_object_or_404(teams.models.Team, slug=self.kwargs['team_slug'])
|
||||||
|
|
||||||
context['sort_by'] = self._get_sort_by()
|
sort_by = self._get_sort_by()
|
||||||
|
context['sort_by'] = sort_by
|
||||||
|
context['sort_by_option_name'] = self.sort_by_options.get(sort_by)
|
||||||
context['sort_by_options'] = self.sort_by_options
|
context['sort_by_options'] = self.sort_by_options
|
||||||
|
|
||||||
# Determine which tags to list depending on the context.
|
# Determine which tags to list depending on the context.
|
||||||
|
Loading…
Reference in New Issue
Block a user