Bugzilla – Attachment 67672 Details for
Bug 18008
Use templates for generating pagination in intranet
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18008: Make pagination generated in templates
Bug-18008-Make-pagination-generated-in-templates.patch (text/plain), 22.63 KB, created by
Josef Moravec
on 2017-10-06 07:18:16 UTC
(
hide
)
Description:
Bug 18008: Make pagination generated in templates
Filename:
MIME Type:
Creator:
Josef Moravec
Created:
2017-10-06 07:18:16 UTC
Size:
22.63 KB
patch
obsolete
>From 670290ea3168528b0dc38848fd9be28a5fb48be9 Mon Sep 17 00:00:00 2001 >From: Josef Moravec <josef.moravec@gmail.com> >Date: Wed, 1 Feb 2017 09:42:20 +0000 >Subject: [PATCH] Bug 18008: Make pagination generated in templates > >It generates pagination in bootstrap style (as bug 18005 also do) > >Modified pages: >acqui/neworderbiblio.pl >authorities/authorities-home.pl >cataloguing/addbooks.pl >cataloguing/value_builder/marc21_linking_section.pl >cataloguing/value_builder/unimarc_field_210c.pl >cataloguing/value_builder/unimarc_field_4XX.pl >reports/guided_reports.pl >reviews/reviewswaiting.pl >tags/review.pl >virtualshelves/shelves.pl > >Test plan: >0) Apply the patch >1) go through pages from the list above/use cataloguing plugins, and >make the data to be big enough for pagination >2) confirm that pagination looks nice and behave correctly >3) git grep pagination_bar > should return just C4/Output.pm and opac templates (I'll deal with it > on another bugs) >--- > acqui/neworderbiblio.pl | 8 ++- > authorities/authorities-home.pl | 11 ++-- > cataloguing/addbooks.pl | 9 +++- > .../value_builder/marc21_linking_section.pl | 8 --- > cataloguing/value_builder/unimarc_field_210c.pl | 13 ++--- > cataloguing/value_builder/unimarc_field_4XX.pl | 8 --- > .../intranet-tmpl/prog/en/includes/pagination.inc | 60 ++++++++++++++++++++++ > .../prog/en/modules/acqui/neworderbiblio.tt | 4 +- > .../prog/en/modules/admin/matching-rules.tt | 2 - > .../prog/en/modules/admin/patron-attr-types.tt | 2 - > .../en/modules/authorities/searchresultlist.tt | 4 +- > .../prog/en/modules/cataloguing/addbooks.tt | 2 +- > .../value_builder/unimarc_field_210c.tt | 10 ++-- > .../en/modules/reports/guided_reports_start.tt | 3 +- > .../prog/en/modules/reviews/reviewswaiting.tt | 4 +- > .../intranet-tmpl/prog/en/modules/tags/review.tt | 8 ++- > .../prog/en/modules/virtualshelves/shelves.tt | 5 +- > reports/guided_reports.pl | 10 +++- > reviews/reviewswaiting.pl | 9 +++- > tags/review.pl | 15 ++++-- > virtualshelves/shelves.pl | 12 +++-- > 21 files changed, 143 insertions(+), 64 deletions(-) > create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/pagination.inc > >diff --git a/acqui/neworderbiblio.pl b/acqui/neworderbiblio.pl >index 2e65569..a13c11d 100755 >--- a/acqui/neworderbiblio.pl >+++ b/acqui/neworderbiblio.pl >@@ -144,6 +144,12 @@ foreach my $r (@{$budgets}) { > last; > } > >+my $pagination = { >+ base_url => "/cgi-bin/koha/acqui/neworderbiblio.pl?q=$query&booksellerid=$booksellerid&basketno=$basketno&page=", >+ pages => getnbpages( $total_hits, $results_per_page ), >+ current_page => $page, >+}; >+ > $template->param( > has_budgets => $has_budgets, > basketno => $basketno, >@@ -152,7 +158,7 @@ $template->param( > resultsloop => \@results, > total => $total_hits, > query => $query, >- pagination_bar => pagination_bar( "/cgi-bin/koha/acqui/neworderbiblio.pl?q=$query&booksellerid=$booksellerid&basketno=$basketno&", getnbpages( $total_hits, $results_per_page ), $page, 'page' ), >+ pagination => $pagination, > ); > > # BUILD THE TEMPLATE >diff --git a/authorities/authorities-home.pl b/authorities/authorities-home.pl >index d9c5ac8..01ec38e 100755 >--- a/authorities/authorities-home.pl >+++ b/authorities/authorities-home.pl >@@ -188,11 +188,14 @@ if ( $op eq "do_search" ) { > > $template->param( result => $results ) if $results; > >+ my $pagination = { >+ base_url => "$base_url&startfrom=", >+ pages => getnbpages( $total, $resultsperpage ), >+ current_page => $startfrom, >+ }; >+ > $template->param( >- pagination_bar => pagination_bar( >- $base_url, int( $total / $resultsperpage ) + 1, >- $startfrom, 'startfrom' >- ), >+ pagination => $pagination, > total => $total, > from => $from, > to => $to, >diff --git a/cataloguing/addbooks.pl b/cataloguing/addbooks.pl >index 1d52bb8..3ab48c68 100755 >--- a/cataloguing/addbooks.pl >+++ b/cataloguing/addbooks.pl >@@ -90,11 +90,18 @@ if ($query) { > # SimpleSearch() give the results per page we want, so 0 offet here > my $total = @{$marcresults}; > my @newresults = searchResults( 'intranet', $query, $total, $results_per_page, 0, 0, $marcresults ); >+ >+ my $pagination = { >+ base_url => "/cgi-bin/koha/cataloguing/addbooks.pl?q=$query&page=", >+ pages => getnbpages( $total_hits, $results_per_page ), >+ current_page => $page, >+ }; >+ > $template->param( > total => $total_hits, > query => $query, > resultsloop => \@newresults, >- pagination_bar => pagination_bar( "/cgi-bin/koha/cataloguing/addbooks.pl?q=$query&", getnbpages( $total_hits, $results_per_page ), $page, 'page' ), >+ pagination => $pagination, > ); > } > >diff --git a/cataloguing/value_builder/marc21_linking_section.pl b/cataloguing/value_builder/marc21_linking_section.pl >index 0fb9b7b..c4aca0d 100755 >--- a/cataloguing/value_builder/marc21_linking_section.pl >+++ b/cataloguing/value_builder/marc21_linking_section.pl >@@ -274,14 +274,6 @@ my $launcher = sub { > # foreach my $sort (@sort_by){ > # $link.="&sort_by=".$sort."&"; > # } >- # $template->param( >- # pagination_bar => pagination_bar( >- # $link, >- # getnbpages($hits, $results_per_page), >- # $page, >- # 'page' >- # ), >- # ); > $template->param( > result => \@arrayresults, > index => scalar $query->param('index') . "", >diff --git a/cataloguing/value_builder/unimarc_field_210c.pl b/cataloguing/value_builder/unimarc_field_210c.pl >index fe9f19a..82c22c1 100755 >--- a/cataloguing/value_builder/unimarc_field_210c.pl >+++ b/cataloguing/value_builder/unimarc_field_210c.pl >@@ -137,6 +137,12 @@ my ($input) = @_; > > $template->param(result => $results) if $results; > $template->param('index' => scalar $query->param('index')); >+ >+ my $pagination = { >+ base_url => "$link&startfrom=", >+ pages => getnbpages($total, $resultsperpage), >+ current_page => $startfrom, >+ }; > $template->param(startfrom=> $startfrom, > displaynext=> $displaynext, > displayprev=> $displayprev, >@@ -149,12 +155,7 @@ my ($input) = @_; > numbers=>\@numbers, > authtypecode =>$authtypecode, > resultstring =>$value[0], >- pagination_bar => pagination_bar( >- $link, >- getnbpages($total, $resultsperpage), >- $startfrom, >- 'startfrom' >- ), >+ pagination => $pagination, > ); > } else { > ($template, $loggedinuser, $cookie) >diff --git a/cataloguing/value_builder/unimarc_field_4XX.pl b/cataloguing/value_builder/unimarc_field_4XX.pl >index c514349..a6cbd44 100755 >--- a/cataloguing/value_builder/unimarc_field_4XX.pl >+++ b/cataloguing/value_builder/unimarc_field_4XX.pl >@@ -476,14 +476,6 @@ sub plugin { > # foreach my $sort (@sort_by){ > # $link.="&sort_by=".$sort."&"; > # } >-# $template->param( >-# pagination_bar => pagination_bar( >-# $link, >-# getnbpages($hits, $results_per_page), >-# $page, >-# 'page' >-# ), >-# ); > $template->param( > result => \@arrayresults, > index => scalar $query->param('index') . "", >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/pagination.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/pagination.inc >new file mode 100644 >index 0000000..5a25ddb >--- /dev/null >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/pagination.inc >@@ -0,0 +1,60 @@ >+[%# this is template for generating pagination %] >+[%# it needed an array named "pagination" with this structure: %] >+[%# pagination.pages => total number of pages %] >+[%# pagination.base_url => url with all needed parameters and with parameter specifiyng page at the end %] >+[%# pagination.current_page => number of current active page %] >+ >+[% IF pagination && ( pagination.pages > 1 ) %] >+ >+<nav><ul class="pagination"> >+[% IF pagination.current_page != 1 %] >+ <li><a href="[% pagination.base_url %][% pagination.current_page - 1 %]">« Previous</a></li> >+[% END %] >+ >+[% IF pagination.pages > 8 %] >+ [% start_page = pagination.current_page - 3 %] >+ [% end_page = pagination.current_page + 4 %] >+ [% IF start_page < 1 %] >+ [% start_page = 1 %] >+ [% end_page = 8 %] >+ [% END %] >+ [% IF end_page > pagination.pages %] >+ [% start_page = pagination.pages - 7 %] >+ [% end_page = pagination.pages %] >+ [% END %] >+[% ELSE %] >+ [% start_page = 1 %] >+ [% end_page = pagination.pages %] >+[% END %] >+ >+[% IF start_page > 1 %] >+ <li><a href="[% pagination.base_url %]1">1</a></li> >+ [% IF start_page != 2 %] >+ <li class="disabled"><span>…</span></li> >+ [% END %] >+[% END %] >+ >+[% page_number = start_page %] >+[% WHILE page_number <= end_page %] >+ [% IF page_number == pagination.current_page %] >+ <li class="active"><a href="[% pagination.base_url %][% page_number %]">[% page_number %]</a></li> >+ [% ELSE %] >+ <li><a href="[% pagination.base_url %][% page_number %]">[% page_number %]</a></li> >+ [% END %] >+ [% page_number = page_number + 1 %] >+[% END %] >+ >+[% IF end_page < pagination.pages %] >+ [% IF end_page != pagination.pages - 1 %] >+ <li class="disabled"><span>…</span></li> >+ [% END %] >+ <li><a href="[% pagination.base_url %][% pagination.pages %]">[% pagination.pages %]</a></li> >+[% END %] >+ >+[% IF pagination.current_page != pagination.pages %] >+ <li><a href="[% pagination.base_url %][% pagination.current_page + 1 %]">Next »</a></li> >+[% END %] >+ >+</ul></nav> >+ >+[% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderbiblio.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderbiblio.tt >index 3796d18..90e67d9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderbiblio.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderbiblio.tt >@@ -45,8 +45,8 @@ > > > [% IF ( total ) %] >-<b>[% total %] results found </b> >-<div class="pages">[% pagination_bar %]</div> >+ <b>[% total %] results found </b> >+ [% INCLUDE 'pagination.inc' %] > [% ELSE %] > <h3> No results found</h3> > <p> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/matching-rules.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/matching-rules.tt >index 6c15b2b..d9c21f1 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/matching-rules.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/matching-rules.tt >@@ -611,8 +611,6 @@ function CheckRuleForm(f) { > [% END %] > </table>[% ELSE %]<p>There are no saved matching rules.</p>[% END %] > >-<div class="pages">[% pagination_bar %]</div> >- > [% END %] > [% IF ( matching_rule_form ) %] > <div id="mp_template" class="matchgroup" style="display:none;"> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tt >index cfbbf2c..d2027e9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tt >@@ -303,8 +303,6 @@ $(document).ready(function() { > <p>There are no saved patron attribute types.</p> > [% END %] > >-<div class="pages">[% pagination_bar %]</div> >- > [% END %] > > </div> >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 76e4589..fed37e5 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist.tt >@@ -58,7 +58,7 @@ function searchauthority() { > > <div id="merge_in_progress"></div> > [% IF ( total ) %] >-<div class="pages">[% pagination_bar %]</div> >+[% INCLUDE 'pagination.inc' %] > > <p id="authorities_searchresultlist_current_page_info"> > Results [% from %] to [% to %] of [% total %] >@@ -108,7 +108,7 @@ function searchauthority() { > </table> > </div> > >-<div class="pages">[% pagination_bar %]</div> >+[% INCLUDE 'pagination.inc' %] > > [% ELSE %] > No results found >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt >index d6d39d8..f2bced1 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt >@@ -134,7 +134,7 @@ > [% total %] result(s) found in catalog, > <a href="#searchresult-breeding">[% breeding_count %] result(s) found in reservoir</a> > </div> >-<div class="pages">[% pagination_bar %]</div> >+[% INCLUDE 'pagination.inc' %] > <div class="searchresults"> > <table> > <tr> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_210c.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_210c.tt >index 043e700..729491e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_210c.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_210c.tt >@@ -40,9 +40,8 @@ > </form> > [% IF ( total ) %] > <h3>Authority search results</h3> >- <div class="pages"> >- [% pagination_bar %] >- </div>[% END %] >+ [% INCLUDE 'pagination.inc' %] >+ [% END %] > <p> > [% IF ( total ) %] > <b>Results [% from %] to [% to %] of [% total %]</b><br /><br /> >@@ -73,9 +72,8 @@ > </div> > [% END %] > >- [% IF ( total ) %]<div class="pages"> >- [% pagination_bar %] >- </div> >+ [% IF ( total ) %] >+ [% INCLUDE 'pagination.inc' %] > [% END %] > <script type="text/javascript"> > //<![CDATA[ >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt >index 5902b92..9fff218 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt >@@ -918,7 +918,8 @@ canned reports and writing custom SQL reports.</p> > </select> > </form> > >-<div class="pages">[% pagination_bar %]</div> >+[% INCLUDE 'pagination.inc' %] >+ > [% UNLESS ( errors ) %] > <table> > <tr>[% FOREACH header_ro IN header_row %]<th>[% header_ro.cell %]</th>[% END %]</tr> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reviews/reviewswaiting.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reviews/reviewswaiting.tt >index 5373fc3..d912518 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reviews/reviewswaiting.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reviews/reviewswaiting.tt >@@ -59,7 +59,9 @@ > </tr> > [% END %]</tbody> > </table> >- <div class="pages">[% pagination_bar %]</div> >+ >+[% INCLUDE 'pagination.inc' %] >+ > [% ELSE %] > [% IF ( status ) %]<p><b>No comments have been approved.</b></p>[% ELSE %]<p><b>No comments to moderate.</b></p>[% END %] > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt >index ffb606d..ebbdeff 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt >@@ -83,11 +83,9 @@ tr > td input,td input[type="submit"] { font-size: 85%; padding: 1px; } > [% END %] > </div> > [% END %] >- [% IF ( pagination_bar ) %] >- <div class="pages" id="pagination_top"> >- [% pagination_bar %] >- </div> >- [% END %] >+ >+ [% INCLUDE 'pagination.inc' %] >+ > [% IF ( tagloop ) %] > <p class="check"></p> > <table id="tagst"> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt >index 9dd7ea4..8f1cc3e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt >@@ -421,7 +421,7 @@ function AdjustRemark() { > [% IF itemsloop %] > > <h3>Contents of <i>[% shelf.shelfname | html %]</i></h3> >- <div class="pages">[% pagination_bar %]</div> >+ > <form action="/cgi-bin/koha/virtualshelves/shelves.pl" id="listform" method="post" class="checkboxed"> > <input type="hidden" name="op" value="remove_biblios" /> > <input type="hidden" name="referer" value="view" /> >@@ -452,6 +452,7 @@ function AdjustRemark() { > [% END %] > </div> > >+ [% INCLUDE 'pagination.inc' %] > <table id="searchresults"> > <tr> > [% IF ( itemsloop ) %]<th class="checkall"> </th>[% END %] >@@ -535,7 +536,7 @@ function AdjustRemark() { > </tr> > [% END %]<!-- /itemsloop --> > </table> >- <div class="pages">[% pagination_bar %]</div> >+ [% INCLUDE 'pagination.inc' %] > </form> > > [% END %] >diff --git a/reports/guided_reports.pl b/reports/guided_reports.pl >index bfd0a76..2bfc46c 100755 >--- a/reports/guided_reports.pl >+++ b/reports/guided_reports.pl >@@ -29,6 +29,7 @@ use C4::Auth qw/:DEFAULT get_session/; > use C4::Output; > use C4::Debug; > use C4::Context; >+use C4::Koha; > use Koha::Caches; > use C4::Log; > use Koha::DateUtils qw/dt_from_string output_pref/; >@@ -813,11 +814,16 @@ elsif ($phase eq 'Run this report'){ > } > } > >- my $totpages = int($total/$limit) + (($total % $limit) > 0 ? 1 : 0); > my $url = "/cgi-bin/koha/reports/guided_reports.pl?reports=$report_id&phase=Run%20this%20report&limit=$limit"; > if (@sql_params) { > $url = join('&sql_params=', $url, map { URI::Escape::uri_escape_utf8($_) } @sql_params); > } >+ >+ my $pagination = { >+ base_url => "$url&page=", >+ pages => getnbpages( $total, $limit ), >+ current_page => $input->param('page'), >+ }; > $template->param( > 'results' => \@rows, > 'sql' => $sql, >@@ -827,7 +833,7 @@ elsif ($phase eq 'Run this report'){ > 'name' => $name, > 'notes' => $notes, > 'errors' => defined($errors) ? [ $errors ] : undef, >- 'pagination_bar' => pagination_bar($url, $totpages, $input->param('page')), >+ 'pagination' => $pagination, > 'unlimited_total' => $total, > 'sql_params' => \@sql_params, > ); >diff --git a/reviews/reviewswaiting.pl b/reviews/reviewswaiting.pl >index 5284252..ceced7b 100755 >--- a/reviews/reviewswaiting.pl >+++ b/reviews/reviewswaiting.pl >@@ -22,6 +22,7 @@ use C4::Auth; > use C4::Output; > use C4::Context; > use C4::Biblio; >+use C4::Koha; > use Koha::Biblios; > use Koha::Patrons; > use Koha::Reviews; >@@ -79,10 +80,16 @@ foreach ( @$reviews ) { > > my $url = "/cgi-bin/koha/reviews/reviewswaiting.pl?status=$status"; > >+my $pagination = { >+ base_url => "$url&page=", >+ pages => getnbpages( $total, $count ), >+ current_page => $page, >+}; >+ > $template->param( > status => $status, > reviews => $reviews, >- pagination_bar => pagination_bar( $url, ( int( $total / $count ) ) + ( ( $total % $count ) > 0 ? 1 : 0 ), $page, "page" ) >+ pagination => $pagination, > ); > > output_html_with_http_headers $query, $cookie, $template->output; >diff --git a/tags/review.pl b/tags/review.pl >index f1484f1..7387691 100755 >--- a/tags/review.pl >+++ b/tags/review.pl >@@ -30,9 +30,10 @@ use C4::Auth qw(:DEFAULT check_cookie_auth); > use C4::Context; > use Koha::DateUtils; > # use C4::Koha; >-use C4::Output qw(:html :ajax pagination_bar); >+use C4::Output qw(:html :ajax); > use C4::Debug; > use C4::Tags qw(get_tags get_approval_rows approval_counts whitelist blacklist is_approved); >+use C4::Koha; > > my $script_name = "/cgi-bin/koha/tags/review.pl"; > my $needed_flags = { tools => 'moderate_tags' }; # FIXME: replace when more specific permission is created. >@@ -211,6 +212,13 @@ $qstring =~ s/^;+//; # remove leading delims > $qstring = "limit=$pagesize" . ($qstring ? '&' . $qstring : ''); > $debug and print STDERR "number of approval_rows: " . scalar(@$tagloop) . "rows\n"; > (scalar @errors) and $template->param(message_loop=>\@errors); >+ >+my $pagination = { >+ base_url => "$script_name?$qstring&page=", >+ pages => getnbpages( $counts->{approved_total}, $pagesize), >+ current_page => $page, >+}; >+ > $template->param( > offset => $offset, # req'd for EXPR > op => $op, >@@ -218,10 +226,7 @@ $template->param( > script_name => $script_name, > approved => 0, # dummy value (also EXPR) > tagloop => $tagloop, >- pagination_bar => pagination_bar( >- "$script_name?$qstring\&", >- ceil($counts->{approved_total}/$pagesize), # $page, 'page' >- ) >+ pagination => $pagination, > ); > > output_html_with_http_headers $input, $cookie, $template->output; >diff --git a/virtualshelves/shelves.pl b/virtualshelves/shelves.pl >index d3aea7e..1cf80cc 100755 >--- a/virtualshelves/shelves.pl >+++ b/virtualshelves/shelves.pl >@@ -303,11 +303,15 @@ if ( $op eq 'view' ) { > ); > if ( $page ) { > my $pager = $contents->pager; >+ >+ my $pagination = { >+ base_url => "?op=view&shelfnumber=" . $shelf->shelfnumber . "&sortfield=$sortfield&direction=$direction&page=", >+ pages => $pager->last_page - $pager->first_page + 1, >+ current_page => $page, >+ }; >+ > $template->param( >- pagination_bar => pagination_bar( >- q||, $pager->last_page - $pager->first_page + 1, >- $page, "page", { op => 'view', shelfnumber => $shelf->shelfnumber, sortfield => $sortfield, direction => $direction, } >- ), >+ pagination => $pagination, > ); > } > } else { >-- >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 18008
:
59769
|
63023
|
67588
|
67672
|
67717
|
73398
|
79366