debian-mirror-gitlab/app/views/shared/projects/_dropdown.html.haml

39 lines
1.6 KiB
Text
Raw Normal View History

2017-08-17 22:00:37 +05:30
- @sort ||= sort_value_latest_activity
.dropdown
2016-08-24 12:49:21 +05:30
- toggle_text = projects_sort_options_hash[@sort]
= dropdown_toggle(toggle_text, { toggle: 'dropdown' }, { id: 'sort-projects-dropdown' })
2016-06-02 11:05:42 +05:30
%ul.dropdown-menu.dropdown-menu-align-right.dropdown-menu-selectable
%li.dropdown-header
Sort by
- projects_sort_options_hash.each do |value, title|
%li
2017-08-17 22:00:37 +05:30
= link_to filter_projects_path(sort: value), class: ("is-active" if @sort == value) do
2016-06-02 11:05:42 +05:30
= title
%li.divider
%li
2017-08-17 22:00:37 +05:30
= link_to filter_projects_path(archived: nil), class: ("is-active" unless params[:archived].present?) do
2016-06-02 11:05:42 +05:30
Hide archived projects
%li
2017-08-17 22:00:37 +05:30
= link_to filter_projects_path(archived: true), class: ("is-active" if params[:archived].present?) do
2016-06-02 11:05:42 +05:30
Show archived projects
- if current_user
%li.divider
%li
2017-08-17 22:00:37 +05:30
= link_to filter_projects_path(personal: nil), class: ("is-active" unless params[:personal].present?) do
2016-06-02 11:05:42 +05:30
Owned by anyone
%li
2017-08-17 22:00:37 +05:30
= link_to filter_projects_path(personal: true), class: ("is-active" if params[:personal].present?) do
2016-06-02 11:05:42 +05:30
Owned by me
2017-08-17 22:00:37 +05:30
- if @group && @group.shared_projects.present?
%li.divider
%li
= link_to filter_projects_path(shared: nil), class: ("is-active" unless params[:shared].present?) do
All projects
%li
= link_to filter_projects_path(shared: 0), class: ("is-active" if params[:shared] == '0') do
Hide shared projects
%li
= link_to filter_projects_path(shared: 1), class: ("is-active" if params[:shared] == '1') do
Hide group projects