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

(-)a/C4/Reserves.pm (+3 lines)
Lines 397-402 sub CanItemBeReserved { Link Here
397
    }
397
    }
398
398
399
    # we check if it's ok or not
399
    # we check if it's ok or not
400
    if( $allowedreserves == 0 ){
401
        return 'noReservesAllowed';
402
    }
400
    if ( $reservecount >= $allowedreserves ) {
403
    if ( $reservecount >= $allowedreserves ) {
401
        return 'tooManyReserves';
404
        return 'tooManyReserves';
402
    }
405
    }
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt (-1 / +6 lines)
Lines 276-282 function checkMultiHold() { Link Here
276
    [% UNLESS ( multi_hold ) %]
276
    [% UNLESS ( multi_hold ) %]
277
      <h3>Cannot place hold</h3>
277
      <h3>Cannot place hold</h3>
278
      <ul>
278
      <ul>
279
        [% IF ( exceeded_maxreserves ) %]
279
        [% IF ( no_reserves_allowed) %]
280
          <li><strong>No holds allowed: </strong> <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">[% borrowerfirstname %] [% borrowersurname %] </a> cannot place any holds on these items.</li>
281
        [% ELSIF ( exceeded_maxreserves ) %]
280
          <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>
282
          <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>
281
        [% ELSIF ( exceeded_holds_per_record ) %]
283
        [% ELSIF ( exceeded_holds_per_record ) %]
282
          <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>
284
          <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>
Lines 294-299 function checkMultiHold() { Link Here
294
      </ul>
296
      </ul>
295
    [% ELSE %]
297
    [% ELSE %]
296
        <h3>Cannot place hold on some items</h3>
298
        <h3>Cannot place hold on some items</h3>
299
        [% IF ( no_reserves_allowed) %]
300
          <li><strong>No holds allowed: </strong> <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">[% borrowerfirstname %] [% borrowersurname %] </a> cannot place holds on some of these title's items.</li>
301
        [% END %]
297
        [% IF ( exceeded_maxreserves ) %]
302
        [% IF ( exceeded_maxreserves ) %]
298
          <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>
303
          <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>
299
        [% ELSIF ( exceeded_holds_per_record ) %]
304
        [% ELSIF ( exceeded_holds_per_record ) %]
(-)a/reserve/request.pl (-1 / +7 lines)
Lines 148-153 if ($borrowernumber_hold && !$action) { Link Here
148
    my $new_reserves_count = scalar( @biblionumbers );
148
    my $new_reserves_count = scalar( @biblionumbers );
149
149
150
    my $maxreserves = C4::Context->preference('maxreserves');
150
    my $maxreserves = C4::Context->preference('maxreserves');
151
    $template->param( maxreserves => $maxreserves );
152
151
    if ( $maxreserves
153
    if ( $maxreserves
152
        && ( $reserves_count + $new_reserves_count > $maxreserves ) )
154
        && ( $reserves_count + $new_reserves_count > $maxreserves ) )
153
    {
155
    {
Lines 210-215 my $logged_in_patron = Koha::Patrons->find( $borrowernumber ); Link Here
210
212
211
my $itemdata_enumchron = 0;
213
my $itemdata_enumchron = 0;
212
my @biblioloop = ();
214
my @biblioloop = ();
215
my $no_reserves_allowed = 0;
213
foreach my $biblionumber (@biblionumbers) {
216
foreach my $biblionumber (@biblionumbers) {
214
    next unless $biblionumber =~ m|^\d+$|;
217
    next unless $biblionumber =~ m|^\d+$|;
215
218
Lines 226-231 foreach my $biblionumber (@biblionumbers) { Link Here
226
229
227
                #All is OK and we can continue
230
                #All is OK and we can continue
228
            }
231
            }
232
            elsif ( $canReserve eq 'noReservesAllowed') {
233
                $no_reserves_allowed = 1;
234
            }
229
            elsif ( $canReserve eq 'tooManyReserves' ) {
235
            elsif ( $canReserve eq 'tooManyReserves' ) {
230
                $exceeded_maxreserves = 1;
236
                $exceeded_maxreserves = 1;
231
            }
237
            }
Lines 636-641 foreach my $biblionumber (@biblionumbers) { Link Here
636
642
637
$template->param( biblioloop => \@biblioloop );
643
$template->param( biblioloop => \@biblioloop );
638
$template->param( biblionumbers => $biblionumbers );
644
$template->param( biblionumbers => $biblionumbers );
645
$template->param( no_reserves_allowed => $no_reserves_allowed );
639
$template->param( exceeded_maxreserves => $exceeded_maxreserves );
646
$template->param( exceeded_maxreserves => $exceeded_maxreserves );
640
$template->param( exceeded_holds_per_record => $exceeded_holds_per_record );
647
$template->param( exceeded_holds_per_record => $exceeded_holds_per_record );
641
648
642
- 

Return to bug 16787