Bugzilla – Attachment 30181 Details for
Bug 12568
Improve visibility of successful renewal via opac
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 12568 - Improve visibility of successful renewal via opac
PASSED-QA-Bug-12568---Improve-visibility-of-succes.patch (text/plain), 4.33 KB, created by
Katrin Fischer
on 2014-07-28 06:14:02 UTC
(
hide
)
Description:
[PASSED QA] Bug 12568 - Improve visibility of successful renewal via opac
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2014-07-28 06:14:02 UTC
Size:
4.33 KB
patch
obsolete
>From 0ea1d4485fce2049fefcc7705984bb636da9817d Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Mon, 14 Jul 2014 08:34:40 -0400 >Subject: [PATCH] [PASSED QA] Bug 12568 - Improve visibility of successful > renewal via opac > >Currently, when a patron renews an item via the opac, the only feedback >the patron receives when a renewal is successful is an updated value for >the due date of the item. This subtle indication of success may go >unnoticed by some patrons. We should add a more prominent way to >indicate an item was renewed successfully. > >Test Plan: >1) Apply this patch >2) From the OPAC, renew some items >3) Note the "Renewed!" message in the "Renew" column of the checkouts table > >Signed-off-by: Cathi Wiggins <cwiggins@ci.arcadia.ca.us> >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >Passes tests and QA script. >Makes successful renewals more visible to the user in the OPAC. >--- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt | 1 + > opac/opac-renew.pl | 11 ++++++++--- > opac/opac-user.pl | 4 ++++ > 3 files changed, 13 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >index ec3de30..7b7f023 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >@@ -222,6 +222,7 @@ > </td> > [% IF ( OpacRenewalAllowed && !( borrower.is_expired && borrower.BlockExpiredPatronOpacActions ) ) %] > <td class="renew"> >+ [% IF ISSUE.renewed %]<span class="alert">Renewed!</span>[% END %] > [% IF ( ISSUE.status ) %] > [% IF ( canrenew ) %] > <input type="checkbox" name="item" value="[% ISSUE.itemnumber %]"/> <a href="/cgi-bin/koha/opac-renew.pl?from=opac_user&item=[% ISSUE.itemnumber %]&borrowernumber=[% ISSUE.borrowernumber %]">Renew</a> >diff --git a/opac/opac-renew.pl b/opac/opac-renew.pl >index 34b7527..7b59f47 100755 >--- a/opac/opac-renew.pl >+++ b/opac/opac-renew.pl >@@ -43,11 +43,13 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( > debug => 1, > } > ); >-my @items = $query->param('item'); >+my @items = $query->param('item'); > > my $opacrenew = C4::Context->preference("OpacRenewalAllowed"); > >-my $errorstring=''; >+my $errorstring = q{}; >+my $renewed = q{}; >+ > my $member_details = GetMemberDetails($borrowernumber); > > if ( $member_details->{'BlockExpiredPatronOpacActions'} >@@ -56,6 +58,7 @@ if ( $member_details->{'BlockExpiredPatronOpacActions'} > $errorstring = 'card_expired'; > } > else { >+ my @renewed; > for my $itemnumber (@items) { > my ( $status, $error ) = > CanBookBeRenewed( $borrowernumber, $itemnumber ); >@@ -81,12 +84,14 @@ else { > $branchcode = 'OPACRenew'; > } > AddRenewal( $borrowernumber, $itemnumber, $branchcode ); >+ push( @renewed, $itemnumber ); > } > else { > $errorstring .= $error . "|"; > } > } >+ $renewed = join( '|', @renewed ); > } > >-print $query->redirect("/cgi-bin/koha/opac-user.pl?renew_error=$errorstring"); >+print $query->redirect("/cgi-bin/koha/opac-user.pl?renew_error=$errorstring&renewed=$renewed"); > >diff --git a/opac/opac-user.pl b/opac/opac-user.pl >index 3284b3a..fdf4054 100755 >--- a/opac/opac-user.pl >+++ b/opac/opac-user.pl >@@ -64,6 +64,8 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( > } > ); > >+my %renewed = map { $_ => 1 } split( '|', $query->param('renewed') ); >+ > my $show_priority; > for ( C4::Context->preference("OPACShowHoldQueueDetails") ) { > m/priority/ and $show_priority = 1; >@@ -189,6 +191,8 @@ if ($issues){ > $issue->{'status'} = $status; > } > >+ $issue->{'renewed'} = $renewed{ $issue->{'itemnumber'} }; >+ > if ($renewerror) { > $issue->{'too_many'} = 1 if $renewerror eq 'too_many'; > $issue->{'on_reserve'} = 1 if $renewerror eq 'on_reserve'; >-- >1.9.1
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 12568
:
29674
|
29926
|
30008
|
30085
| 30181 |
30182