diff options
author | Alexis Reigel <alexis.reigel.ext@siemens.com> | 2018-07-12 18:15:03 +0200 |
---|---|---|
committer | Alexis Reigel <alexis.reigel.ext@siemens.com> | 2018-08-29 15:02:54 +0200 |
commit | 34bdb74740d0b983bfc299362b25945c9e50681c (patch) | |
tree | 290ee4a1d7d5938849acf916149ab909a51f1cfc /app/views/admin/runners | |
parent | 89b30999c294d2e344d095e635d72aa16d108a2b (diff) | |
download | gitlab-ce-34bdb74740d0b983bfc299362b25945c9e50681c.tar.gz |
add sort dropdown to admin runners page
Diffstat (limited to 'app/views/admin/runners')
-rw-r--r-- | app/views/admin/runners/_sort_dropdown.html.haml | 11 | ||||
-rw-r--r-- | app/views/admin/runners/index.html.haml | 4 |
2 files changed, 14 insertions, 1 deletions
diff --git a/app/views/admin/runners/_sort_dropdown.html.haml b/app/views/admin/runners/_sort_dropdown.html.haml new file mode 100644 index 00000000000..b201e6bf10e --- /dev/null +++ b/app/views/admin/runners/_sort_dropdown.html.haml @@ -0,0 +1,11 @@ +- sorted_by = sort_options_hash[@sort] + +.dropdown.inline.prepend-left-10 + %button.dropdown-toggle{ type: 'button', data: { toggle: 'dropdown', display: 'static' } } + = sorted_by + = icon('chevron-down') + %ul.dropdown-menu.dropdown-menu-right.dropdown-menu-selectable.dropdown-menu-sort + %li + = sortable_item(sort_title_created_date, page_filter_path(sort: sort_value_created_date, label: true), sorted_by) + = sortable_item(sort_title_contacted_date, page_filter_path(sort: sort_value_contacted_date, label: true), sorted_by) + diff --git a/app/views/admin/runners/index.html.haml b/app/views/admin/runners/index.html.haml index 0b4253286de..e3d2587b8e5 100644 --- a/app/views/admin/runners/index.html.haml +++ b/app/views/admin/runners/index.html.haml @@ -82,6 +82,8 @@ = status.titleize = button_tag class: %w[clear-search hidden] do = icon('times') + .filter-dropdown-container + = render 'sort_dropdown' .clearfix .float-right.light .prepend-top-10 @@ -103,7 +105,7 @@ %th Projects %th Jobs %th Tags - %th= link_to 'Last contact', admin_runners_path(safe_params.slice(:search).merge(sort: 'contacted_asc')) + %th Last contact %th - @runners.each do |runner| |