|
Lines 170-175
SWITCH: {
Link Here
|
| 170 |
#check that the user can view the shelf |
170 |
#check that the user can view the shelf |
| 171 |
if ( ShelfPossibleAction( $loggedinuser, $shelfnumber, 'view' ) ) { |
171 |
if ( ShelfPossibleAction( $loggedinuser, $shelfnumber, 'view' ) ) { |
| 172 |
my $items; |
172 |
my $items; |
|
|
173 |
my $authorsort; |
| 174 |
my $copyrightsort; |
| 175 |
my $sortfield = ($query->param('sortfield') ? $query->param('sortfield') : 'title'); |
| 176 |
if ($sortfield eq 'author') { |
| 177 |
$authorsort = 'author'; |
| 178 |
} |
| 179 |
if ($sortfield eq 'copyrightdate'){ |
| 180 |
$copyrightsort = 'copyrightdate'; |
| 181 |
} |
| 173 |
($items, $totitems) = GetShelfContents($shelfnumber, $shelflimit, $shelfoffset); |
182 |
($items, $totitems) = GetShelfContents($shelfnumber, $shelflimit, $shelfoffset); |
| 174 |
for my $this_item (@$items) { |
183 |
for my $this_item (@$items) { |
| 175 |
# the virtualshelfcontents table does not store these columns nor are they retrieved from the items |
184 |
# the virtualshelfcontents table does not store these columns nor are they retrieved from the items |
|
Lines 188-193
SWITCH: {
Link Here
|
| 188 |
shelfname => $shelflist->{$shelfnumber}->{'shelfname'} || $privshelflist->{$shelfnumber}->{'shelfname'}, |
197 |
shelfname => $shelflist->{$shelfnumber}->{'shelfname'} || $privshelflist->{$shelfnumber}->{'shelfname'}, |
| 189 |
shelfnumber => $shelfnumber, |
198 |
shelfnumber => $shelfnumber, |
| 190 |
viewshelf => $shelfnumber, |
199 |
viewshelf => $shelfnumber, |
|
|
200 |
authorsort => $authorsort, |
| 201 |
copyrightsort => $copyrightsort, |
| 191 |
manageshelf => $manageshelf, |
202 |
manageshelf => $manageshelf, |
| 192 |
itemsloop => $items, |
203 |
itemsloop => $items, |
| 193 |
); |
204 |
); |
|
Lines 291-297
foreach my $element (sort { lc($shelflist->{$a}->{'shelfname'}) cmp lc($shelflis
Link Here
|
| 291 |
|
302 |
|
| 292 |
my $url = $type eq 'opac' ? "/cgi-bin/koha/opac-shelves.pl" : "/cgi-bin/koha/virtualshelves/shelves.pl"; |
303 |
my $url = $type eq 'opac' ? "/cgi-bin/koha/opac-shelves.pl" : "/cgi-bin/koha/virtualshelves/shelves.pl"; |
| 293 |
my %qhash = (); |
304 |
my %qhash = (); |
| 294 |
foreach (qw(display viewshelf)) { |
305 |
foreach (qw(display viewshelf sortfield)) { |
| 295 |
$qhash{$_} = $query->param($_) if $query->param($_); |
306 |
$qhash{$_} = $query->param($_) if $query->param($_); |
| 296 |
} |
307 |
} |
| 297 |
(scalar keys %qhash) and $url .= '?' . join '&', map {"$_=$qhash{$_}"} keys %qhash; |
308 |
(scalar keys %qhash) and $url .= '?' . join '&', map {"$_=$qhash{$_}"} keys %qhash; |