View | Details | Raw Unified | Return to bug 14695
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt (-3 / +11 lines)
Lines 289-295 function checkMultiHold() { Link Here
289
    </form>
289
    </form>
290
  [% ELSE %]
290
  [% ELSE %]
291
291
292
[% IF ( exceeded_maxreserves || alreadyreserved || none_available || alreadypossession || ageRestricted ) %]
292
[% IF ( exceeded_maxreserves || exceeded_holds_per_record || alreadyreserved || none_available || alreadypossession || ageRestricted ) %]
293
    <div class="dialog alert">
293
    <div class="dialog alert">
294
294
295
    [% UNLESS ( multi_hold ) %]
295
    [% UNLESS ( multi_hold ) %]
Lines 297-302 function checkMultiHold() { Link Here
297
      <ul>
297
      <ul>
298
        [% IF ( exceeded_maxreserves ) %]
298
        [% IF ( exceeded_maxreserves ) %]
299
          <li><strong>Too many holds: </strong> <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">[% borrowerfirstname %] [% borrowersurname %] </a> can only place a maximum of [% maxreserves %] total holds.</li>
299
          <li><strong>Too many holds: </strong> <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">[% borrowerfirstname %] [% borrowersurname %] </a> can only place a maximum of [% maxreserves %] total holds.</li>
300
        [% ELSIF ( exceeded_holds_per_record ) %]
301
          <li><strong>Too many holds for this record: </strong> <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">[% borrowerfirstname %] [% borrowersurname %] </a> can only place a maximum of [% max_holds_for_record %] hold(s) on this record.</li>
300
        [% ELSIF ( alreadypossession ) %]
302
        [% ELSIF ( alreadypossession ) %]
301
          <li> <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">[% borrowerfirstname %] [% borrowersurname %]</a> <strong>is already in possession</strong> of one item</lie
303
          <li> <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">[% borrowerfirstname %] [% borrowersurname %]</a> <strong>is already in possession</strong> of one item</lie
302
        [% ELSIF ( alreadyreserved ) %]
304
        [% ELSIF ( alreadyreserved ) %]
Lines 313-318 function checkMultiHold() { Link Here
313
        <h3>Cannot place hold on some items</h3>
315
        <h3>Cannot place hold on some items</h3>
314
        [% IF ( exceeded_maxreserves ) %]
316
        [% IF ( exceeded_maxreserves ) %]
315
          <li><strong>Too many holds: </strong> <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">[% borrowerfirstname %] [% borrowersurname %] </a> can place [% new_reserves_allowed %] of the requested [% new_reserves_count %] holds for a maximum of [% maxreserves %] total holds.</li>
317
          <li><strong>Too many holds: </strong> <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">[% borrowerfirstname %] [% borrowersurname %] </a> can place [% new_reserves_allowed %] of the requested [% new_reserves_count %] holds for a maximum of [% maxreserves %] total holds.</li>
318
        [% ELSIF ( exceeded_holds_per_record ) %]
319
            [% FOREACH biblioloo IN biblioloop %]
320
                [% IF (biblioloo.tooManyHoldsForThisRecord) %]
321
                    <li><strong>Too many holds for <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblioloo.biblionumber %]"> [% biblioloo.title %]</a>: </strong> <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">[% borrowerfirstname %] [% borrowersurname %] </a> can only place a maximum of [% max_holds_for_record %] hold(s) on this record.</li>
322
                [% END %]
323
            [% END %]
316
        [% END %]
324
        [% END %]
317
    [% END %]
325
    [% END %]
318
326
Lines 428-439 function checkMultiHold() { Link Here
428
               <input type="hidden" name="alreadyreserved" value="[% alreadyreserved %]" />
436
               <input type="hidden" name="alreadyreserved" value="[% alreadyreserved %]" />
429
          </li>
437
          </li>
430
438
431
          [% IF max_holds_for_record > 1 %]
439
          [% IF remaining_holds_for_record > 1 %]
432
              [% SET count = 1 %]
440
              [% SET count = 1 %]
433
              <li>
441
              <li>
434
                   <label for="holds_to_place_count">Holds to place (count)</label>
442
                   <label for="holds_to_place_count">Holds to place (count)</label>
435
                   <select name="holds_to_place_count" id="holds_to_place_count">
443
                   <select name="holds_to_place_count" id="holds_to_place_count">
436
                   [% WHILE count <= max_holds_for_record %]
444
                   [% WHILE count <= remaining_holds_for_record %]
437
                        <option value="[% count %]">[% count %]</option>
445
                        <option value="[% count %]">[% count %]</option>
438
                        [% SET count = count + 1 %]
446
                        [% SET count = count + 1 %]
439
                   [% END %]
447
                   [% END %]
(-)a/reserve/request.pl (-3 / +9 lines)
Lines 82-87 my $messageborrower; Link Here
82
my $warnings;
82
my $warnings;
83
my $messages;
83
my $messages;
84
my $exceeded_maxreserves;
84
my $exceeded_maxreserves;
85
my $exceeded_holds_per_record;
85
86
86
my $date = output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 });
87
my $date = output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 });
87
my $action = $input->param('action');
88
my $action = $input->param('action');
Lines 225-230 foreach my $biblionumber (@biblionumbers) { Link Here
225
    elsif ( $canReserve eq 'tooManyReserves' ) {
226
    elsif ( $canReserve eq 'tooManyReserves' ) {
226
        $exceeded_maxreserves = 1;
227
        $exceeded_maxreserves = 1;
227
    }
228
    }
229
    elsif ( $canReserve eq 'tooManyHoldsForThisRecord' ) {
230
        $exceeded_holds_per_record = 1;
231
        $biblioloopiter{$canReserve} = 1;
232
    }
228
    elsif ( $canReserve eq 'ageRestricted' ) {
233
    elsif ( $canReserve eq 'ageRestricted' ) {
229
        $template->param( $canReserve => 1 );
234
        $template->param( $canReserve => 1 );
230
        $biblioloopiter{$canReserve} = 1;
235
        $biblioloopiter{$canReserve} = 1;
Lines 254-262 foreach my $biblionumber (@biblionumbers) { Link Here
254
        # For a librarian to be able to place multiple record holds for a patron for a record,
259
        # For a librarian to be able to place multiple record holds for a patron for a record,
255
        # we must find out what the maximum number of holds they can place for the patron is
260
        # we must find out what the maximum number of holds they can place for the patron is
256
        my $max_holds_for_record = GetMaxPatronHoldsForRecord( $borrowerinfo->{borrowernumber}, $biblionumber );
261
        my $max_holds_for_record = GetMaxPatronHoldsForRecord( $borrowerinfo->{borrowernumber}, $biblionumber );
257
        $max_holds_for_record = $max_holds_for_record - $holds->count();
262
        my $remaining_holds_for_record = $max_holds_for_record - $holds->count();
258
        $biblioloopiter{max_holds_for_record} = $max_holds_for_record;
263
        $biblioloopiter{remaining_holds_for_record} = $max_holds_for_record;
259
        $template->param( max_holds_for_record => $max_holds_for_record );
264
        $template->param( max_holds_for_record => $max_holds_for_record );
265
        $template->param( remaining_holds_for_record => $remaining_holds_for_record );
260
    }
266
    }
261
267
262
    # Check to see if patron is allowed to place holds on records where the
268
    # Check to see if patron is allowed to place holds on records where the
Lines 628-633 foreach my $biblionumber (@biblionumbers) { Link Here
628
$template->param( biblioloop => \@biblioloop );
634
$template->param( biblioloop => \@biblioloop );
629
$template->param( biblionumbers => $biblionumbers );
635
$template->param( biblionumbers => $biblionumbers );
630
$template->param( exceeded_maxreserves => $exceeded_maxreserves );
636
$template->param( exceeded_maxreserves => $exceeded_maxreserves );
637
$template->param( exceeded_holds_per_record => $exceeded_holds_per_record );
631
638
632
if ($multihold) {
639
if ($multihold) {
633
    $template->param( multi_hold => 1 );
640
    $template->param( multi_hold => 1 );
634
- 

Return to bug 14695