summaryrefslogtreecommitdiff
path: root/app/views/shared/labels/_sort_dropdown.html.haml
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/shared/labels/_sort_dropdown.html.haml')
-rw-r--r--app/views/shared/labels/_sort_dropdown.html.haml9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/views/shared/labels/_sort_dropdown.html.haml b/app/views/shared/labels/_sort_dropdown.html.haml
new file mode 100644
index 00000000000..ff6e2947ffd
--- /dev/null
+++ b/app/views/shared/labels/_sort_dropdown.html.haml
@@ -0,0 +1,9 @@
+- sort_title = label_sort_options_hash[@sort] || sort_title_name_desc
+.dropdown.inline
+ %button.dropdown-toggle{ type: 'button', data: { toggle: 'dropdown' } }
+ = sort_title
+ = icon('chevron-down')
+ %ul.dropdown-menu.dropdown-menu-right.dropdown-menu-sort
+ %li
+ - label_sort_options_hash.each do |value, title|
+ = sortable_item(title, page_filter_path(sort: value, label: true), sort_title)