Bugzilla – Attachment 41740 Details for
Bug 11759
Batch checkout
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11759: (follow-up) Some fixes
Bug-11759-follow-up-Some-fixes.patch (text/plain), 6.80 KB, created by
Marcel de Rooy
on 2015-08-20 13:51:37 UTC
(
hide
)
Description:
Bug 11759: (follow-up) Some fixes
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2015-08-20 13:51:37 UTC
Size:
6.80 KB
patch
obsolete
>From 96ff5578a9567080cfbbc5f2b8738a2bf24fdde1 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Thu, 9 Apr 2015 10:18:47 +0200 >Subject: [PATCH] Bug 11759: (follow-up) Some fixes >Content-Type: text/plain; charset=utf-8 > >This is a squash of the following patches: > >Bug 11759: (follow-up) Prevent access to the batch checkout if not allowed > >If a user pass '&batch=1' to the url, he was allowed to access to the >batch checkout page even if the patron is not in an authorised >category. > >This patch also fixes the link to "Batch check out" from the "Details" >tab (cf changes in circ-menu.inc). > >Bug 11759: FIX Javascript error > >The following JS error occurred: > ReferenceError: MSG_ADD_MESSAGE is not defined > >The circulation.js file is useless and should not be included. > >Bug 11759: FIX the alert message if an item is on hold. > >If an item is on hold, the hold is not cancelled. >This patch corrects the message displayed in this case. > >Bug 11759: FIX issue list is empty > >The issue list is empty after checking an item out to a patron without >existing checkout. > >To reproduce: >- Search for a patron without checkout. >- Check an item out using the "normal" checkout. >- Verify the checkout list contain the checkout. > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > circ/circulation.pl | 21 ++++++++++++++------ > .../intranet-tmpl/prog/en/includes/circ-menu.inc | 2 +- > .../en/modules/circ/circulation_batch_checkouts.tt | 7 ++++--- > 3 files changed, 20 insertions(+), 10 deletions(-) > >diff --git a/circ/circulation.pl b/circ/circulation.pl >index 0b76c5b..f863ba8 100755 >--- a/circ/circulation.pl >+++ b/circ/circulation.pl >@@ -90,7 +90,6 @@ if (!C4::Context->userenv && !$branch){ > } > > my $barcodes = []; >-my $batch = $query->param('batch'); > if ( my $barcode = $query->param('barcode') ) { > $barcodes = [ $barcode ]; > } else { >@@ -110,9 +109,20 @@ if ( my $barcode = $query->param('barcode') ) { > > $barcodes = [ uniq @$barcodes ]; > >-my $template_name = $batch >- ? q|circ/circulation_batch_checkouts.tt| >- : q|circ/circulation.tt|; >+my $template_name = q|circ/circulation.tt|; >+my $borrowernumber = $query->param('borrowernumber'); >+my $borrower = $borrowernumber ? GetMember( borrowernumber => $borrowernumber ) : undef; >+my $batch = $query->param('batch'); >+my $batch_allowed = 0; >+if ( $batch ) { >+ $template_name = q|circ/circulation_batch_checkouts.tt|; >+ my @batch_category_codes = split '\|', C4::Context->preference('batch_checkouts'); >+ if ( grep {/^$borrower->{categorycode}$/} @batch_category_codes ) { >+ $batch_allowed = 1; >+ } else { >+ $barcodes = []; >+ } >+} > > my ( $template, $loggedinuser, $cookie ) = get_template_and_user ( > { >@@ -143,7 +153,6 @@ for (@failedreturns) { $return_failed{$_} = 1; } > > my $findborrower = $query->param('findborrower') || q{}; > $findborrower =~ s|,| |g; >-my $borrowernumber = $query->param('borrowernumber'); > > $branch = C4::Context->userenv->{'branch'}; > $printer = C4::Context->userenv->{'branchprinter'}; >@@ -259,7 +268,6 @@ if ($findborrower) { > } > > # get the borrower information..... >-my $borrower; > if ($borrowernumber) { > $borrower = GetMemberDetails( $borrowernumber, 0 ); > my ( $od, $issue, $fines ) = GetMemberIssuesAndFines( $borrowernumber ); >@@ -591,6 +599,7 @@ $template->param( > inprocess => $inprocess, > is_child => ($borrowernumber && $borrower->{'category_type'} eq 'C'), > $view => 1, >+ batch_allowed => $batch_allowed, > soundon => C4::Context->preference("SoundOn"), > fast_cataloging => $fast_cataloging, > CircAutoPrintQuickSlip => C4::Context->preference("CircAutoPrintQuickSlip"), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc >index 9a028df..12c1e98 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc >@@ -65,7 +65,7 @@ > <ul> > [% IF ( circview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% borrowernumber %]">Check out</a></li> > [% IF Koha.Preference('batch_checkouts').split('\|').grep(categorycode).size > 0 %] >- [% IF ( batch_checkout_view ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% borrower.borrowernumber %]&batch=1">Batch check out</a></li> >+ [% IF ( batch_checkout_view ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% borrowernumber %]&batch=1">Batch check out</a></li> > [% END %] > [% IF ( CAN_user_borrowers ) %] > [% IF ( detailview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">Details</a></li> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt >index a657cd7..7d16375 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt >@@ -19,7 +19,6 @@ > <script type="text/javascript" src="[% themelang %]/js/datatables.js"></script>[% END %] > <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script> > <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery-ui-timepicker-addon.js"></script> >-<script type="text/javascript" src="[% themelang %]/js/pages/circulation.js"></script> > <script type="text/javascript"> > //<![CDATA[ > $(document).ready(function() { >@@ -54,7 +53,9 @@ $(document).ready(function() { > > <div class="yui-g"> > >-[% UNLESS checkout_infos %] >+[% IF NOT batch_allowed %] >+ <div class="dialog message">You are not allowed to use batch checkout for this patron</div> >+[% ELSIF NOT checkout_infos %] > <form method="post" enctype="multipart/form-data" action="/cgi-bin/koha/circ/circulation.pl"> > <fieldset id="circ_circulation_issue"> > <label for="barcode">Checking out a batch to [% INCLUDE 'patron-title.inc' %]</label> >@@ -172,7 +173,7 @@ $(document).ready(function() { > > [% IF NOT checkout_info.IMPOSSIBLE && ( CAN_user_circulate_force_checkout or checkout_info.HIGHHOLDS ) %] > [% IF checkout_info.RESERVED || checkout_info.RESERVE_WAITING %] <!-- arbitrary choice, revert the reserve is not possible--> >- <p>The hold will be canceled.</p> >+ <p>This item is on hold for another patron. The hold will be overridden, but not cancelled.</p> > [% END %] > [% END %] > </p> >-- >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 11759
:
25255
|
25256
|
25257
|
25258
|
25260
|
25620
|
26442
|
26455
|
26806
|
26807
|
26808
|
26809
|
26810
|
26811
|
26813
|
26814
|
26815
|
26833
|
26854
|
27613
|
37603
|
37604
|
37605
|
37606
|
37607
|
37608
|
37609
|
37610
|
37611
|
37612
|
37613
|
37614
|
37650
|
37653
|
41692
|
41693
|
41694
|
41695
|
41696
|
41697
|
41698
|
41735
|
41736
|
41737
|
41738
|
41739
| 41740 |
41741
|
43626
|
43627