22 lines
882 B
Text
22 lines
882 B
Text
- @sort ||= sort_value_recently_updated
|
|
- archived = params[:archived]
|
|
.dropdown.inline
|
|
%button.dropdown-toggle.btn{type: 'button', 'data-toggle' => 'dropdown'}
|
|
%span.light
|
|
= projects_sort_options_hash[@sort]
|
|
%b.caret
|
|
%ul.dropdown-menu.dropdown-menu-align-right.dropdown-menu-selectable
|
|
%li.dropdown-header
|
|
Sort by
|
|
- projects_sort_options_hash.each do |value, title|
|
|
%li
|
|
= link_to filter_projects_path(sort: value, archived: archived), class: ("is-active" if @sort == value) do
|
|
= title
|
|
|
|
%li.divider
|
|
%li
|
|
= link_to filter_projects_path(sort: @sort, archived: nil), class: ("is-active" unless params[:archived].present?) do
|
|
Hide archived projects
|
|
%li
|
|
= link_to filter_projects_path(sort: @sort, archived: true), class: ("is-active" if params[:archived].present?) do
|
|
Show archived projects
|