Rename :name search parameter to :search_query at /admin/users
The parameter is used to search users by several criretia was called :name. This request renames it to :search_query which closer to it actual perpose
This commit is contained in:
parent
b328c78855
commit
6893bccd06
|
@ -40,6 +40,7 @@ Please view this file on the master branch, on stable branches it's out of date.
|
|||
- Refactor email, use setter method instead AR callbacks for email attribute (Semyon Pupkov)
|
||||
- Shortened merge request modal to let clipboard button not overlap
|
||||
- In all filterable drop downs, put input field in focus only after load is complete (Ido @leibo)
|
||||
- Improve search query parameter naming in /admin/users !7115 (YarNayar)
|
||||
|
||||
## 8.13.2 (2016-10-31)
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ class Admin::UsersController < Admin::ApplicationController
|
|||
|
||||
def index
|
||||
@users = User.order_name_asc.filter(params[:filter])
|
||||
@users = @users.search(params[:name]) if params[:name].present?
|
||||
@users = @users.search(params[:search_query]) if params[:search_query].present?
|
||||
@users = @users.sort(@sort = params[:sort])
|
||||
@users = @users.page(params[:page])
|
||||
end
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
= hidden_field_tag "filter", h(params[:filter])
|
||||
.search-holder
|
||||
.search-field-holder
|
||||
= search_field_tag :name, params[:name], placeholder: 'Search by name, email or username', class: 'form-control search-text-input js-search-input', spellcheck: false
|
||||
= 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
|
||||
= icon("search", class: "search-icon")
|
||||
.dropdown
|
||||
- toggle_text = if @sort.present? then sort_options_hash[@sort] else sort_title_name end
|
||||
|
|
Loading…
Reference in New Issue