From 2951d83e9de190566a28c4ea572886b13059f37b 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 --- C4/VirtualShelves/Page.pm | 11 ++++++----- .../prog/en/modules/virtualshelves/shelves.tt | 5 +++-- 2 files changed, 9 insertions(+), 7 deletions(-) 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 NameContentsSort byTypeOptions [% FOREACH shelveslooppri IN shelveslooppriv %] [% IF ( shelveslooppri.toggle ) %][% ELSE %][% END %] - [% shelveslooppri.shelfname |html %] + [% shelveslooppri.shelfname |html %] [% shelveslooppri.count %] item(s) [% IF ( shelveslooppri.authorsort ) %]Author[% ELSIF ( shelveslooppri.yearsort ) %]Year[% ELSE %]Title[% END %] [% IF ( shelveslooppri.viewcategory1 ) %]Private[% END %] @@ -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