2017-03-03 05:35:04 -05:00
|
|
|
- @sort ||= sort_value_latest_activity
|
2019-04-12 08:14:28 -04:00
|
|
|
.dropdown.js-project-filter-dropdown-wrap
|
2019-04-17 07:02:34 -04:00
|
|
|
= dropdown_toggle(projects_sort_options_hash[@sort], { toggle: 'dropdown', display: 'static' }, { id: 'sort-projects-dropdown' })
|
2019-04-12 08:14:28 -04:00
|
|
|
%ul.dropdown-menu.dropdown-menu-right.dropdown-menu-selectable
|
|
|
|
%li.dropdown-header
|
2019-04-17 07:02:34 -04:00
|
|
|
= _("Sort by")
|
2019-04-12 08:14:28 -04:00
|
|
|
- projects_sort_options_hash.each do |value, title|
|
|
|
|
%li
|
|
|
|
= link_to filter_projects_path(sort: value), class: ("is-active" if @sort == value) do
|
|
|
|
= title
|
2016-03-04 11:53:13 -05:00
|
|
|
|
2019-04-12 08:14:28 -04:00
|
|
|
%li.divider
|
|
|
|
%li
|
|
|
|
= link_to filter_projects_path(archived: nil), class: ("is-active" unless params[:archived].present?) do
|
2019-04-17 07:02:34 -04:00
|
|
|
= _("Hide archived projects")
|
2019-04-12 08:14:28 -04:00
|
|
|
%li
|
|
|
|
= link_to filter_projects_path(archived: true), class: ("is-active" if Gitlab::Utils.to_boolean(params[:archived])) do
|
2019-04-17 07:02:34 -04:00
|
|
|
= _("Show archived projects")
|
2019-04-12 08:14:28 -04:00
|
|
|
%li
|
|
|
|
= link_to filter_projects_path(archived: 'only'), class: ("is-active" if params[:archived] == 'only') do
|
2019-04-17 07:02:34 -04:00
|
|
|
= _("Show archived projects only")
|
2019-04-12 08:14:28 -04:00
|
|
|
- if current_user
|
2016-04-21 17:03:14 -04:00
|
|
|
%li.divider
|
|
|
|
%li
|
2019-04-12 08:14:28 -04:00
|
|
|
= link_to filter_projects_path(personal: nil), class: ("is-active" unless params[:personal].present?) do
|
2019-04-17 07:02:34 -04:00
|
|
|
= _("Owned by anyone")
|
2016-04-21 17:03:14 -04:00
|
|
|
%li
|
2019-04-12 08:14:28 -04:00
|
|
|
= link_to filter_projects_path(personal: true), class: ("is-active" if params[:personal].present?) do
|
2019-04-17 07:02:34 -04:00
|
|
|
= _("Owned by me")
|
2019-04-12 08:14:28 -04:00
|
|
|
- if @group && @group.shared_projects.present?
|
2017-01-24 10:32:34 -05:00
|
|
|
%li.divider
|
|
|
|
%li
|
2019-04-12 08:14:28 -04:00
|
|
|
= link_to filter_projects_path(shared: nil), class: ("is-active" unless params[:shared].present?) do
|
2019-04-17 07:02:34 -04:00
|
|
|
= _("All projects")
|
2017-01-24 10:32:34 -05:00
|
|
|
%li
|
2019-04-12 08:14:28 -04:00
|
|
|
= link_to filter_projects_path(shared: 0), class: ("is-active" if params[:shared] == '0') do
|
2019-04-17 07:02:34 -04:00
|
|
|
= _("Hide shared projects")
|
2019-04-12 08:14:28 -04:00
|
|
|
%li
|
|
|
|
= link_to filter_projects_path(shared: 1), class: ("is-active" if params[:shared] == '1') do
|
2019-04-17 07:02:34 -04:00
|
|
|
= _("Hide group projects")
|