Allow per page configuration domains #2122

This commit is contained in:
Martin Lensment 2015-07-30 16:01:20 +03:00
parent 4b9e082712
commit b8710b2411
3 changed files with 8 additions and 1 deletions

View file

@ -26,6 +26,8 @@ class Admin::DomainsController < AdminController
params[:q][:name_matches] = n_cache # we don't want to show wildcards in search form
end
end
@domains = @domains.per(params[:results_per_page]) if params[:results_per_page].to_i > 0
end
def show

View file

@ -34,10 +34,14 @@
= f.label t(:valid_to_until)
= f.search_field :valid_to_lteq, value: params[:q][:valid_to_lteq], class: 'form-control datepicker', placeholder: t(:valid_to_until)
.row
.col-md-9
.col-md-6
.form-group
= label_tag t(:status)
= select_tag 'q[statuses_contains]', options_for_select(DomainStatus::STATUSES, params[:q][:statuses_contains]), { multiple: true, placeholder: t(:choose), class: 'form-control js-combobox' }
.col-md-3
.form-group
= label_tag 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;'}
%button.btn.btn-primary
&nbsp;

View file

@ -890,3 +890,4 @@ en:
valid_to_until: 'Valid to until'
registrant_ident: 'Registrant ident'
contact_ident: 'Contact ident'
results_per_page: 'Results per page'