Bugzilla – Attachment 49385 Details for
Bug 13464
Standardize the pagination class
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13464 - Standardize the pagination class
Bug-13464---Standardize-the-pagination-class.patch (text/plain), 7.36 KB, created by
Owen Leonard
on 2016-03-21 13:55:32 UTC
(
hide
)
Description:
Bug 13464 - Standardize the pagination class
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2016-03-21 13:55:32 UTC
Size:
7.36 KB
patch
obsolete
>From a2f19d064341e5b9a6daef6f9407ee2100ea9983 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Mon, 21 Mar 2016 09:32:39 -0400 >Subject: [PATCH] Bug 13464 - Standardize the pagination class >Content-Type: text/plain; charset="utf-8" > >There are a few template which use a different wrapper class for the >pagination links. These should be made consistent for a consistent >style. > >To test, apply the patch and go to Administration -> Budgets. > >- On this page the pagination markup has been removed in favor of > DataTables pagination. The budget tables were already sorted using > DataTables, so having server-side pagination on top of that doesn't > make sense. > >In Administration -> Class sources: > >- This page had pagination markup which was unused. > >In Authorities -> Authority search results: > >- Perform an authority search which will return more than one page of >results. Confirm that the pagination links are correctly styled. > >In Search -> Item search: > >- Perform a search which will return more than one page of results. >Confirm that the pagination links are correctly styled. >--- > admin/aqbudgetperiods.pl | 19 +++---------------- > .../prog/en/modules/admin/aqbudgetperiods.tt | 10 +++------- > .../prog/en/modules/admin/classsources.tt | 3 --- > .../prog/en/modules/authorities/searchresultlist.tt | 2 +- > .../prog/en/modules/catalogue/itemsearch.tt | 2 +- > 5 files changed, 8 insertions(+), 28 deletions(-) > >diff --git a/admin/aqbudgetperiods.pl b/admin/aqbudgetperiods.pl >index 653f916..2800a98 100755 >--- a/admin/aqbudgetperiods.pl >+++ b/admin/aqbudgetperiods.pl >@@ -75,8 +75,6 @@ my $budget_period_hashref = { map { join(' ',@columns) =~ /$_/ ? ( $_ => $input- > $budget_period_hashref->{budget_period_startdate} = dt_from_string( $input->param('budget_period_startdate') ); > $budget_period_hashref->{budget_period_enddate} = dt_from_string( $input->param('budget_period_enddate') ); > >-my $activepagesize = 20; >-my $inactivepagesize = 20; > $searchfield =~ s/\,//g; > > my ($template, $borrowernumber, $cookie, $staff_flags ) = get_template_and_user( >@@ -261,18 +259,14 @@ my $results = GetBudgetPeriods( > { budget_period_active => 1 }, > { -asc => 'budget_period_description' }, > ); >-my $first = ( $activepage - 1 ) * $activepagesize; >-my $last = min( $first + $activepagesize - 1, scalar @{$results} - 1, ); >+ > my @period_active_loop; > >-foreach my $result ( @{$results}[ $first .. $last ] ) { >+foreach my $result ( @{$results} ) { > my $budgetperiod = $result; > $budgetperiod->{budget_active} = 1; > push( @period_active_loop, $budgetperiod ); > } >-my $url = "aqbudgetperiods.pl"; >-$url .= "?ipage=$inactivepage" if($inactivepage != 1); >-my $active_pagination_bar = pagination_bar ($url, getnbpages( scalar(@$results), $activepagesize), $activepage, "apage"); > > # Get inactive budget periods > $results = GetBudgetPeriods( >@@ -280,17 +274,12 @@ $results = GetBudgetPeriods( > { -desc => 'budget_period_enddate' }, > ); > >-$first = ( $inactivepage - 1 ) * $inactivepagesize; >-$last = min( $first + $inactivepagesize - 1, scalar @{$results} - 1, ); > my @period_inactive_loop; >-foreach my $result ( @{$results}[ $first .. $last ] ) { >+foreach my $result ( @{$results} ) { > my $budgetperiod = $result; > $budgetperiod->{budget_active} = 1; > push( @period_inactive_loop, $budgetperiod ); > } >-$url = "aqbudgetperiods.pl?tab=2"; >-$url .= "&apage=$activepage" if($activepage != 1); >-my $inactive_pagination_bar = pagination_bar ($url, getnbpages( scalar(@$results), $inactivepagesize), $inactivepage, "ipage"); > > my $branchloop = C4::Branch::GetBranchesLoop(); > >@@ -298,8 +287,6 @@ my $tab = $input->param('tab') ? $input->param('tab') - 1 : 0; > $template->param( > period_active_loop => \@period_active_loop, > period_inactive_loop => \@period_inactive_loop, >- active_pagination_bar => $active_pagination_bar, >- inactive_pagination_bar => $inactive_pagination_bar, > tab => $tab, > branchloop => $branchloop, > ); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tt >index 27f3247..e58a21d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tt >@@ -112,13 +112,11 @@ > tabs.tabs("option", "active", [% tab %]); > [% END %] > $("#activeperiodst,#inactiveperiodst").dataTable($.extend(true, {}, dataTablesDefaults, { >- "sDom": 't', >- "aaSorting": [], > "aoColumnDefs": [ > { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false }, > { "sType": "title-string", "aTargets" : [ "title-string" ] } > ], >- "bPaginate": false, >+ "sPaginationType": "four_button", > 'bAutoWidth': false > } ) ); > >@@ -169,8 +167,8 @@ > ], > 'bSort': true, > 'aaSortingFixed': [[ 1, 'asc' ]], >- 'bPaginate': false, >- "bAutoWidth": false >+ "bAutoWidth": false, >+ "sPaginationType": "full_numbers" > })); > [% END %] > }); >@@ -573,7 +571,6 @@ > [% ELSE %] > No active budgets > [% END %] >- <div class="paginationBar">[% active_pagination_bar %]</div> > </div> > <div id="inactive"> > [% IF ( period_inactive_loop ) %] >@@ -606,7 +603,6 @@ > [% ELSE %] > No inactive budgets > [% END %] >- <div class="pages">[% inactive_pagination_bar %]</div> > </div> > </div> > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/classsources.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/classsources.tt >index c9c63a8..d0a5741 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/classsources.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/classsources.tt >@@ -265,8 +265,6 @@ function CheckRuleForm(f) { > [% END %] > </table> > >-<div class="pages">[% pagination_bar %]</div> >- > <h2>Classification filing rules</h2> > [% IF ( added_rule ) %] > <div class="dialog message">Added filing rule [% added_rule %]</div> >@@ -296,7 +294,6 @@ function CheckRuleForm(f) { > </tr> > [% END %] > </table> >-<div class="paginationBar">[% pagination_bar %]</div> > > [% END %] > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist.tt >index e6bd923..18cea64 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist.tt >@@ -96,7 +96,7 @@ function searchauthority() { > </table> > </div> > >-<div class="paginationBar">[% pagination_bar %]</div> >+<div class="pages">[% pagination_bar %]</div> > > [% ELSE %] > No results found >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt >index bc1ffb9..15cbb91 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt >@@ -459,7 +459,7 @@ > [% INCLUDE 'catalogue/itemsearch_items.inc' items = results %] > [% END %] > >- <div id="pagination-bar"> >+ <div class="pages"> > [% pagination_bar %] > </div> > >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 13464
:
49385
|
49435
|
49465