View | Details | Raw Unified | Return to bug 18008
Collapse All | Expand All

(-)a/acqui/neworderbiblio.pl (-1 / +7 lines)
Lines 144-149 foreach my $r (@{$budgets}) { Link Here
144
    last;
144
    last;
145
}
145
}
146
146
147
my $pagination = {
148
    base_url     => "/cgi-bin/koha/acqui/neworderbiblio.pl?q=$query&booksellerid=$booksellerid&basketno=$basketno&page=",
149
    pages        => getnbpages( $total_hits, $results_per_page ),
150
    current_page => $page,
151
};
152
147
$template->param(
153
$template->param(
148
    has_budgets          => $has_budgets,
154
    has_budgets          => $has_budgets,
149
    basketno             => $basketno,
155
    basketno             => $basketno,
Lines 152-158 $template->param( Link Here
152
    resultsloop          => \@results,
158
    resultsloop          => \@results,
153
    total                => $total_hits,
159
    total                => $total_hits,
154
    query                => $query,
160
    query                => $query,
155
    pagination_bar       => pagination_bar( "/cgi-bin/koha/acqui/neworderbiblio.pl?q=$query&booksellerid=$booksellerid&basketno=$basketno&", getnbpages( $total_hits, $results_per_page ), $page, 'page' ),
161
    pagination           => $pagination,
156
);
162
);
157
163
158
# BUILD THE TEMPLATE
164
# BUILD THE TEMPLATE
(-)a/authorities/authorities-home.pl (-4 / +7 lines)
Lines 188-198 if ( $op eq "do_search" ) { Link Here
188
188
189
    $template->param( result => $results ) if $results;
189
    $template->param( result => $results ) if $results;
190
190
191
    my $pagination = {
192
        base_url     => "$base_url&startfrom=",
193
        pages        => getnbpages( $total, $resultsperpage ),
194
        current_page => $startfrom,
195
    };
196
191
    $template->param(
197
    $template->param(
192
        pagination_bar => pagination_bar(
198
        pagination => $pagination,
193
            $base_url,  int( $total / $resultsperpage ) + 1,
194
            $startfrom, 'startfrom'
195
        ),
196
        total     => $total,
199
        total     => $total,
197
        from      => $from,
200
        from      => $from,
198
        to        => $to,
201
        to        => $to,
(-)a/cataloguing/addbooks.pl (-1 / +8 lines)
Lines 90-100 if ($query) { Link Here
90
    # SimpleSearch() give the results per page we want, so 0 offet here
90
    # SimpleSearch() give the results per page we want, so 0 offet here
91
    my $total = @{$marcresults};
91
    my $total = @{$marcresults};
92
    my @newresults = searchResults( 'intranet', $query, $total, $results_per_page, 0, 0, $marcresults );
92
    my @newresults = searchResults( 'intranet', $query, $total, $results_per_page, 0, 0, $marcresults );
93
94
    my $pagination = {
95
        base_url     => "/cgi-bin/koha/cataloguing/addbooks.pl?q=$query&page=",
96
        pages        => getnbpages( $total_hits, $results_per_page ),
97
        current_page => $page,
98
    };
99
93
    $template->param(
100
    $template->param(
94
        total          => $total_hits,
101
        total          => $total_hits,
95
        query          => $query,
102
        query          => $query,
96
        resultsloop    => \@newresults,
103
        resultsloop    => \@newresults,
97
        pagination_bar => pagination_bar( "/cgi-bin/koha/cataloguing/addbooks.pl?q=$query&", getnbpages( $total_hits, $results_per_page ), $page, 'page' ),
104
        pagination     => $pagination,
98
    );
105
    );
99
}
106
}
100
107
(-)a/cataloguing/value_builder/marc21_linking_section.pl (-8 lines)
Lines 274-287 my $launcher = sub { Link Here
274
        #           foreach my $sort (@sort_by){
274
        #           foreach my $sort (@sort_by){
275
        #             $link.="&sort_by=".$sort."&";
275
        #             $link.="&sort_by=".$sort."&";
276
        #           }
276
        #           }
277
        #           $template->param(
278
        #             pagination_bar => pagination_bar(
279
        #                     $link,
280
        #                     getnbpages($hits, $results_per_page),
281
        #                     $page,
282
        #                     'page'
283
        #             ),
284
        #           );
285
        $template->param(
277
        $template->param(
286
            result         => \@arrayresults,
278
            result         => \@arrayresults,
287
            index          => scalar $query->param('index') . "",
279
            index          => scalar $query->param('index') . "",
(-)a/cataloguing/value_builder/unimarc_field_210c.pl (-6 / +7 lines)
Lines 137-142 my ($input) = @_; Link Here
137
137
138
        $template->param(result => $results) if $results;
138
        $template->param(result => $results) if $results;
139
        $template->param('index' => scalar $query->param('index'));
139
        $template->param('index' => scalar $query->param('index'));
140
141
        my $pagination = {
142
            base_url     => "$link&startfrom=",
143
            pages        => getnbpages($total, $resultsperpage),
144
            current_page => $startfrom,
145
        };
140
        $template->param(startfrom=> $startfrom,
146
        $template->param(startfrom=> $startfrom,
141
                                displaynext=> $displaynext,
147
                                displaynext=> $displaynext,
142
                                displayprev=> $displayprev,
148
                                displayprev=> $displayprev,
Lines 149-160 my ($input) = @_; Link Here
149
                                numbers=>\@numbers,
155
                                numbers=>\@numbers,
150
                                authtypecode =>$authtypecode,
156
                                authtypecode =>$authtypecode,
151
                                resultstring =>$value[0],
157
                                resultstring =>$value[0],
152
                                pagination_bar => pagination_bar(
158
                                pagination => $pagination,
153
                                    $link,
154
                                    getnbpages($total, $resultsperpage),
155
                                    $startfrom,
156
                                    'startfrom'
157
                                ),
158
                                );
159
                                );
159
    } else {
160
    } else {
160
        ($template, $loggedinuser, $cookie)
161
        ($template, $loggedinuser, $cookie)
(-)a/cataloguing/value_builder/unimarc_field_4XX.pl (-8 lines)
Lines 476-489 sub plugin { Link Here
476
#           foreach my $sort (@sort_by){
476
#           foreach my $sort (@sort_by){
477
#             $link.="&sort_by=".$sort."&";
477
#             $link.="&sort_by=".$sort."&";
478
#           }
478
#           }
479
#           $template->param(
480
#             pagination_bar => pagination_bar(
481
#                     $link,
482
#                     getnbpages($hits, $results_per_page),
483
#                     $page,
484
#                     'page'
485
#             ),
486
#           );
487
        $template->param(
479
        $template->param(
488
            result         => \@arrayresults,
480
            result         => \@arrayresults,
489
            index          => scalar $query->param('index') . "",
481
            index          => scalar $query->param('index') . "",
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/pagination.inc (+62 lines)
Line 0 Link Here
1
[%
2
# this is template for generating pagination
3
# it needed an array named "pagination" with this structure:
4
#     pagination.pages => total number of pages
5
#     pagination.base_url => url with all needed parameters and with parameter specifiyng page at the end
6
#     pagination.current_page => number of current active page
7
%]
8
9
[% IF pagination && ( pagination.pages > 1 ) %]
10
11
<nav><ul class="pagination">
12
[% IF pagination.current_page != 1 %]
13
    <li><a href="[% pagination.base_url %][% pagination.current_page - 1 %]">&laquo; Previous</a></li>
14
[% END %]
15
16
[% IF pagination.pages > 8 %]
17
    [% start_page = pagination.current_page - 3 %]
18
    [% end_page = pagination.current_page + 4 %]
19
    [% IF start_page < 1 %]
20
       [% start_page = 1 %]
21
       [% end_page = 8 %]
22
    [% END %]
23
    [% IF end_page > pagination.pages %]
24
        [% start_page = pagination.pages - 7 %]
25
        [% end_page = pagination.pages %]
26
    [% END %]
27
[% ELSE %]
28
    [% start_page = 1 %]
29
    [% end_page = pagination.pages %]
30
[% END %]
31
32
[% IF start_page > 1 %]
33
    <li><a href="[% pagination.base_url %]1">1</a></li>
34
    [% IF start_page != 2 %]
35
      <li class="disabled"><span>&hellip;</span></li>
36
    [% END %]
37
[% END %]
38
39
[% page_number = start_page %]
40
[% WHILE page_number <= end_page %]
41
    [% IF page_number == pagination.current_page %]
42
        <li class="active"><a href="[% pagination.base_url %][% page_number %]">[% page_number %]</a></li>
43
    [% ELSE %]
44
        <li><a href="[% pagination.base_url %][% page_number %]">[% page_number %]</a></li>
45
    [% END %]
46
    [% page_number = page_number + 1  %]
47
[% END %]
48
49
[% IF end_page < pagination.pages %]
50
    [% IF end_page != pagination.pages - 1 %]
51
        <li class="disabled"><span>&hellip;</span></li>
52
    [% END %]
53
    <li><a href="[% pagination.base_url %][% pagination.pages %]">[% pagination.pages %]</a></li>
54
[% END %]
55
56
[% IF pagination.current_page != pagination.pages %]
57
    <li><a href="[% pagination.base_url %][% pagination.current_page + 1 %]">Next &raquo;</a></li>
58
[% END %]
59
60
</ul></nav>
61
62
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderbiblio.tt (-2 / +2 lines)
Lines 45-52 Link Here
45
45
46
46
47
[% IF ( total ) %]
47
[% IF ( total ) %]
48
<b>[% total %] results found </b> 
48
    <b>[% total %] results found </b>
49
<div class="pages">[% pagination_bar %]</div>
49
    [% INCLUDE 'pagination.inc' %]
50
[% ELSE %]
50
[% ELSE %]
51
<h3> No results found</h3>
51
<h3> No results found</h3>
52
<p>
52
<p>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/matching-rules.tt (-2 lines)
Lines 611-618 function CheckRuleForm(f) { Link Here
611
  [% END %]
611
  [% END %]
612
</table>[% ELSE %]<p>There are no saved matching rules.</p>[% END %]
612
</table>[% ELSE %]<p>There are no saved matching rules.</p>[% END %]
613
613
614
<div class="pages">[% pagination_bar %]</div>
615
616
[% END %]
614
[% END %]
617
 [% IF ( matching_rule_form ) %]
615
 [% IF ( matching_rule_form ) %]
618
<div id="mp_template" class="matchgroup" style="display:none;">
616
<div id="mp_template" class="matchgroup" style="display:none;">
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tt (-2 lines)
Lines 303-310 $(document).ready(function() { Link Here
303
  <p>There are no saved patron attribute types.</p>
303
  <p>There are no saved patron attribute types.</p>
304
[% END %]
304
[% END %]
305
305
306
<div class="pages">[% pagination_bar %]</div>
307
308
[% END %]
306
[% END %]
309
 
307
 
310
</div>
308
</div>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist.tt (-2 / +2 lines)
Lines 58-64 function searchauthority() { Link Here
58
58
59
<div id="merge_in_progress"></div>
59
<div id="merge_in_progress"></div>
60
[% IF ( total ) %]
60
[% IF ( total ) %]
61
<div class="pages">[% pagination_bar %]</div>
61
[% INCLUDE 'pagination.inc' %]
62
62
63
<p id="authorities_searchresultlist_current_page_info">
63
<p id="authorities_searchresultlist_current_page_info">
64
  Results [% from %] to [% to %] of [% total %]
64
  Results [% from %] to [% to %] of [% total %]
Lines 108-114 function searchauthority() { Link Here
108
  </table>
108
  </table>
109
</div>
109
</div>
110
110
111
<div class="pages">[% pagination_bar %]</div>
111
[% INCLUDE 'pagination.inc' %]
112
112
113
[% ELSE %]
113
[% ELSE %]
114
  No results found
114
  No results found
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt (-1 / +1 lines)
Lines 134-140 Link Here
134
    [% total %] result(s) found in catalog,
134
    [% total %] result(s) found in catalog,
135
    <a href="#searchresult-breeding">[% breeding_count %] result(s) found in reservoir</a>
135
    <a href="#searchresult-breeding">[% breeding_count %] result(s) found in reservoir</a>
136
</div>
136
</div>
137
<div class="pages">[% pagination_bar %]</div>
137
[% INCLUDE 'pagination.inc' %]
138
<div class="searchresults">
138
<div class="searchresults">
139
    <table>
139
    <table>
140
        <tr>
140
        <tr>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_210c.tt (-6 / +4 lines)
Lines 40-48 Link Here
40
        </form>
40
        </form>
41
            [% IF ( total ) %]
41
            [% IF ( total ) %]
42
            <h3>Authority search results</h3>
42
            <h3>Authority search results</h3>
43
            <div class="pages">
43
            [% INCLUDE 'pagination.inc' %]
44
                          [% pagination_bar %]      
44
            [% END %]
45
                        </div>[% END %]
46
            <p>
45
            <p>
47
                [% IF ( total ) %]
46
                [% IF ( total ) %]
48
                    &nbsp;<b>Results [% from %] to [% to %] of [% total %]</b><br /><br />
47
                    &nbsp;<b>Results [% from %] to [% to %] of [% total %]</b><br /><br />
Lines 73-81 Link Here
73
        </div>
72
        </div>
74
[% END %]
73
[% END %]
75
74
76
            [% IF ( total ) %]<div class="pages">
75
            [% IF ( total ) %]
77
                          [% pagination_bar %]      
76
                [% INCLUDE 'pagination.inc' %]
78
                        </div>
79
            [% END %]
77
            [% END %]
80
<script type="text/javascript">
78
<script type="text/javascript">
81
//<![CDATA[
79
//<![CDATA[
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt (-1 / +2 lines)
Lines 918-924 canned reports and writing custom SQL reports.</p> Link Here
918
    </select>
918
    </select>
919
</form>
919
</form>
920
920
921
<div class="pages">[% pagination_bar %]</div>
921
[% INCLUDE 'pagination.inc' %]
922
922
[% UNLESS ( errors ) %]
923
[% UNLESS ( errors ) %]
923
<table>
924
<table>
924
<tr>[% FOREACH header_ro IN header_row %]<th>[% header_ro.cell %]</th>[% END %]</tr>
925
<tr>[% FOREACH header_ro IN header_row %]<th>[% header_ro.cell %]</th>[% END %]</tr>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reviews/reviewswaiting.tt (-1 / +3 lines)
Lines 59-65 Link Here
59
    </tr>
59
    </tr>
60
    [% END %]</tbody>
60
    [% END %]</tbody>
61
</table>
61
</table>
62
 <div class="pages">[% pagination_bar %]</div>
62
63
[% INCLUDE 'pagination.inc' %]
64
63
[% ELSE %]
65
[% ELSE %]
64
[% IF ( status ) %]<p><b>No comments have been approved.</b></p>[% ELSE %]<p><b>No comments to moderate.</b></p>[% END %]
66
[% IF ( status ) %]<p><b>No comments have been approved.</b></p>[% ELSE %]<p><b>No comments to moderate.</b></p>[% END %]
65
[% END %]
67
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt (-5 / +3 lines)
Lines 83-93 tr > td input,td input[type="submit"] { font-size: 85%; padding: 1px; } Link Here
83
        [% END %]
83
        [% END %]
84
  </div>
84
  </div>
85
  [% END %]
85
  [% END %]
86
  [% IF ( pagination_bar ) %]
86
87
  <div class="pages" id="pagination_top">
87
  [% INCLUDE 'pagination.inc' %]
88
  	[% pagination_bar %]
88
89
  </div>
90
  [% END %]
91
  [% IF ( tagloop ) %]
89
  [% IF ( tagloop ) %]
92
  <p class="check"></p>
90
  <p class="check"></p>
93
  <table id="tagst">
91
  <table id="tagst">
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt (-2 / +3 lines)
Lines 421-427 function AdjustRemark() { Link Here
421
    [% IF itemsloop %]
421
    [% IF itemsloop %]
422
422
423
    <h3>Contents of <i>[% shelf.shelfname | html %]</i></h3>
423
    <h3>Contents of <i>[% shelf.shelfname | html %]</i></h3>
424
    <div class="pages">[% pagination_bar %]</div>
424
425
    <form action="/cgi-bin/koha/virtualshelves/shelves.pl" id="listform" method="post" class="checkboxed">
425
    <form action="/cgi-bin/koha/virtualshelves/shelves.pl" id="listform" method="post" class="checkboxed">
426
        <input type="hidden" name="op" value="remove_biblios" />
426
        <input type="hidden" name="op" value="remove_biblios" />
427
        <input type="hidden" name="referer" value="view" />
427
        <input type="hidden" name="referer" value="view" />
Lines 452-457 function AdjustRemark() { Link Here
452
    [% END %]
452
    [% END %]
453
</div>
453
</div>
454
454
455
    [% INCLUDE 'pagination.inc' %]
455
    <table id="searchresults">
456
    <table id="searchresults">
456
            <tr>
457
            <tr>
457
                [% IF ( itemsloop ) %]<th class="checkall">&nbsp;</th>[% END %]
458
                [% IF ( itemsloop ) %]<th class="checkall">&nbsp;</th>[% END %]
Lines 535-541 function AdjustRemark() { Link Here
535
			</tr>
536
			</tr>
536
		[% END %]<!-- /itemsloop -->
537
		[% END %]<!-- /itemsloop -->
537
    </table>
538
    </table>
538
    <div class="pages">[% pagination_bar %]</div>
539
    [% INCLUDE 'pagination.inc' %]
539
</form>
540
</form>
540
541
541
	[% END %]
542
	[% END %]
(-)a/reports/guided_reports.pl (-2 / +8 lines)
Lines 29-34 use C4::Auth qw/:DEFAULT get_session/; Link Here
29
use C4::Output;
29
use C4::Output;
30
use C4::Debug;
30
use C4::Debug;
31
use C4::Context;
31
use C4::Context;
32
use C4::Koha;
32
use Koha::Caches;
33
use Koha::Caches;
33
use C4::Log;
34
use C4::Log;
34
use Koha::DateUtils qw/dt_from_string output_pref/;
35
use Koha::DateUtils qw/dt_from_string output_pref/;
Lines 813-823 elsif ($phase eq 'Run this report'){ Link Here
813
                }
814
                }
814
            }
815
            }
815
816
816
            my $totpages = int($total/$limit) + (($total % $limit) > 0 ? 1 : 0);
817
            my $url = "/cgi-bin/koha/reports/guided_reports.pl?reports=$report_id&amp;phase=Run%20this%20report&amp;limit=$limit";
817
            my $url = "/cgi-bin/koha/reports/guided_reports.pl?reports=$report_id&amp;phase=Run%20this%20report&amp;limit=$limit";
818
            if (@sql_params) {
818
            if (@sql_params) {
819
                $url = join('&amp;sql_params=', $url, map { URI::Escape::uri_escape_utf8($_) } @sql_params);
819
                $url = join('&amp;sql_params=', $url, map { URI::Escape::uri_escape_utf8($_) } @sql_params);
820
            }
820
            }
821
822
            my $pagination = {
823
                base_url     => "$url&page=",
824
                pages        => getnbpages( $total, $limit ),
825
                current_page => $input->param('page'),
826
            };
821
            $template->param(
827
            $template->param(
822
                'results' => \@rows,
828
                'results' => \@rows,
823
                'sql'     => $sql,
829
                'sql'     => $sql,
Lines 827-833 elsif ($phase eq 'Run this report'){ Link Here
827
                'name'    => $name,
833
                'name'    => $name,
828
                'notes'   => $notes,
834
                'notes'   => $notes,
829
                'errors'  => defined($errors) ? [ $errors ] : undef,
835
                'errors'  => defined($errors) ? [ $errors ] : undef,
830
                'pagination_bar'  => pagination_bar($url, $totpages, $input->param('page')),
836
                'pagination'  => $pagination,
831
                'unlimited_total' => $total,
837
                'unlimited_total' => $total,
832
                'sql_params'      => \@sql_params,
838
                'sql_params'      => \@sql_params,
833
            );
839
            );
(-)a/reviews/reviewswaiting.pl (-1 / +8 lines)
Lines 22-27 use C4::Auth; Link Here
22
use C4::Output;
22
use C4::Output;
23
use C4::Context;
23
use C4::Context;
24
use C4::Biblio;
24
use C4::Biblio;
25
use C4::Koha;
25
use Koha::Biblios;
26
use Koha::Biblios;
26
use Koha::Patrons;
27
use Koha::Patrons;
27
use Koha::Reviews;
28
use Koha::Reviews;
Lines 79-88 foreach ( @$reviews ) { Link Here
79
80
80
my $url = "/cgi-bin/koha/reviews/reviewswaiting.pl?status=$status";
81
my $url = "/cgi-bin/koha/reviews/reviewswaiting.pl?status=$status";
81
82
83
my $pagination = {
84
    base_url     => "$url&page=",
85
    pages        => getnbpages( $total, $count ),
86
    current_page => $page,
87
};
88
82
$template->param(
89
$template->param(
83
    status => $status,
90
    status => $status,
84
    reviews => $reviews,
91
    reviews => $reviews,
85
    pagination_bar => pagination_bar( $url, ( int( $total / $count ) ) + ( ( $total % $count ) > 0 ? 1 : 0 ), $page, "page" )
92
    pagination => $pagination,
86
);
93
);
87
94
88
output_html_with_http_headers $query, $cookie, $template->output;
95
output_html_with_http_headers $query, $cookie, $template->output;
(-)a/tags/review.pl (-5 / +10 lines)
Lines 30-38 use C4::Auth qw(:DEFAULT check_cookie_auth); Link Here
30
use C4::Context;
30
use C4::Context;
31
use Koha::DateUtils;
31
use Koha::DateUtils;
32
# use C4::Koha;
32
# use C4::Koha;
33
use C4::Output qw(:html :ajax pagination_bar);
33
use C4::Output qw(:html :ajax);
34
use C4::Debug;
34
use C4::Debug;
35
use C4::Tags qw(get_tags get_approval_rows approval_counts whitelist blacklist is_approved);
35
use C4::Tags qw(get_tags get_approval_rows approval_counts whitelist blacklist is_approved);
36
use C4::Koha;
36
37
37
my $script_name = "/cgi-bin/koha/tags/review.pl";
38
my $script_name = "/cgi-bin/koha/tags/review.pl";
38
my $needed_flags = { tools => 'moderate_tags' };	# FIXME: replace when more specific permission is created.
39
my $needed_flags = { tools => 'moderate_tags' };	# FIXME: replace when more specific permission is created.
Lines 211-216 $qstring =~ s/^;+//; # remove leading delims Link Here
211
$qstring = "limit=$pagesize" . ($qstring ? '&amp;' . $qstring : '');
212
$qstring = "limit=$pagesize" . ($qstring ? '&amp;' . $qstring : '');
212
$debug and print STDERR "number of approval_rows: " . scalar(@$tagloop) . "rows\n";
213
$debug and print STDERR "number of approval_rows: " . scalar(@$tagloop) . "rows\n";
213
(scalar @errors) and $template->param(message_loop=>\@errors);
214
(scalar @errors) and $template->param(message_loop=>\@errors);
215
216
my $pagination = {
217
    base_url     => "$script_name?$qstring&amp;page=",
218
    pages        => getnbpages( $counts->{approved_total}, $pagesize),
219
    current_page => $page,
220
};
221
214
$template->param(
222
$template->param(
215
	offset => $offset,	# req'd for EXPR
223
	offset => $offset,	# req'd for EXPR
216
	op => $op,
224
	op => $op,
Lines 218-227 $template->param( Link Here
218
	script_name => $script_name,
226
	script_name => $script_name,
219
	approved => 0,		# dummy value (also EXPR)
227
	approved => 0,		# dummy value (also EXPR)
220
	tagloop => $tagloop,
228
	tagloop => $tagloop,
221
	pagination_bar => pagination_bar(
229
    pagination => $pagination,
222
		"$script_name?$qstring\&amp;",
223
		ceil($counts->{approved_total}/$pagesize),	# $page, 'page'
224
	)
225
);
230
);
226
231
227
output_html_with_http_headers $input, $cookie, $template->output;
232
output_html_with_http_headers $input, $cookie, $template->output;
(-)a/virtualshelves/shelves.pl (-5 / +8 lines)
Lines 303-313 if ( $op eq 'view' ) { Link Here
303
            );
303
            );
304
            if ( $page ) {
304
            if ( $page ) {
305
                my $pager = $contents->pager;
305
                my $pager = $contents->pager;
306
307
                my $pagination = {
308
                    base_url     => "?op=view&shelfnumber=" . $shelf->shelfnumber . "&sortfield=$sortfield&direction=$direction&page=",
309
                    pages        => $pager->last_page - $pager->first_page + 1,
310
                    current_page => $page,
311
                };
312
306
                $template->param(
313
                $template->param(
307
                    pagination_bar => pagination_bar(
314
                    pagination => $pagination,
308
                        q||, $pager->last_page - $pager->first_page + 1,
309
                        $page, "page", { op => 'view', shelfnumber => $shelf->shelfnumber, sortfield => $sortfield, direction => $direction, }
310
                    ),
311
                );
315
                );
312
            }
316
            }
313
        } else {
317
        } else {
314
- 

Return to bug 18008