Extensions list: sort_by parameter #159
@ -66,12 +66,12 @@
|
||||
{% endif %}
|
||||
<div class="dropdown dropdown-filter-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>
|
||||
<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 %}
|
||||
<li>
|
||||
<a class="dropdown-item{% if option_sort_by == sort_by %} is-active{% endif %}" href="?{% query_transform sort_by=option_sort_by %}">
|
||||
<a class="dropdown-item{% if option_sort_by == sort_by %} is-active{% endif %}" href="?{% query_transform sort_by=option_sort_by %}">
|
||||
{{ name }}
|
||||
</a>
|
||||
</li>
|
||||
|
@ -141,7 +141,9 @@ class SearchView(ListedExtensionsView):
|
||||
if self.kwargs.get('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
|
||||
|
||||
# Determine which tags to list depending on the context.
|
||||
|
Loading…
Reference in New Issue
Block a user