Welcome to mirror list, hosted at ThFree Co, Russian Federation.

_sort_dropdown.html.haml « projects « shared « views « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f3aeaacbdb1e1ba004348589d8f0a56bac5a1fa5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
- @sort ||= sort_value_latest_activity
- toggle_text = projects_sort_option_titles[@sort]

.btn-group.w-100{ role: "group" }
  .btn-group.w-100.dropdown.js-project-filter-dropdown-wrap{ role: "group" }
    %button#sort-projects-dropdown.gl-button.btn.btn-default.dropdown-menu-toggle{ type: 'button', data: { toggle: 'dropdown', display: 'static' } }
      = toggle_text
      = sprite_icon('chevron-down', css_class: 'dropdown-menu-toggle-icon gl-top-3')
    %ul.dropdown-menu.dropdown-menu-right.dropdown-menu-selectable
      %li.dropdown-header
        = _("Sort by")
      - projects_sort_options_hash.each do |value, title|
        %li
          = link_to title, filter_projects_path(sort: value), class: ("is-active" if toggle_text == title)

      %li.divider
      %li
        = link_to filter_projects_path(archived: nil), class: ("is-active" unless params[:archived].present?) do
          = _("Hide archived projects")
      %li
        = link_to filter_projects_path(archived: true), class: ("is-active" if Gitlab::Utils.to_boolean(params[:archived])) do
          = _("Show archived projects")
      %li
        = link_to filter_projects_path(archived: 'only'), class: ("is-active" if params[:archived] == 'only') do
          = _("Show archived projects only")

      - if current_user && @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")

  = project_sort_direction_button(@sort)