2016-03-04 11:53:13 -05:00
|
|
|
- @sort ||= sort_value_recently_updated
|
2016-04-15 22:35:48 -04:00
|
|
|
- personal = params[:personal]
|
2016-03-04 11:53:13 -05:00
|
|
|
- archived = params[:archived]
|
2015-08-20 05:59:14 -04:00
|
|
|
.dropdown.inline
|
|
|
|
%button.dropdown-toggle.btn{type: 'button', 'data-toggle' => 'dropdown'}
|
2016-01-28 04:05:00 -05:00
|
|
|
%span.light
|
2016-03-04 11:53:13 -05:00
|
|
|
= projects_sort_options_hash[@sort]
|
2015-08-20 05:59:14 -04:00
|
|
|
%b.caret
|
2016-03-05 06:51:56 -05:00
|
|
|
%ul.dropdown-menu.dropdown-menu-align-right.dropdown-menu-selectable
|
|
|
|
%li.dropdown-header
|
|
|
|
Sort by
|
2016-03-04 11:53:13 -05:00
|
|
|
- projects_sort_options_hash.each do |value, title|
|
|
|
|
%li
|
2016-04-15 22:35:48 -04:00
|
|
|
= link_to filter_projects_path(sort: value, archived: archived, personal: personal), class: ("is-active" if @sort == value) do
|
2016-03-04 11:53:13 -05:00
|
|
|
= title
|
|
|
|
|
2016-03-04 10:11:33 -05:00
|
|
|
%li.divider
|
|
|
|
%li
|
2016-03-05 06:51:56 -05:00
|
|
|
= link_to filter_projects_path(sort: @sort, archived: nil), class: ("is-active" unless params[:archived].present?) do
|
2016-03-04 11:53:13 -05:00
|
|
|
Hide archived projects
|
|
|
|
%li
|
2016-03-05 06:51:56 -05:00
|
|
|
= link_to filter_projects_path(sort: @sort, archived: true), class: ("is-active" if params[:archived].present?) do
|
2016-03-04 11:53:13 -05:00
|
|
|
Show archived projects
|
2016-04-15 22:35:48 -04:00
|
|
|
%li.divider
|
|
|
|
%li
|
|
|
|
= link_to filter_projects_path(sort: @sort, personal: nil), class: ("is-active" unless personal) do
|
|
|
|
Owned by anyone
|
|
|
|
%li
|
|
|
|
= link_to filter_projects_path(sort: @sort, personal: true), class: ("is-active" if personal) do
|
|
|
|
Owned by me
|