@@ -, +, @@ public lists - correcting unescaped ampersand in the template - making conditional a check on a variable that doesn't always exist, causing noisy errors in the log --- C4/VirtualShelves/Page.pm | 11 ++++++----- .../prog/en/modules/virtualshelves/shelves.tt | 5 +++-- 2 files changed, 9 insertions(+), 7 deletions(-) --- a/C4/VirtualShelves/Page.pm +++ a/C4/VirtualShelves/Page.pm @@ -340,11 +340,12 @@ sub shelfpage ($$$$$) { my $owner = $shelflist->{$element}->{'owner'}; my $canmanage = ShelfPossibleAction( $loggedinuser, $element, 'manage' ); my $sortfield = $shelflist->{$element}->{'sortfield'}; - if ( $sortfield eq 'author' ) { - $shelflist->{$element}->{"authorsort"} = 'author'; - } - if ( $sortfield eq 'year' ) { - $shelflist->{$element}->{"yearsort"} = 'year'; + if ( $sortfield ){ + if ( $sortfield eq 'author' ) { + $shelflist->{$element}->{"authorsort"} = 'author'; + } elsif ( $sortfield eq 'year' ) { + $shelflist->{$element}->{"yearsort"} = 'year'; + } } $shelflist->{$element}->{"viewcategory$category"} = 1; $shelflist->{$element}->{manageshelf} = $canmanage; --- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt @@ -349,7 +349,7 @@ function placeHold () {
List Name | Contents | Sort By | Type | Options | |
---|---|---|---|---|---|
List Name | Created by | Contents | Sort By | Type | Options |
[% shelvesloo.shelfname |html %] | +[% shelvesloo.ownername %] | [% shelvesloo.count %] item(s) | [% IF ( shelvesloo.authorsort ) %]Author[% ELSIF ( shelvesloo.yearsort ) %]Year[% ELSE %]Title[% END %] | [% IF ( shelvesloo.viewcategory1 ) %]Private[% END %] -- |