fixed admin pagination

This commit is contained in:
dinsmol 2021-07-29 15:26:44 +03:00
parent f81c06673c
commit 11029e83ce
25 changed files with 126 additions and 15 deletions

View file

@ -46,5 +46,8 @@
%td{class: 'text-right'}= t(:total)
%td{class: total > 0 ? 'text-success' : 'text-danger'}= total > 0 ? "+#{total} EUR" : "#{total} EUR"
.row
.col-md-12
.col-md-6
= paginate @account_activities
.col-md-6.text-right
.pagination
= t(:result_count, count: @count)

View file

@ -1,6 +1,7 @@
- content_for :actions do
= link_to(t('.new_btn'), new_admin_admin_user_path, class: 'btn btn-primary')
= render 'shared/title', name: t('.title')
= render 'application/pagination'
.row
.col-md-12
@ -27,5 +28,7 @@
- else
%td
.row
.col-md-12
.col-md-6
= paginate @admin_users
.col-md-6.text-right
= t(:result_count, count: @count)

View file

@ -2,6 +2,8 @@
<h1><%= t '.header' %></h1>
</div>
<%= render 'application/pagination' %>
<div class="row">
<div class="col-md-12">
<div class="table-responsive">
@ -29,7 +31,12 @@
</div>
<div class="row">
<div class="col-md-12">
<div class="col-md-6">
<%= paginate @api_users %>
</div>
<div class="col-md-6 text-right">
<div class="pagination">
<%= t(:result_count, count: @count) %>
</div>
</div>
</div>

View file

@ -1,6 +1,7 @@
- content_for :actions do
= link_to(t(:add), new_admin_bank_statement_path, class: 'btn btn-primary')
= render 'shared/title', name: t(:bank_statements)
= render 'application/pagination'
.row
.col-md-12
@ -28,5 +29,8 @@
- sc = 'text-danger' if x.not_binded?
%td{class: sc}= t(x.status)
.row
.col-md-12
.col-md-6
= paginate @bank_statements
.col-md-6.text-right
.pagination
= t(:result_count, count: @count)

View file

@ -2,18 +2,21 @@
<div class="form-group">
<%= f.label :status, class: 'col-sm-2 control-label' %>
<div class="col-sm-3">
<div class="col-sm-2">
<%= f.select :status, options_for_select(statuses, search.status), { include_blank: t('.all') },
class: 'form-control' %>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-8">
<%= f.label :results_per_page, class: 'col-sm-2 control-label' %>
<div class="col-md-2">
<%= text_field_tag :results_per_page, params[:results_per_page], class: 'form-control', placeholder: t(:results_per_page) %>
</div>
<div class="col-sm-3">
<%= f.submit t('.search_btn'), class: 'btn btn-primary', name: nil %>
<%= link_to t('.reset_btn'), admin_prices_path,
class: 'btn btn-default price-search-form-search-btn' %>
</div>
</div>
<% end %>

View file

@ -33,9 +33,14 @@
</table>
<div class="row">
<div class="col-md-12">
<div class="col-md-6">
<%= paginate @prices %>
</div>
<div class="col-md-6 text-right">
<div class="pagination">
<%= t(:result_count, count: @count) %>
</div>
</div>
</div>
<% else %>
<div class="alert alert-info"><%= t '.not_found' %></div>

View file

@ -1,5 +1,7 @@
<h1>Bounced Mail Addresses</h1>
<%= render 'application/pagination' %>
<div class="row">
<div class="row">
<div class="col-md-12">
@ -34,3 +36,13 @@
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<%= paginate @bounced_mail_addresses %>
</div>
<div class="col-md-6 text-right">
<div class="pagination">
<%= t(:result_count, count: @count) %>
</div>
</div>
</div>

View file

@ -11,6 +11,7 @@
</div>
<% if @zones.present? %>
<%= render 'application/pagination' %>
<table class="table table-hover table-bordered table-wrapped">
<thead>
<tr>
@ -26,3 +27,13 @@
<% else %>
<div class="alert alert-info"><%= t '.not_found' %></div>
<% end %>
<div class="row">
<div class="col-md-6">
<%= paginate @zones %>
</div>
<div class="col-md-6 text-right">
<div class="pagination">
<%= t(:result_count, count: @count) %>
</div>
</div>
</div>

View file

@ -46,6 +46,9 @@
.col-md-12
%hr
= paginate @epp_logs
.pull-right
.pagination
= t(:result_count, count: @count) if @count > 0
.table-responsive
%table.table.table-hover.table-bordered.table-condensed
%thead
@ -69,3 +72,6 @@
.row
.col-md-12
= paginate @epp_logs
.pull-right
.pagination
= t(:result_count, count: @count)

View file

@ -1,6 +1,8 @@
- content_for :actions do
= link_to(t(:add), new_admin_invoice_path, class: 'btn btn-primary')
= render 'shared/title', name: t(:invoices)
= render 'application/pagination'
.row
.col-md-12
.table-responsive
@ -32,5 +34,8 @@
- else
%td.text-danger= t(:unpaid)
.row
.col-md-12
.col-md-6
= paginate @invoices
.col-md-6.text-right
.pagination
= t(:result_count, count: @count)

View file

@ -10,6 +10,8 @@
</div>
</div>
<%= render 'application/pagination' %>
<div class="row">
<div class="col-md-12">
<div class="table-responsive">
@ -62,7 +64,12 @@
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="col-md-6">
<%= paginate @registrars %>
</div>
<div class="col-md-6 text-right">
<div class="pagination">
<%= t(:result_count, count: @count) %>
</div>
</div>
</div>

View file

@ -43,6 +43,10 @@
%hr
.row
.col-md-12
= paginate @repp_logs
.pull-right
.pagination
= t(:result_count, count: @count) if @count > 0
.table-responsive
%table.table.table-hover.table-bordered.table-condensed
%thead
@ -66,3 +70,6 @@
.row
.col-md-12
= paginate @repp_logs
.pull-right
.pagination
= t(:result_count, count: @count)

View file

@ -0,0 +1,17 @@
<%= search_form_for([:admin, @q], html: { class: 'form-horizontal', autocomplete: 'off' }) do |f| %>
<div class="pull-right">
<div class=".text-right">
<div class="form-inline">
<%= label_tag t(:results_per_page) %>
<%= text_field_tag :results_per_page, params[:results_per_page], class: 'form-control', placeholder: t(:results_per_page) %>
<button class="btn btn-primary" align="right">
&nbsp;
<span class="glyphicon glyphicon-ok push-right"></span>
&nbsp;
</button>
</div>
</div>
</div>
<% end %>
<div class="row form-group"></div>