diff options
Diffstat (limited to 'app/views/explore/groups/index.html.haml')
-rw-r--r-- | app/views/explore/groups/index.html.haml | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/app/views/explore/groups/index.html.haml b/app/views/explore/groups/index.html.haml index 9b1d7d0416d..5cf514927af 100644 --- a/app/views/explore/groups/index.html.haml +++ b/app/views/explore/groups/index.html.haml @@ -1,6 +1,7 @@ .clearfix .pull-left = form_tag explore_groups_path, method: :get, class: 'form-inline form-tiny' do |f| + = hidden_field_tag :sort, @sort .form-group = search_field_tag :search, params[:search], placeholder: "Filter by name", class: "form-control search-text-input input-mn-300", id: "groups_search" .form-group @@ -11,21 +12,19 @@ %a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"} %span.light sort: - if @sort.present? - = @sort.humanize + = sort_options_hash[@sort] - else - Name + = sort_title_recently_created %b.caret %ul.dropdown-menu %li - = link_to explore_groups_path(sort: nil) do - Name - = link_to explore_groups_path(sort: 'newest') do + = link_to explore_groups_path(sort: sort_value_recently_created) do = sort_title_recently_created - = link_to explore_groups_path(sort: 'oldest') do + = link_to explore_groups_path(sort: sort_value_oldest_created) do = sort_title_oldest_created - = link_to explore_groups_path(sort: 'recently_updated') do + = link_to explore_groups_path(sort: sort_value_recently_updated) do = sort_title_recently_updated - = link_to explore_groups_path(sort: 'last_updated') do + = link_to explore_groups_path(sort: sort_value_oldest_updated) do = sort_title_oldest_updated %hr |