From 35b851f54e8373f0209602503737fc83803c0648 Mon Sep 17 00:00:00 2001 From: ismail Akbudak Date: Wed, 22 Jun 2016 14:59:19 +0300 Subject: [PATCH] fix filter query --- templates/app/views/hq/admins/_filters.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/app/views/hq/admins/_filters.html.haml b/templates/app/views/hq/admins/_filters.html.haml index 8882e7a..1258558 100644 --- a/templates/app/views/hq/admins/_filters.html.haml +++ b/templates/app/views/hq/admins/_filters.html.haml @@ -6,7 +6,7 @@ = link_to hq_admins_path(q: {is_active_false: 1}), class: 'btn btn-warning' do = t('view.passive') %span.badge= Admin.where(is_active: false).count - - if params[:q].present? && (params[:q][:is_active_true].present? || params[:q][:is_active_false].present? || params[:q][:blocked_true].present?) + - if params[:q].present? && (params[:q][:is_active_true].present? || params[:q][:is_active_false].present? || params[:q][:name_or_surname_cont].present?) = link_to hq_admins_path, class: 'btn btn-info' do = t('view.all') %span.badge= Admin.count @@ -14,7 +14,7 @@ = search_form_for [:hq, @search], builder: SimpleForm::FormBuilder, html: {class: 'form-inline', data: { turboform: true }} do |f| .pull-right .input-group - = f.input_field :name_cont, label: false, class: 'form-control', placeholder: t('view.quick_search') + = f.input_field :name_or_surname_cont, label: false, class: 'form-control', placeholder: t('view.quick_search') %span.input-group-btn = button_tag( class: 'btn btn-primary') do %i.icon-search \ No newline at end of file