BigW Consortium Gitlab

_sort_dropdown.html.haml 1.27 KB
Newer Older
1
- sorted_by = sort_options_hash[@sort]
2 3
- viewing_issues = controller.controller_name == 'issues' || controller.action_name == 'issues'

4
.dropdown.inline.prepend-left-10
5 6
  %button.dropdown-toggle{ type: 'button', data: { toggle: 'dropdown' } }
    = sorted_by
7
    = icon('chevron-down')
8
  %ul.dropdown-menu.dropdown-menu-align-right.dropdown-menu-selectable.dropdown-menu-sort
9
    %li
10 11 12 13 14 15 16
      = sortable_item(sort_title_priority,         page_filter_path(sort: sort_value_priority,         label: true), sorted_by)
      = sortable_item(sort_title_created_date,     page_filter_path(sort: sort_value_created_date,     label: true), sorted_by)
      = sortable_item(sort_title_recently_updated, page_filter_path(sort: sort_value_recently_updated, label: true), sorted_by)
      = sortable_item(sort_title_milestone,        page_filter_path(sort: sort_value_milestone,        label: true), sorted_by)
      = sortable_item(sort_title_due_date,         page_filter_path(sort: sort_value_due_date,         label: true), sorted_by) if viewing_issues
      = sortable_item(sort_title_popularity,       page_filter_path(sort: sort_value_popularity,       label: true), sorted_by)
      = sortable_item(sort_title_label_priority,   page_filter_path(sort: sort_value_label_priority,   label: true), sorted_by)