diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-02-06 06:15:05 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-02-06 06:15:05 +0300 |
commit | bbca6a0abd9f5559fe4abbf2cb2100a0e4717ac8 (patch) | |
tree | 34b5f2fd0c2301b8d5284700bec64ee272246bc4 /app/views/shared/_sort_dropdown.html.haml | |
parent | e0aa5c371ea1c633a0648f13cd7bea35f3aea75c (diff) |
Refactor sorting in project
Diffstat (limited to 'app/views/shared/_sort_dropdown.html.haml')
-rw-r--r-- | app/views/shared/_sort_dropdown.html.haml | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/app/views/shared/_sort_dropdown.html.haml b/app/views/shared/_sort_dropdown.html.haml index 3e6a62380f3..ba14c8643cd 100644 --- a/app/views/shared/_sort_dropdown.html.haml +++ b/app/views/shared/_sort_dropdown.html.haml @@ -2,21 +2,21 @@ %a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"} %span.light sort: - if @sort.present? - = @sort + = sort_options_hash[@sort] - else - Newest + = sort_title_recently_created %b.caret %ul.dropdown-menu.dropdown-menu-align-right %li - = link_to page_filter_path(sort: 'newest') do + = link_to page_filter_path(sort: sort_value_recently_created) do = sort_title_recently_created - = link_to page_filter_path(sort: 'oldest') do + = link_to page_filter_path(sort: sort_value_oldest_created) do = sort_title_oldest_created - = link_to page_filter_path(sort: 'recently_updated') do + = link_to page_filter_path(sort: sort_value_recently_updated) do = sort_title_recently_updated - = link_to page_filter_path(sort: 'last_updated') do + = link_to page_filter_path(sort: sort_value_oldest_updated) do = sort_title_oldest_updated - = link_to page_filter_path(sort: 'milestone_due_soon') do - Milestone due soon - = link_to page_filter_path(sort: 'milestone_due_later') do - Milestone due later + = link_to page_filter_path(sort: sort_value_milestone_soon) do + = sort_title_milestone_soon + = link_to page_filter_path(sort: sort_value_milestone_later) do + = sort_title_milestone_later |