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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt (-5 / +23 lines)
Lines 94-99 Link Here
94
    </form>
94
    </form>
95
  [% ELSIF NOT noitems %]
95
  [% ELSIF NOT noitems %]
96
96
97
[% IF ( checked_previously && !multi_hold ) %]
98
<div class="dialog alert">
99
  <ul>
100
    <li>Patron has previously checked out this title</li>
101
  </ul>
102
</div>
103
[% END %]
104
97
[% IF ( exceeded_maxreserves || exceeded_holds_per_record || alreadyreserved || none_available || alreadypossession || ageRestricted ) %]
105
[% IF ( exceeded_maxreserves || exceeded_holds_per_record || alreadyreserved || none_available || alreadypossession || ageRestricted ) %]
98
    <div class="dialog alert">
106
    <div class="dialog alert">
99
107
Lines 445-450 Link Here
445
453
446
    <table id="requesttitles">
454
    <table id="requesttitles">
447
      <tr>
455
      <tr>
456
        <th>&nbsp;</th>
448
        <th>Title</th>
457
        <th>Title</th>
449
        [% UNLESS ( item_level_itypes ) %]
458
        [% UNLESS ( item_level_itypes ) %]
450
          <th>Item type</th>
459
          <th>Item type</th>
Lines 459-473 Link Here
459
          <tr>
468
          <tr>
460
        [% END %]
469
        [% END %]
461
          <td>
470
          <td>
471
            [% UNLESS ( biblioloo.warn ) %]
472
              <input class="multi_hold_item_checkbox" type="checkbox" checked="checked" title="[% biblioloo.biblionumber | html %]"/></td>
473
            [% END %]
474
            <td>
462
            <ul>
475
            <ul>
463
              <li><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblioloo.biblionumber | uri %]">[% biblioloo.title | html %]</a></li>
476
              <li><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblioloo.biblionumber | uri %]">[% biblioloo.title | html %]</a></li>
464
              [% IF ( biblioloo.publicationyear ) %]
477
              [% IF ( biblioloo.publicationyear ) %]
465
                <li><span class="label">Publication year:</span> [% biblioloo.publicationyear | html %]</li>
478
                <li><span class="label">Publication year:</span> [% biblioloo.publicationyear | html %]</li>
466
              [% END %]
479
              [% END %]
467
            </ul>
480
            </ul>
468
            [% UNLESS ( biblioloo.warn ) %]
481
            [% IF ( biblioloo.warn ) %]
469
              <span class="multi_hold_item" title="[% biblioloo.biblionumber | html %]"></span>
470
            [% ELSE %]
471
              <span class="not_holdable" title="[% biblioloo.biblionumber | html %]"></span>
482
              <span class="not_holdable" title="[% biblioloo.biblionumber | html %]"></span>
472
            [% END %]
483
            [% END %]
473
          </td>
484
          </td>
Lines 478-483 Link Here
478
          [% END %]
489
          [% END %]
479
            <td>[% biblioloo.rank | html %]</td>
490
            <td>[% biblioloo.rank | html %]</td>
480
          <td>
491
          <td>
492
            [% IF ( biblioloo.checked_previously ) %]
493
              <span class="alert">Patron has previously checked out this title</span><br/>
494
            [% END %]
481
            [% IF ( biblioloo.alreadyres ) %]
495
            [% IF ( biblioloo.alreadyres ) %]
482
              <ul>
496
              <ul>
483
            [% ELSE %]
497
            [% ELSE %]
Lines 515-521 Link Here
515
            [% ELSIF ( none_available ) %]
529
            [% ELSIF ( none_available ) %]
516
                <input type="submit" disabled="disabled" value="Place hold" />
530
                <input type="submit" disabled="disabled" value="Place hold" />
517
            [% ELSE %]
531
            [% ELSE %]
518
                <input type="submit" value="Place hold" />
532
                [% IF ( multi_hold ) %]
533
                    <input type="submit" value="Place hold" id="multi_hold_submit"/>
534
                [% ELSE %]
535
                    <input type="submit" value="Place hold" />
536
                [% END %]
519
            [% END %]
537
            [% END %]
520
        [% END %]
538
        [% END %]
521
    </fieldset>
539
    </fieldset>
Lines 767-773 Link Here
767
        }
785
        }
768
786
769
        function checkMultiHold() {
787
        function checkMultiHold() {
770
            var spans = $(".multi_hold_item");
788
            var spans = $(".multi_hold_item_checkbox:checked");
771
            if ($(spans).size() == 0) {
789
            if ($(spans).size() == 0) {
772
                alert(MSG_NO_ITEMS_AVAILABLE);
790
                alert(MSG_NO_ITEMS_AVAILABLE);
773
                return false;
791
                return false;
(-)a/reserve/request.pl (-2 / +17 lines)
Lines 144-149 if ( $biblionumbers ) { Link Here
144
    push @biblionumbers, $input->multi_param('biblionumber');
144
    push @biblionumbers, $input->multi_param('biblionumber');
145
}
145
}
146
146
147
my $multihold = scalar $input->param('multi_hold');
147
# FIXME multi_hold should not be a variable but depends on the number of elements in @biblionumbers
148
# FIXME multi_hold should not be a variable but depends on the number of elements in @biblionumbers
148
$template->param(multi_hold => scalar $input->param('multi_hold'));
149
$template->param(multi_hold => scalar $input->param('multi_hold'));
149
150
Lines 209-214 my $patron = Koha::Patrons->find( $borrowernumber_hold ); Link Here
209
210
210
my $logged_in_patron = Koha::Patrons->find( $borrowernumber );
211
my $logged_in_patron = Koha::Patrons->find( $borrowernumber );
211
212
213
my $wants_check;
214
if ($patron) {
215
    $wants_check = $patron->wants_check_for_previous_checkout;
216
}
212
my $itemdata_enumchron = 0;
217
my $itemdata_enumchron = 0;
213
my $itemdata_ccode = 0;
218
my $itemdata_ccode = 0;
214
my @biblioloop = ();
219
my @biblioloop = ();
Lines 374-380 foreach my $biblionumber (@biblionumbers) { Link Here
374
379
375
        foreach my $itemnumber ( @{ $itemnumbers_of_biblioitem{$biblioitemnumber} } )    {
380
        foreach my $itemnumber ( @{ $itemnumbers_of_biblioitem{$biblioitemnumber} } )    {
376
            my $item = $iteminfos_of->{$itemnumber};
381
            my $item = $iteminfos_of->{$itemnumber};
377
382
            my $do_check;
383
            if ( $patron ) {
384
                $do_check = $patron->do_check_for_previous_checkout($item) if $wants_check;
385
                if ( $do_check && $wants_check ) {
386
                    $item->{checked_previously} = $do_check;
387
                    if ( $multihold ) {
388
                        $biblioloopiter{checked_previously} = $do_check;
389
                    } else {
390
                        $template->param( checked_previously => $do_check );
391
                    }
392
                }
393
            }
378
            $item->{force_hold_level} = $force_hold_level;
394
            $item->{force_hold_level} = $force_hold_level;
379
395
380
            unless (C4::Context->preference('item-level_itypes')) {
396
            unless (C4::Context->preference('item-level_itypes')) {
381
- 

Return to bug 20421