From 9e30808caf617a5e2791af64d776ea0c152257e9 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 - Show creator name on list of public lists Content-Type: text/plain; charset="utf-8" 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 --- 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 161a7aa..58e02ec 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 d7a34a1..d8d06ee 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 %] -- 1.7.3