From 5317761c254b78fff666e39e0abded664668228b Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Mon, 24 Oct 2011 11:18:16 -0400 Subject: [PATCH] Fix for Bug 7083 - [SIGNED-OFF] Show creator name on list of public lists Show the name of the patron who created each list on the list of public lists. Also: - correcting unescaped ampersand in the template - making conditional a check on a variable that doesn't always exist, causing noisy errors in the log Signed-off-by: Magnus Enger After applying the patch a column for "Created by" is added to the display of public lists, and the errors in the log are silenced. On the "Your lists" tab, the link on the list name now has an escaped ampersand. Signed-off-by: Paul Poulain (cherry picked from commit 2951d83e9de190566a28c4ea572886b13059f37b) Signed-off-by: Chris Nighswonger (cherry picked from commit 88ee85b33ac5d910ec003602f57c360581a097f1) Signed-off-by: Chris Nighswonger --- C4/VirtualShelves/Page.pm | 11 ++++++----- .../prog/en/modules/virtualshelves/shelves.tt | 3 ++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/C4/VirtualShelves/Page.pm b/C4/VirtualShelves/Page.pm index ada6b4754f..6b60cdc374 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 b43202032a..b054e093db 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt @@ -399,10 +399,11 @@ function placeHold () { [% IF ( shelvesloop ) %]
[% pagination_bar %]
- + [% FOREACH shelvesloo IN shelvesloop %] [% IF ( shelvesloo.toggle ) %][% ELSE %][% END %] +
List NameContentsSort ByTypeOptions
List NameCreated byContentsSort ByTypeOptions
[% 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 %] -- 2.39.5