return Apache2::Const::OK
unless $self->cgi->request_method eq 'POST';
- # some setting values from the form don't match the
- # required value/format for the db, so they have to be
- # individually translated.
-
my %settings;
my $set_map = $self->ctx->{user_setting_map};
$ctx->{bookbags_offset} = $offset;
# for list item pagination
- my $itemLimit = $self->_get_items_per_page;
- my $itemPage = $self->cgi->param('itemPage') || 1;
- my $itemOffset = ($itemPage - 1) * $itemLimit;
- $ctx->{bookbags_itemPage} = $itemPage;
+ my $item_limit = $self->_get_items_per_page;
+ my $item_page = $self->cgi->param('item_page') || 1;
+ my $item_offset = ($item_page - 1) * $item_limit;
+ $ctx->{bookbags_item_page} = $item_page;
my ($sorter, $modifier) = $self->_get_bookbag_sort_params("sort");
$e->xact_begin; # replication...
$ctx->{bb_item_count} = $ctx->{bb_item_count} + $ebook_r->[0]->{'count'};
#calculate page count
- $ctx->{bb_page_count} = int ((($ctx->{bb_item_count} - 1) / $itemLimit) + 1);
+ $ctx->{bb_page_count} = int ((($ctx->{bb_item_count} - 1) / $item_limit) + 1);
if ( ($self->cgi->param("action") || '') eq "editmeta") {
if (!$self->_update_bookbag_metadata($bookbag)) {
# For list items pagination
my $args = {
- "limit" => $itemLimit,
- "offset" => $itemOffset
+ "limit" => $item_limit,
+ "offset" => $item_offset
};
my $items = $U->bib_container_items_via_search($bookbag->id, $query, $args)
myopac_page = "lists"
limit = ctx.bookbags_limit;
offset = ctx.bookbags_offset;
- itemPage = ctx.bookbags_itemPage;
+ item_page = ctx.bookbags_item_page;
%]
<div id='myopac_bookbag_div' style="padding:5px;">
<div class="bookbag-controls most">
[% baseurl = ctx.opac_root _ '/myopac/lists';
IF bbag.id != CGI.param("bbid");
- url = mkurl(baseurl,{bbid => bbag.id, itemPage => 1},['edit_notes','sort']);
+ url = mkurl(baseurl,{bbid => bbag.id, item_page => 1},['edit_notes','sort']);
ltitle = l("Show items in list");
ELSE;
url = mkurl(baseurl, {}, ['bbid', 'edit_notes', 'sort']);
<div class="header_middle" style="padding-top:7px;">
<span class="float-left" style="padding-left:34px;">[% l('Navigate Selected List ') %]</span>
<span class='float-left' style='padding-left: 10px;'>
- [%- IF itemPage > 1 -%]
+ [%- IF item_page > 1 -%]
<a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
- itemPage => itemPage - 1
+ item_page => item_page - 1
}) %]'><span class="nav_arrow_fix">◄</span>[% l('Previous') %]</a>
[%- END; -%]
- [%- IF (itemPage - 3) >= 1 -%]
+ [%- IF (item_page - 3) >= 1 -%]
<a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
- itemPage => itemPage - 3
- }) %]'>[% itemPage - 3 %]</a>
+ item_page => item_page - 3
+ }) %]'>[% item_page - 3 %]</a>
[%- END; -%]
- [%- IF (itemPage - 2) >= 1 -%]
+ [%- IF (item_page - 2) >= 1 -%]
<a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
- itemPage => itemPage - 2
- }) %]'>[% itemPage - 2 %]</a>
+ item_page => item_page - 2
+ }) %]'>[% item_page - 2 %]</a>
[%- END; -%]
- [%- IF (itemPage - 1) >= 1 -%]
+ [%- IF (item_page - 1) >= 1 -%]
<a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
- itemPage => itemPage - 1
- }) %]'>[% itemPage - 1%]</a>
+ item_page => item_page - 1
+ }) %]'>[% item_page - 1%]</a>
[%- END; -%]
- <span style="color:red;" >[% itemPage %]</span>
- [%- IF (itemPage + 1) <= ctx.bb_page_count -%]
+ <span class="bookbag-paginator-selected" >[% item_page %]</span>
+ [%- IF (item_page + 1) <= ctx.bb_page_count -%]
<a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
- itemPage => itemPage + 1
- }) %]'>[% itemPage + 1 %]</a>
+ item_page => item_page + 1
+ }) %]'>[% item_page + 1 %]</a>
[%- END; -%]
- [%- IF (itemPage + 2) <= ctx.bb_page_count -%]
+ [%- IF (item_page + 2) <= ctx.bb_page_count -%]
<a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
- itemPage => itemPage + 2
- }) %]'>[% itemPage + 2 %]</a>
+ item_page => item_page + 2
+ }) %]'>[% item_page + 2 %]</a>
[%- END; -%]
- [%- IF (itemPage + 3) <= ctx.bb_page_count -%]
+ [%- IF (item_page + 3) <= ctx.bb_page_count -%]
<a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
- itemPage => itemPage + 3
- }) %]'>[% itemPage + 3 %]</a>
+ item_page => item_page + 3
+ }) %]'>[% item_page + 3 %]</a>
[%- END; -%]
- [%- IF (itemPage + 1) <= ctx.bb_page_count; -%]
+ [%- IF (item_page + 1) <= ctx.bb_page_count; -%]
<a href='[% mkurl(ctx.opac_root _ '/myopac/lists', {
- itemPage => itemPage + 1
+ item_page => item_page + 1
}) %]'>[% l('Next') %]<span class="nav_arrow_fix">►</span></a>
[%- END; -%]
</span>