Commit fed99f56 authored by Kaspar Vollenweider's avatar Kaspar Vollenweider 👻 Committed by Kaspar
Browse files

add bootstrap pagination everywhere needed and center it

parent 1fd6f230
......@@ -51,7 +51,7 @@ class VolunteersController < ApplicationController
def seeking_clients
authorize Volunteer
@q = Volunteer.where(state: Volunteer::SEEKING_CLIENTS).ransack(params[:q])
@seeking_clients = @q.result
@seeking_clients = @q.result.paginate(page: params[:page])
end
private
......
= will_paginate @clients, renderer: BootstrapPagination::Rails
.row
.col-xs-12
h1= t('clients')
......@@ -10,6 +8,9 @@
.col-xs-4
= button_link t('need_accompanying'), need_accompanying_clients_url
.text-center
= will_paginate @clients, renderer: BootstrapPagination::Rails
= render 'columns', clients: @clients
.row
......@@ -18,4 +19,5 @@
.col-xs-4
= button_link t('need_accompanying'), need_accompanying_clients_url
= will_paginate @clients, renderer: BootstrapPagination::Rails
.text-center
= will_paginate @clients, renderer: BootstrapPagination::Rails
= will_paginate @need_accompanying, renderer: BootstrapPagination::Rails
.row
.col-xs-12
h1= t('need_accompanying')
.text-center
= will_paginate @need_accompanying, renderer: BootstrapPagination::Rails
= render 'columns', clients: @need_accompanying
= will_paginate @need_accompanying, renderer: BootstrapPagination::Rails
.text-center
= will_paginate @need_accompanying, renderer: BootstrapPagination::Rails
.text-center
= will_paginate volunteers, renderer: BootstrapPagination::Rails
.table-responsive
table.table.table-striped
thead
......@@ -21,3 +25,6 @@
tbody
= render volunteers
.text-center
= will_paginate volunteers, renderer: BootstrapPagination::Rails
......@@ -10,8 +10,6 @@
- if policy(Volunteer).destroy?
.col-xs-12= button_link t('seeking_clients'), seeking_clients_volunteers_url
= will_paginate @volunteers, renderer: BootstrapPagination::Rails
= render 'columns', volunteers: @volunteers
.row
......@@ -19,5 +17,3 @@
- if policy(Volunteer).destroy?
.col-xs-4
= button_link t('seeking_clients'), seeking_clients_volunteers_url
= will_paginate @volunteers, renderer: BootstrapPagination::Rails
......@@ -3,3 +3,4 @@
h1= t('seeking_clients')
= render 'columns', volunteers: @seeking_clients
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment