Bugzilla – Attachment 6039 Details for
Bug 7083
Show creator name on list of public lists
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed fix
0001-Fix-for-Bug-7083-Show-creator-name-on-list-of-public.patch (text/plain), 3.96 KB, created by
Owen Leonard
on 2011-10-24 15:52:49 UTC
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2011-10-24 15:52:49 UTC
Size:
3.96 KB
patch
obsolete
>From 9e30808caf617a5e2791af64d776ea0c152257e9 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >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 () { > <tr><th>List Name</th><th>Contents</th><th>Sort by</th><th>Type</th><th>Options</th></tr> > [% FOREACH shelveslooppri IN shelveslooppriv %] > [% IF ( shelveslooppri.toggle ) %]<tr class="highlight">[% ELSE %]<tr>[% END %] >- <td><a href="shelves.pl?[% IF ( shelveslooppri.showprivateshelves ) %]display=privateshelves&[% END %]viewshelf=[% shelveslooppri.shelf %]&shelfoff=[% shelfoff %]">[% shelveslooppri.shelfname |html %]</a></td> >+ <td><a href="shelves.pl?[% IF ( shelveslooppri.showprivateshelves ) %]display=privateshelves&[% END %]viewshelf=[% shelveslooppri.shelf %]&shelfoff=[% shelfoff %]">[% shelveslooppri.shelfname |html %]</a></td> > <td>[% shelveslooppri.count %] item(s)</td> > <td>[% IF ( shelveslooppri.authorsort ) %]Author[% ELSIF ( shelveslooppri.yearsort ) %]Year[% ELSE %]Title[% END %]</td> > <td>[% IF ( shelveslooppri.viewcategory1 ) %]Private[% END %] >@@ -399,10 +399,11 @@ function placeHold () { > [% IF ( shelvesloop ) %] > <div class="pages">[% pagination_bar %]</div> > <table> >- <tr><th>List Name</th><th>Contents</th><th>Sort By</th><th>Type</th><th>Options</th></tr> >+ <tr><th>List Name</th><th>Created by</th><th>Contents</th><th>Sort By</th><th>Type</th><th>Options</th></tr> > [% FOREACH shelvesloo IN shelvesloop %] > [% IF ( shelvesloo.toggle ) %]<tr class="highlight">[% ELSE %]<tr>[% END %] > <td><a href="shelves.pl?viewshelf=[% shelvesloo.shelf %]">[% shelvesloo.shelfname |html %]</a></td> >+ <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% shelvesloo.owner %]">[% shelvesloo.ownername %]</td> > <td>[% shelvesloo.count %] item(s)</td> > <td>[% IF ( shelvesloo.authorsort ) %]Author[% ELSIF ( shelvesloo.yearsort ) %]Year[% ELSE %]Title[% END %]</td> > <td>[% IF ( shelvesloo.viewcategory1 ) %]Private[% END %] >-- >1.7.3 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 7083
:
6039
|
6207