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

41 lines
1.9 KiB
Text
Raw Normal View History

2017-08-17 22:00:37 +05:30
- @sort ||= sort_value_latest_activity
2023-04-23 21:23:45 +05:30
.dropdown.js-project-filter-dropdown-wrap.gl-display-inline{ class: 'gl-m-0!' }
2019-07-31 22:56:46 +05:30
= dropdown_toggle(projects_sort_options_hash[@sort], { toggle: 'dropdown', display: 'static' }, { id: 'sort-projects-dropdown' })
2018-11-08 19:23:39 +05:30
%ul.dropdown-menu.dropdown-menu-right.dropdown-menu-selectable
2016-06-02 11:05:42 +05:30
%li.dropdown-header
2019-07-31 22:56:46 +05:30
= _("Sort by")
2016-06-02 11:05:42 +05:30
- 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
2019-07-31 22:56:46 +05:30
= _("Hide archived projects")
2016-06-02 11:05:42 +05:30
%li
2018-03-17 18:26:18 +05:30
= link_to filter_projects_path(archived: true), class: ("is-active" if Gitlab::Utils.to_boolean(params[:archived])) do
2019-07-31 22:56:46 +05:30
= _("Show archived projects")
2018-03-17 18:26:18 +05:30
%li
= link_to filter_projects_path(archived: 'only'), class: ("is-active" if params[:archived] == 'only') do
2019-07-31 22:56:46 +05:30
= _("Show archived projects only")
2016-06-02 11:05:42 +05:30
- 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
2019-07-31 22:56:46 +05:30
= _("Owned by anyone")
2016-06-02 11:05:42 +05:30
%li
2017-08-17 22:00:37 +05:30
= link_to filter_projects_path(personal: true), class: ("is-active" if params[:personal].present?) do
2019-07-31 22:56:46 +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
2019-07-31 22:56:46 +05:30
= _("All projects")
2017-08-17 22:00:37 +05:30
%li
= link_to filter_projects_path(shared: 0), class: ("is-active" if params[:shared] == '0') do
2019-07-31 22:56:46 +05:30
= _("Hide shared projects")
2017-08-17 22:00:37 +05:30
%li
= link_to filter_projects_path(shared: 1), class: ("is-active" if params[:shared] == '1') do
2019-07-31 22:56:46 +05:30
= _("Hide group projects")