Bugzilla – Attachment 107408 Details for
Bug 23258
Batch tool for placing and cancelling holds
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23258: (follow-up) QA fixes
Bug-23258-follow-up-QA-fixes.patch (text/plain), 9.94 KB, created by
Matthias Meusburger
on 2020-07-27 09:45:51 UTC
(
hide
)
Description:
Bug 23258: (follow-up) QA fixes
Filename:
MIME Type:
Creator:
Matthias Meusburger
Created:
2020-07-27 09:45:51 UTC
Size:
9.94 KB
patch
obsolete
>From 1f2c59fb4fb0e9170455a2ae10372166babf5bc1 Mon Sep 17 00:00:00 2001 >From: Matthias Meusburger <matthias.meusburger@biblibre.com> >Date: Mon, 27 Jul 2020 11:41:55 +0200 >Subject: [PATCH] Bug 23258: (follow-up) QA fixes > >This patch adds relevant informations to the confirmation and results pages: > > - Patron name (with link) > - Pickup location > - Biblio title and item barcode (with link) > - Link to the holds for the title on the result screen >--- > circ/batch_holding.pl | 30 +++++++--- > .../prog/en/modules/circ/batch_holding.tt | 64 +++++++++++++++------- > 2 files changed, 65 insertions(+), 29 deletions(-) > >diff --git a/circ/batch_holding.pl b/circ/batch_holding.pl >index 400eb53..72f63e2 100755 >--- a/circ/batch_holding.pl >+++ b/circ/batch_holding.pl >@@ -87,19 +87,25 @@ if ($op eq "show"){ > if (@itemnumbers) { > foreach my $itemnumber (@itemnumbers) { > my $item = Koha::Items->find({ itemnumber => $itemnumber }); >+ my $biblio = Koha::Biblios->find({ biblionumber => $item->biblionumber }); > my $holdable = CanItemBeReserved($borrowernumber, $item->itemnumber)->{status}; > push @holdloop, { >- 'itemnumber' => $item->itemnumber, >- 'barcode' => $item->barcode, >- 'holdable' => ($action eq "cancel" || $holdable eq 'OK') ? 1 : 0, >- }; >+ 'biblionumber' => $biblio->biblionumber, >+ 'title' => $biblio->title, >+ 'itemnumber' => $item->itemnumber, >+ 'barcode' => $item->barcode, >+ 'holdable' => ($action eq "cancel" || $holdable eq 'OK') ? 1 : 0, >+ }; > } > > } >+ my $borrower = Koha::Patrons->find({ borrowernumber => $borrowernumber }); > $template->param( > show => 1, > holdloop => \@holdloop, > borrowernumber => $borrowernumber, >+ borrowersurname => $borrower->surname, >+ borrowerfirstname => $borrower->firstname, > branch => $branch, > action => $action, > op => $op >@@ -116,6 +122,7 @@ elsif ($op eq "result") { > if ($action eq "place") { > my $item = Koha::Items->find({ itemnumber => $itemnumber }); > my $biblionumber = $item->biblionumber; >+ my $biblio = Koha::Biblios->find({ biblionumber => $item->biblionumber }); > my $reserve_id = AddReserve({ > branchcode => $branch, > borrowernumber => $borrowernumber, >@@ -123,9 +130,12 @@ elsif ($op eq "result") { > itemnumber => $itemnumber > }); > push @holdloop, { >- 'itemnumber' => $itemnumber, >- 'reserve_id' => $reserve_id, >- }; >+ 'biblionumber' => $biblio->biblionumber, >+ 'title' => $biblio->title, >+ 'itemnumber' => $itemnumber, >+ 'barcode' => $item->barcode, >+ 'reserve_id' => $reserve_id, >+ }; > } else { > my $holds = Koha::Holds->search({ itemnumber => $itemnumber, borrowernumber => $borrowernumber }); > if ($holds) { >@@ -139,10 +149,14 @@ elsif ($op eq "result") { > } > } > } >- >+ my $borrower = Koha::Patrons->find({ borrowernumber => $borrowernumber }); > $template->param( > result => 1, > holdloop => \@holdloop, >+ borrowernumber => $borrowernumber, >+ borrowersurname => $borrower->surname, >+ borrowerfirstname => $borrower->firstname, >+ branch => $branch, > cancel => $action eq "cancel" ? 1 : 0, > place => $action eq "place" ? 1 : 0, > op => $op >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/batch_holding.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/batch_holding.tt >index c46e604..0c72910 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/batch_holding.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/batch_holding.tt >@@ -66,7 +66,10 @@ > [% ELSE %] > <h1>Cancel holds on the following barcodes</h1> > [% END %] >- >+ <ul> >+ <li>Patron: <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber | uri %]">[% borrowersurname | html %][% IF ( borrowerfirstname ) %], [% borrowerfirstname | html %][% END %]</a></li> >+ <li>Pickup location: [% Branches.GetName( branch ) | html %]</li> >+ </ul> > <div id="toolbar"> > <a id="SelectAll" href="#"><i class="fa fa-check"></i> Select all</a> | > <a id="ClearAll" href="#"><i class="fa fa-remove"></i> Clear all</a> >@@ -74,18 +77,23 @@ > > <form action="batch_holding.pl" id="hold_selections" method="POST"> > <table> >+ <thead><tr><th>Hold</th><th>Title</th><th>Item</th><th>Comment</th></tr></thead> > <tbody> > [% FOREACH hold IN holdloop %] > <tr> > <td> >- [% IF hold.holdable %] >- <label> >- <input type="checkbox" name="holdable" checked="checked" value="[% hold.itemnumber | html %]" /> >- [% hold.barcode | html %] >- </label> >- [% ELSE %] >+ <input type="checkbox" name="holdable" [% IF !hold.holdable %]disabled="disabled"[% END %] checked="checked" value="[% hold.itemnumber | html %]" /> >+ </td> >+ <td> >+ <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% hold.biblionumber | uri %]">[% hold.title | html %]</a> >+ </td> >+ <td> >+ <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% hold.biblionumber | uri %]&itemnumber=[% hold.itemnumber | uri %]">[% hold.barcode | html %]</a> >+ </td> >+ <td> >+ [% IF !hold.holdable %] > <i class="fa fa-warning"></i> >- [% hold.barcode | html %] (This item cannot be placed on hold) >+ This item cannot be placed on hold > [% END %] > </td> > </tr> >@@ -111,25 +119,39 @@ > [% IF (holdloop) %] > <h1>Results</h1> > [% IF place %] >- The following items have been placed on hold: >- <ul> >- [% FOREACH hold IN holdloop %] >- <li>itemnumber [% hold.itemnumber | html %], reserve_id [% hold.reserve_id | html %]</li> >- [% END %] >- </ul> >+ <p>The following items have been placed on hold:</p> > [% END %] > [% IF cancel %] >- The following holds were cancelled: >- <ul> >- [% FOREACH hold IN holdloop %] >- <li>itemnumber [% hold.itemnumber | html %]</li> >- [% END %] >- </ul> >+ <p>The following holds were cancelled:</p> >+ [% END %] >+ <ul> >+ <li>Patron: <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber | uri %]">[% borrowersurname | html %][% IF ( borrowerfirstname ) %], [% borrowerfirstname | html %][% END %]</a></li> >+ <li>Pickup location: [% Branches.GetName( branch ) | html %]</li> >+ </ul> >+ <table> >+ <thead><tr><th>Title</th><th>Item</th><th>Holds</th></tr></thead> >+ <tbody> >+ [% FOREACH hold IN holdloop %] >+ <tr> >+ <td> >+ <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% hold.biblionumber | uri %]">[% hold.title | html %]</a> >+ </td> >+ <td> >+ <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% hold.biblionumber | uri %]&itemnumber=[% hold.itemnumber | uri %]">[% hold.barcode | html %]</a> >+ </td> >+ <td> >+ <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% hold.biblionumber | uri %]">Show holds</a> >+ </td> >+ </tr> > [% END %] >+ </tbody> >+ </table> >+ > [% ELSE %] > <p>No holds could be placed or cancelled.</p> > [% END %] >- <a href="batch_holding.pl">Batch place or cancel other holds</a> >+ >+ <p><a href="batch_holding.pl">Batch place or cancel other holds</a></p> > > [% ELSE %] > >-- >2.7.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 23258
:
91230
|
106055
|
106077
|
106091
|
106598
|
107408
|
108498
|
108504
|
108628
|
108630
|
180199
|
180231