Lines 78-87
sub shelfpage {
Link Here
|
78 |
|
78 |
|
79 |
$shelflimit = ( $type eq 'opac' ? C4::Context->preference('OPACnumSearchResults') : C4::Context->preference('numSearchResults') ); |
79 |
$shelflimit = ( $type eq 'opac' ? C4::Context->preference('OPACnumSearchResults') : C4::Context->preference('numSearchResults') ); |
80 |
$shelflimit = $shelflimit || ShelvesMax('MGRPAGE'); |
80 |
$shelflimit = $shelflimit || ShelvesMax('MGRPAGE'); |
|
|
81 |
$shelflimit = undef if $query->param('rss'); |
81 |
$shelfoffset = ( $itemoff - 1 ) * $shelflimit; # Sets the offset to begin retrieving items at |
82 |
$shelfoffset = ( $itemoff - 1 ) * $shelflimit; # Sets the offset to begin retrieving items at |
82 |
$shelveslimit = $shelflimit; # Limits number of shelves returned for a given query (row_count) |
83 |
$shelveslimit = $shelflimit; # Limits number of shelves returned for a given query (row_count) |
83 |
$shelvesoffset = ( $shelfoff - 1 ) * $shelflimit; # Sets the offset to begin retrieving shelves at (offset) |
84 |
$shelvesoffset = ( $shelfoff - 1 ) * $shelflimit; # Sets the offset to begin retrieving shelves at (offset) |
84 |
# getting the Shelves list |
85 |
|
|
|
86 |
# getting the Shelves list |
85 |
my $category = ( ( $displaymode eq 'privateshelves' ) ? 1 : 2 ); |
87 |
my $category = ( ( $displaymode eq 'privateshelves' ) ? 1 : 2 ); |
86 |
my $shelflist = GetShelves( $category, $shelveslimit, $shelvesoffset, $loggedinuser ); |
88 |
my $shelflist = GetShelves( $category, $shelveslimit, $shelvesoffset, $loggedinuser ); |
87 |
my $totshelves = C4::VirtualShelves::GetShelfCount( $loggedinuser, $category ); |
89 |
my $totshelves = C4::VirtualShelves::GetShelfCount( $loggedinuser, $category ); |
Lines 459-469
sub shelfpage {
Link Here
|
459 |
$qhash{$_} = $query->param($_) if $query->param($_); |
461 |
$qhash{$_} = $query->param($_) if $query->param($_); |
460 |
} |
462 |
} |
461 |
( scalar keys %qhash ) and $url .= '?' . join '&', map { "$_=$qhash{$_}" } keys %qhash; |
463 |
( scalar keys %qhash ) and $url .= '?' . join '&', map { "$_=$qhash{$_}" } keys %qhash; |
462 |
if ( $shelfnumber && $totitems ) { |
464 |
if ( $shelflimit ) { |
463 |
$template->param( pagination_bar => pagination_bar( $url, ( int( $totitems / $shelflimit ) ) + ( ( $totitems % $shelflimit ) > 0 ? 1 : 0 ), $itemoff, "itemoff" ) ); |
465 |
if ( $shelfnumber && $totitems ) { |
464 |
} elsif ( $totshelves ) { |
466 |
$template->param( pagination_bar => pagination_bar( $url, ( int( $totitems / $shelflimit ) ) + ( ( $totitems % $shelflimit ) > 0 ? 1 : 0 ), $itemoff, "itemoff" ) ); |
465 |
$template->param( |
467 |
} elsif ( $totshelves ) { |
466 |
pagination_bar => pagination_bar( $url, ( int( $totshelves / $shelveslimit ) ) + ( ( $totshelves % $shelveslimit ) > 0 ? 1 : 0 ), $shelfoff, "shelfoff" ) ); |
468 |
$template->param( |
|
|
469 |
pagination_bar => pagination_bar( $url, ( int( $totshelves / $shelveslimit ) ) + ( ( $totshelves % $shelveslimit ) > 0 ? 1 : 0 ), $shelfoff, "shelfoff" ) ); |
470 |
} |
467 |
} |
471 |
} |
468 |
$template->param( |
472 |
$template->param( |
469 |
shelveslooppriv => \@shelveslooppriv, |
473 |
shelveslooppriv => \@shelveslooppriv, |
470 |
- |
|
|