Bugzilla – Attachment 29674 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]
Bug 12568 - Improve visibility of successful renewal via opac
Bug-12568---Improve-visibility-of-successful-renew.patch (text/plain), 4.11 KB, created by
Kyle M Hall (khall)
on 2014-07-14 12:35:44 UTC
(
hide
)
Description:
Bug 12568 - Improve visibility of successful renewal via opac
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2014-07-14 12:35:44 UTC
Size:
4.11 KB
patch
obsolete
>From 162d7e35c91f0bb5720d958654341bdc76176217 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] 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 >--- > .../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 ca58f3d..c9b88b5 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 beba580..3fb8c52 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.7.2.5
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