summaryrefslogtreecommitdiff
path: root/app/views/admin
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2018-12-04 13:52:54 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2018-12-04 14:10:59 +0200
commitad551e5e719fe4ef168242c8a19dcdbc92d7e6c2 (patch)
tree519af6496d55eac193e38eebdd03b0eddd1ca0fc /app/views/admin
parent40c86cfede43164e9037bac9d712e72c45bd8aea (diff)
downloadgitlab-ce-ad551e5e719fe4ef168242c8a19dcdbc92d7e6c2.tar.gz
Keep sorting selection when search users on admin panel
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/views/admin')
-rw-r--r--app/views/admin/users/index.html.haml5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/views/admin/users/index.html.haml b/app/views/admin/users/index.html.haml
index 7863866b410..600120c4f05 100644
--- a/app/views/admin/users/index.html.haml
+++ b/app/views/admin/users/index.html.haml
@@ -9,9 +9,12 @@
.search-holder
.search-field-holder
= search_field_tag :search_query, params[:search_query], placeholder: 'Search by name, email or username', class: 'form-control search-text-input js-search-input', spellcheck: false
+ - if @sort.present?
+ = hidden_field_tag :sort, @sort
= icon("search", class: "search-icon")
+ = button_tag 'Search users' if Rails.env.test?
.dropdown.user-sort-dropdown
- - toggle_text = if @sort.present? then sort_options_hash[@sort] else sort_title_name end
+ - toggle_text = if @sort.present? then users_sort_options_hash[@sort] else sort_title_name end
= dropdown_toggle(toggle_text, { toggle: 'dropdown' })
%ul.dropdown-menu.dropdown-menu-right
%li.dropdown-header