Lines 249-255
sub shelfpage {
Link Here
|
249 |
my $items; |
249 |
my $items; |
250 |
my $tag_quantity; |
250 |
my $tag_quantity; |
251 |
my $sortfield = ( $sorton ? $sorton : 'title' ); |
251 |
my $sortfield = ( $sorton ? $sorton : 'title' ); |
252 |
( $items, $totitems ) = GetShelfContents( $shelfnumber, $shelflimit, $shelfoffset, $sortfield ); |
252 |
$sortfield = $query->param('sort') || $sortfield; ## Passed in sorting overrides default sorting |
|
|
253 |
my $direction = $query->param('direction'); |
254 |
( $items, $totitems ) = GetShelfContents( $shelfnumber, $shelflimit, $shelfoffset, $sortfield, $direction ); |
253 |
for my $this_item (@$items) { |
255 |
for my $this_item (@$items) { |
254 |
my $biblionumber = $this_item->{'biblionumber'}; |
256 |
my $biblionumber = $this_item->{'biblionumber'}; |
255 |
my $record = GetMarcBiblio($biblionumber); |
257 |
my $record = GetMarcBiblio($biblionumber); |
Lines 419-425
sub shelfpage {
Link Here
|
419 |
|
421 |
|
420 |
my $url = $type eq 'opac' ? "/cgi-bin/koha/opac-shelves.pl" : "/cgi-bin/koha/virtualshelves/shelves.pl"; |
422 |
my $url = $type eq 'opac' ? "/cgi-bin/koha/opac-shelves.pl" : "/cgi-bin/koha/virtualshelves/shelves.pl"; |
421 |
my %qhash = (); |
423 |
my %qhash = (); |
422 |
foreach (qw(display viewshelf sortfield)) { |
424 |
foreach (qw(display viewshelf sortfield sort direction)) { |
423 |
$qhash{$_} = $query->param($_) if $query->param($_); |
425 |
$qhash{$_} = $query->param($_) if $query->param($_); |
424 |
} |
426 |
} |
425 |
( scalar keys %qhash ) and $url .= '?' . join '&', map { "$_=$qhash{$_}" } keys %qhash; |
427 |
( scalar keys %qhash ) and $url .= '?' . join '&', map { "$_=$qhash{$_}" } keys %qhash; |
Lines 459-464
sub shelfpage {
Link Here
|
459 |
barshelvesloop => $barshelves, |
461 |
barshelvesloop => $barshelves, |
460 |
pubshelves => $total->{pubtotal}, |
462 |
pubshelves => $total->{pubtotal}, |
461 |
pubshelvesloop => $pubshelves, |
463 |
pubshelvesloop => $pubshelves, |
|
|
464 |
sort => $query->param('sort'), |
465 |
direction => $query->param('direction'), |
462 |
); |
466 |
); |
463 |
|
467 |
|
464 |
output_html_with_http_headers $query, $cookie, $template->output; |
468 |
output_html_with_http_headers $query, $cookie, $template->output; |