Merge pull request #106 from internetee/story/112601637-no-ident

Story/112601637 no ident
This commit is contained in:
Timo Võhmar 2016-03-22 11:11:12 +02:00
commit 7b3a109a99
2 changed files with 9 additions and 1 deletions

View file

@ -20,6 +20,8 @@ class Admin::ContactsController < AdminController
else else
contacts = Contact.includes(:registrar) contacts = Contact.includes(:registrar)
end end
contacts = contacts.where("ident_country_code is null or ident_country_code=''") if params[:only_no_country_code].eql?('1')
normalize_search_parameters do normalize_search_parameters do
@q = contacts.search(search_params) @q = contacts.search(search_params)

View file

@ -59,7 +59,13 @@
.form-group .form-group
= label_tag t(:results_per_page) = label_tag t(:results_per_page)
= text_field_tag :results_per_page, params[:results_per_page], class: 'form-control', placeholder: t(:results_per_page) = text_field_tag :results_per_page, params[:results_per_page], class: 'form-control', placeholder: t(:results_per_page)
.col-md-3{style: 'padding-top: 25px;'} .col-md-3
.form-group
= label_tag :only_no_country_code, "Ident CC missing"
= check_box_tag :only_no_country_code, '1',params[:only_no_country_code].eql?('1'), style: 'width:auto;height:auto;float:right'
.row
.col-md-3{style: 'padding-top: 25px;float:right;'}
%button.btn.btn-primary %button.btn.btn-primary
&nbsp; &nbsp;
%span.glyphicon.glyphicon-search %span.glyphicon.glyphicon-search