Bugzilla – Attachment 9205 Details for
Bug 7733
HidePatronName not working on moredetail
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7733 - HidePatronName not working on moredetail
Bug-7733---HidePatronName-not-working-on-moredetai.patch (text/plain), 6.56 KB, created by
Katrin Fischer
on 2012-04-15 09:09:05 UTC
(
hide
)
Description:
Bug 7733 - HidePatronName not working on moredetail
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2012-04-15 09:09:05 UTC
Size:
6.56 KB
patch
obsolete
>From 7635cc62357f8e7c7a17e586a4e059b67ef1c2a2 Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <Katrin.Fischer.83@web.de> >Date: Sun, 15 Apr 2012 11:03:31 +0200 >Subject: [PATCH] Bug 7733 - HidePatronName not working on moredetail > >Patch implements HidePatronName system preference for 'Checkout status' >on moredetail (tab items from staff detail page). > >Also adds some new 'if' statements, so 'Serial enumeration' and 'Paid for?' are >only shown when they are not empty. > >Silences warns in the logs. > >To test: >- Toggle system preference for an issued item and check name/cardnumber >are displayed correctly. >- Check serial enumeration and Paid for? show when not empty. >--- > catalogue/moredetail.pl | 12 ++++++++ > .../prog/en/modules/catalogue/moredetail.tt | 28 +++++++++++++++---- > 2 files changed, 34 insertions(+), 6 deletions(-) > >diff --git a/catalogue/moredetail.pl b/catalogue/moredetail.pl >index 9d5465b..ca7d13c 100755 >--- a/catalogue/moredetail.pl >+++ b/catalogue/moredetail.pl >@@ -62,6 +62,8 @@ if($query->cookie("holdfor")){ > ); > } > >+my $hidepatronname = C4::Context->preference("HidePatronName"); >+ > # get variables > > my $biblionumber=$query->param('biblionumber'); >@@ -172,6 +174,15 @@ foreach my $item (@items){ > } else { > $item->{'issue'}= 0; > } >+ >+ unless ($hidepatronname) { >+ if ( $item->{'borrowernumber'} ) { >+ my $curr_borrower = GetMember('borrowernumber' => $item->{'borrowernumber'} ); >+ $item->{borrowerfirstname} = $curr_borrower->{'firstname'}; >+ $item->{borrowersurname} = $curr_borrower->{'surname'}; >+ } >+ } >+ > } > $template->param(count => $data->{'count'}, > subscriptionsnumber => $subscriptionsnumber, >@@ -188,6 +199,7 @@ $template->param( > itemnumber => $itemnumber, > z3950_search_params => C4::Search::z3950_search_args(GetBiblioData($biblionumber)), > subtitle => $subtitle, >+ hidepatronname => $hidepatronname, > ); > $template->param(ONLY_ONE => 1) if ( $itemnumber && $showncount != @items ); > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt >index dce6872..d4efe7d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt >@@ -69,7 +69,23 @@ > > <ol class="bibliodetails"> > <li><span class="label">Current location:</span> [% ITEM_DAT.holdingbranchname %] </li> >- <li><span class="label">Checkout status:</span> [% IF ( ITEM_DAT.issue ) %]Checked out to <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% ITEM_DAT.borrowernumber %]">[% ITEM_DAT.cardnumber %]</a>[% IF ( ITEM_DAT.lastreneweddate ) %], Last renewed [% ITEM_DAT.lastreneweddate | $KohaDates %][% END %], Due back on [% ITEM_DAT.datedue | $KohaDates %][% ELSE %]Not checked out [% END %]</li> >+ <li><span class="label">Checkout status:</span> >+ [% IF ( ITEM_DAT.issue ) %]Checked out to >+ [% IF ( hidepatronname ) %] >+ <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% ITEM_DAT.borrowernumber %]">[% ITEM_DAT.cardnumber %]</a>, >+ [% ELSE %] >+ <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% ITEM_DAT.borrowernumber %]">[% ITEM_DAT.borrowerfirstname %] [% ITEM_DAT.borrowersurname %]</a>, >+ [% END %] >+ [% IF ( ITEM_DAT.lastreneweddate ) %] >+ Last renewed [% ITEM_DAT.lastreneweddate | $KohaDates %], >+ [% END %] >+ [% IF ( ITEM_DAT.datedue ) %] >+ Due back on [% ITEM_DAT.datedue | $KohaDates %] >+ [% ELSE %] >+ Not checked out >+ [% END %] >+ [% END %] >+ </li> > <li><span class="label">Current renewals:</span> [% ITEM_DAT.renewals %] </li> > [% IF ( ITEM_DAT.itemlostloop ) %] > <li><span class="label">Lost status:</span> >@@ -183,14 +199,14 @@ > > <li><span class="label">Total checkouts:</span>[% IF ( ITEM_DAT.issues ) %][% ITEM_DAT.issues %][% ELSE %]0[% END %] (<a href="/cgi-bin/koha/circ/bookcount.pl?&biblionumber=[% ITEM_DAT.biblionumber %]&bi=[% ITEM_DAT.biblioitemnumber %]&itm=[% ITEM_DAT.itemnumber %]">View item's checkout history</a>)</li> > >- <li><span class="label">Last seen:</span> [% ITEM_DAT.datelastseen | $KohaDates %] </li> >- <li><span class="label">Last borrowed:</span> [% ITEM_DAT.datelastborrowed | $KohaDates %] </li> >+ <li><span class="label">Last seen:</span>[% IF ( ITEM_DAT.datelastseen ) %][% ITEM_DAT.datelastseen | $KohaDates %] [%END %] </li> >+ <li><span class="label">Last borrowed:</span>[% IF (ITEM_DAT.datelastborrowed ) %][% ITEM_DAT.datelastborrowed | $KohaDates %][% END %] </li> > [% IF ( ITEM_DAT.card0 ) %]<li><span class="label">Last borrower:</span> <a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% ITEM_DAT.borrower0 %]">[% ITEM_DAT.card0 %]</a> </li>[% END %] > [% IF ( ITEM_DAT.card1 ) %]<li><span class="label">Previous borrower:</span> <a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% ITEM_DAT.borrower1 %]">[% ITEM_DAT.card1 %]</a> </li>[% END %] > [% IF ( ITEM_DAT.card2 ) %]<li><span class="label">Previous borrower:</span> <a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% ITEM_DAT.borrower2 %]">[% ITEM_DAT.card2 %]</a> </li>[% END %] >- <li><span class="label">Paid for?:</span> [% ITEM_DAT.paidfor %] </li> >- <li><span class="label">Serial enumeration:</span> [% ITEM_DAT.enumchron %] </li> >- <li><span class="label">Public note:</span> >+ [% IF ( ITEM_DAT.paidfor ) %]<li><span class="label">Paid for?:</span> [% ITEM_DAT.paidfor %] </li>[% END %] >+ [% IF ( ITEM_DAT.enumchron ) %]<li><span class="label">Serial enumeration:</span> [% ITEM_DAT.enumchron %] </li>[% END %] >+ <li><span class="label">Public note:</span> > [% IF ( CAN_user_editcatalogue_edit_items ) %] > <form class="inline" action="updateitem.pl" method="post"><input type="hidden" name="biblionumber" value="[% ITEM_DAT.biblionumber %]" /> > <input type="hidden" name="biblioitemnumber" value="[% ITEM_DAT.biblioitemnumber %]" /><input type="hidden" name="itemnumber" value="[% ITEM_DAT.itemnumber %]" /> >-- >1.7.5.4
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 7733
:
8272
|
9205
|
9209
|
9211
|
9213