Bugzilla – Attachment 41401 Details for
Bug 14654
Add desk filter in Holds awaiting pickup list
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14654 - Add desk filter in Holds awaiting pickup list
Bug-14654---Add-desk-filter-in-Holds-awaiting-pick.patch (text/plain), 4.42 KB, created by
Nicolas Legrand
on 2015-08-06 09:55:35 UTC
(
hide
)
Description:
Bug 14654 - Add desk filter in Holds awaiting pickup list
Filename:
MIME Type:
Creator:
Nicolas Legrand
Created:
2015-08-06 09:55:35 UTC
Size:
4.42 KB
patch
obsolete
>From 2c39a0b9cbf26ce9f60cc2a445afa8a899e1f4ba Mon Sep 17 00:00:00 2001 >From: Nicolas Legrand <nicolas.legrand@bulac.fr> >Date: Thu, 6 Aug 2015 11:45:35 +0200 >Subject: [PATCH] Bug 14654 - Add desk filter in Holds awaiting pickup list > >On waitingreserves.pl add a menu to filter holds by desks they are >attached to. By default, put the desk the user have set. Otherwise, >show all holds (current behaviour). > >Test plan : > >1/ apply bug 13881 and this one, add some desks, check in some holded >books to pass them on status wainting. Do it with different desks set >on your user session, > >2/ go to the waitingreserves.pl page, you should see only books >awaiting pickup from your desk, > >3/ select all desk, you should see all books awaiting pickup at your >library, > >4/ select other desks, you should see holds awaiting pickup there. >--- > circ/waitingreserves.pl | 24 +++++++++++++++++++- > .../prog/en/modules/circ/waitingreserves.tt | 13 +++++++++++ > 2 files changed, 36 insertions(+), 1 deletion(-) > >diff --git a/circ/waitingreserves.pl b/circ/waitingreserves.pl >index e7f2cf1..59f7255 100755 >--- a/circ/waitingreserves.pl >+++ b/circ/waitingreserves.pl >@@ -48,6 +48,7 @@ my $fbr = $input->param('fbr') || ''; > my $tbr = $input->param('tbr') || ''; > my $all_branches = $input->param('allbranches') || ''; > my $cancelall = $input->param('cancelall'); >+my $deskcode = $input->param('deskcode') || ''; > > my $cancel; > >@@ -64,6 +65,21 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( > > my $default = C4::Context->userenv->{'branch'}; > >+my @deskloop; >+my $desksaref = GetDesks($default); >+foreach my $d (@$desksaref) { >+ my $deskh = GetDesk($d); >+ unless ($deskcode) { >+ $deskh->{'selected'} = 1 >+ if ($deskh->{'deskcode'} eq C4::Context->userenv->{'deskcode'}); >+ } >+ else { >+ $deskh->{'selected'} = 1 if ($deskcode eq $deskh->{'deskcode'}); >+ } >+ push @deskloop, $deskh; >+} >+$template->param(deskloop => \@deskloop); >+ > my $transfer_when_cancel_all = C4::Context->preference('TransferWhenCancelAllWaitingHolds'); > $template->param( TransferWhenCancelAllWaitingHolds => 1 ) if $transfer_when_cancel_all; > >@@ -90,7 +106,12 @@ my @getreserves = $all_branches ? GetReservesForBranch() : GetReservesForBranch( > my $today = Date_to_Days(&Today); > foreach my $num (@getreserves) { > next unless ($num->{'waitingdate'} && $num->{'waitingdate'} ne '0000-00-00'); >- >+ if ($deskcode) { >+ next if ($num->{'deskcode'} ne $deskcode && $deskcode ne '*'); >+ } >+ elsif (C4::Context->userenv->{'deskcode'} ne $num->{'deskcode'}) { >+ next; >+ } > my $itemnumber = $num->{'itemnumber'}; > my $gettitle = GetBiblioFromItemNumber( $itemnumber ); > my $borrowernum = $num->{'borrowernumber'}; >@@ -100,6 +121,7 @@ foreach my $num (@getreserves) { > if ($desk) { > $deskname = $desk->{'deskname'}; > } >+ $deskname = $num->{'deskcode'}; > my $holdingbranch = $gettitle->{'holdingbranch'}; > my $homebranch = $gettitle->{'homebranch'}; > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt >index 31294ec..38a9b61 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt >@@ -8,6 +8,10 @@ > <script type="text/javascript"> > //<![CDATA[ > $(document).ready(function() { >+ $('#selectdesk').find("input:submit").hide(); >+ $('#deskcode').change(function() { >+ $('#selectdesk').submit(); >+ }); > $('#resultlist').tabs(); > $("th a").hide(); > $("#holdst,#holdso").dataTable($.extend(true, {}, dataTablesDefaults, { >@@ -43,6 +47,15 @@ > View all libraries</a></span> > [% END %] > </h2> >+ <form method="get" action="/cgi-bin/koha/circ/waitingreserves.pl" id="selectdesk"> >+ Select a desk : >+ <select name="deskcode" id="deskcode" > >+ <option value="*">All desks</option> >+ [% FOREACH deskloo IN deskloop %] >+ [% IF ( deskloo.selected ) %]<option value="[% deskloo.deskcode %]" selected="selected">[% deskloo.deskname %]</option>[% ELSE %]<option value="[% deskloo.deskcode %]">[% deskloo.deskname %]</option>[% END %] >+ [% END %] >+ </select> >+ </form> > [% IF ( cancel_result ) %] > [% FOREACH cancel_result %] > [% IF ( messagetransfert ) %] >-- >1.7.10.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 14654
: 41401