BigW Consortium Gitlab

_sort_dropdown.html.haml 1.65 KB
Newer Older
1
.dropdown.inline.prepend-left-10
2
  %button.dropdown-toggle.btn{type: 'button', 'data-toggle' => 'dropdown'}
3
    %span.light
4
    - if @sort.present?
5
      = sort_options_hash[@sort]
6
    - else
7
      = sort_title_recently_created
8
    = icon('caret-down')
9
  %ul.dropdown-menu.dropdown-menu-align-right.dropdown-menu-sort
10
    %li
11
      = link_to page_filter_path(sort: sort_value_priority, label: true) do
Thijs Wouters committed
12
        = sort_title_priority
13
      = link_to page_filter_path(sort: sort_value_recently_created, label: true) do
14
        = sort_title_recently_created
15
      = link_to page_filter_path(sort: sort_value_oldest_created, label: true) do
16
        = sort_title_oldest_created
17
      = link_to page_filter_path(sort: sort_value_recently_updated, label: true) do
18
        = sort_title_recently_updated
19
      = link_to page_filter_path(sort: sort_value_oldest_updated, label: true) do
20
        = sort_title_oldest_updated
21
      = link_to page_filter_path(sort: sort_value_milestone_soon, label: true) do
22
        = sort_title_milestone_soon
23
      = link_to page_filter_path(sort: sort_value_milestone_later, label: true) do
24
        = sort_title_milestone_later
Phil Hughes committed
25
      - if controller.controller_name == 'issues' || controller.action_name == 'issues'
26
        = link_to page_filter_path(sort: sort_value_due_date_soon, label: true) do
Rémy Coutable committed
27
          = sort_title_due_date_soon
28
        = link_to page_filter_path(sort: sort_value_due_date_later, label: true) do
Rémy Coutable committed
29
          = sort_title_due_date_later
30
      = link_to page_filter_path(sort: sort_value_upvotes, label: true) do
31
        = sort_title_upvotes
32
      = link_to page_filter_path(sort: sort_value_downvotes, label: true) do
33
        = sort_title_downvotes