Bugzilla – Attachment 115201 Details for
Bug 26282
Allow staff to decide if a hold cancellation notice will be sent when cancelling a hold
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26282: Update pendingreserves to use buttons
Bug-26282-Update-pendingreserves-to-use-buttons.patch (text/plain), 4.17 KB, created by
Martin Renvoize (ashimema)
on 2021-01-15 13:21:39 UTC
(
hide
)
Description:
Bug 26282: Update pendingreserves to use buttons
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-01-15 13:21:39 UTC
Size:
4.17 KB
patch
obsolete
>From e5fd600a217c7e921804da1ad3f814beaa649ba7 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Fri, 15 Jan 2021 13:10:09 +0000 >Subject: [PATCH] Bug 26282: Update pendingreserves to use buttons > >This patch updates circ/pendingreserves to use two buttons; "Cancel hold" and >"Cancel hold and notify" for the pending reserves page. It will only >display the notify option when a notice template exists. >--- > circ/pendingreserves.pl | 10 +++++++++- > .../prog/en/modules/circ/pendingreserves.tt | 13 ++++++++----- > 2 files changed, 17 insertions(+), 6 deletions(-) > >diff --git a/circ/pendingreserves.pl b/circ/pendingreserves.pl >index 5934e9d982..a9a853de0c 100755 >--- a/circ/pendingreserves.pl >+++ b/circ/pendingreserves.pl >@@ -215,7 +215,8 @@ my $strsth = > count(DISTINCT items.itemnumber) as icount, > count(DISTINCT reserves.borrowernumber) as rcount, > borrowers.firstname, >- borrowers.surname >+ borrowers.surname, >+ borrowers.branchcode as bbranch > FROM reserves > LEFT JOIN items ON items.biblionumber=reserves.biblionumber > LEFT JOIN biblio ON reserves.biblionumber=biblio.biblionumber >@@ -249,6 +250,12 @@ $strsth .= " GROUP BY reserves.biblionumber ORDER BY biblio.title "; > my $sth = $dbh->prepare($strsth); > $sth->execute(@query_params); > >+my $cancel_notify_templates = Koha::Notice::Templates->search({ module => 'reserves', code => 'HOLD_CANCELLATION' }); >+my $cancel_notice_exists; >+while ( my $notice = $cancel_notify_templates->next ) { >+ $cancel_notice_exists->{$notice->branchcode} = 1; >+} >+ > while ( my $data = $sth->fetchrow_hashref ) { > push( > @reservedata, { >@@ -280,6 +287,7 @@ while ( my $data = $sth->fetchrow_hashref ) { > homebranch => $data->{homebranch}, > itemnumber => $data->{itemnumber}, > publicationyear => C4::Context->preference('marcflavour') eq "MARC21" ? $data->{copyrightdate} : $data->{publicationyear}, >+ cancel_notify => exists($cancel_notice_exists->{$data->{bbranch}}) ? 1 : exists($cancel_notice_exists->{''}), > } > ); > } >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt >index c9a04b6dff..71657c06f3 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt >@@ -167,16 +167,19 @@ > <option value="[% reason.authorised_value | html %]">[% reason.lib | html %]</option> > [% END %] > </select> >- >- <input type="checkbox" name="cancellation-notify-patron" id="cancellation-notify-patron" value="1" checked/> >- <label for="cancellation-notify-patron">Notify patron</label> > </div> > [% END %] > > [% IF reserveloo.holdingbranch != reserveloo.homebranch %] >- <input class="btn btn-default" type="submit" value="Cancel hold and return to : [% Branches.GetName( reserveloo.homebranch ) | html %]" /> >+ <button class="btn btn-default" name="cancellation-notify-patron" value="0" type="submit">Cancel hold and return to : [% Branches.GetName( reserveloo.homebranch ) | html %]</button> >+ [% IF reserveloo.cancel_notify %] >+ <button class="btn btn-default" name="cancellation-notify-patron" value="1" type="submit">Cancel hold, notify and return to : [% Branches.GetName( reserveloo.homebranch ) | html %]</button >+ [% END %] > [% ELSE %] >- <input class="btn btn-default" type="submit" value="Cancel hold" /> >+ <button class="btn btn-default" name="cancellation-notify-patron" value="0" type="submit">Cancel hold</button> >+ [% IF reserveloo.cancel_notify %] >+ <button class="btn btn-default" name="cancellation-notify-patron" value="1" type="submit">Cancel hold and notify</button> >+ [% END %] > [% END %] > </form> > >-- >2.20.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 26282
:
109286
|
113960
|
113991
|
114007
|
114008
|
114009
|
114010
|
114011
|
114012
|
114013
|
114014
|
114015
|
114016
|
114028
|
114030
|
114031
|
114032
|
114033
|
114034
|
114035
|
114247
|
114248
|
114249
|
114250
|
114251
|
114252
|
114253
|
114254
|
114255
|
114259
|
115193
|
115194
|
115195
|
115196
|
115197
|
115198
|
115199
|
115200
|
115201
|
122448
|
122449
|
122450
|
122451
|
122452
|
122453
|
122454
|
122455
|
122456
|
122550
|
138407
|
138408
|
138409
|
138410
|
138411
|
138412
|
138413
|
138414
|
138415
|
138416
|
138417
|
138418
|
138419
|
138469
|
141210
|
171577
|
171578
|
171579
|
171580
|
171581
|
171582
|
171583
|
171584
|
171585
|
171586
|
171587
|
171588
|
171589
|
171590
|
171592
|
171593