diff --git a/C4/VirtualShelves/Page.pm b/C4/VirtualShelves/Page.pm index 18535a5724..3b68201df1 100644 --- a/C4/VirtualShelves/Page.pm +++ b/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; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt index d7a34a136d..d8d06eedbe 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt +++ b/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 %] |