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 90-95 Link Here
90
    </form>
90
    </form>
91
  [% ELSIF NOT noitems %]
91
  [% ELSIF NOT noitems %]
92
92
93
[% IF ( checked_previously && !multi_hold ) %]
94
<div class="dialog alert">
95
  <ul>
96
    <li>Patron has previously checked out this title</li>
97
  </ul>
98
</div>
99
[% END %]
100
93
[% IF ( exceeded_maxreserves || exceeded_holds_per_record || alreadyreserved || none_available || alreadypossession || ageRestricted ) %]
101
[% IF ( exceeded_maxreserves || exceeded_holds_per_record || alreadyreserved || none_available || alreadypossession || ageRestricted ) %]
94
    <div class="dialog alert">
102
    <div class="dialog alert">
95
103
Lines 439-444 Link Here
439
447
440
    <table id="requesttitles">
448
    <table id="requesttitles">
441
      <tr>
449
      <tr>
450
        <th>&nbsp;</th>
442
        <th>Title</th>
451
        <th>Title</th>
443
        [% UNLESS ( item_level_itypes ) %]
452
        [% UNLESS ( item_level_itypes ) %]
444
          <th>Item type</th>
453
          <th>Item type</th>
Lines 453-467 Link Here
453
          <tr>
462
          <tr>
454
        [% END %]
463
        [% END %]
455
          <td>
464
          <td>
465
            [% UNLESS ( biblioloo.warn ) %]
466
              <input class="multi_hold_item_checkbox" type="checkbox" checked="checked" title="[% biblioloo.biblionumber | html %]"/></td>
467
            [% END %]
468
            <td>
456
            <ul>
469
            <ul>
457
              <li><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblioloo.biblionumber | uri %]">[% biblioloo.title | html %]</a></li>
470
              <li><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblioloo.biblionumber | uri %]">[% biblioloo.title | html %]</a></li>
458
              [% IF ( biblioloo.publicationyear ) %]
471
              [% IF ( biblioloo.publicationyear ) %]
459
                <li><span class="label">Publication year:</span> [% biblioloo.publicationyear | html %]</li>
472
                <li><span class="label">Publication year:</span> [% biblioloo.publicationyear | html %]</li>
460
              [% END %]
473
              [% END %]
461
            </ul>
474
            </ul>
462
            [% UNLESS ( biblioloo.warn ) %]
475
            [% IF ( biblioloo.warn ) %]
463
              <span class="multi_hold_item" title="[% biblioloo.biblionumber | html %]"></span>
464
            [% ELSE %]
465
              <span class="not_holdable" title="[% biblioloo.biblionumber | html %]"></span>
476
              <span class="not_holdable" title="[% biblioloo.biblionumber | html %]"></span>
466
            [% END %]
477
            [% END %]
467
          </td>
478
          </td>
Lines 472-477 Link Here
472
          [% END %]
483
          [% END %]
473
            <td>[% biblioloo.rank | html %]</td>
484
            <td>[% biblioloo.rank | html %]</td>
474
          <td>
485
          <td>
486
            [% IF ( biblioloo.checked_previously ) %]
487
              <span class="alert">Patron has previously checked out this title</span><br/>
488
            [% END %]
475
            [% IF ( biblioloo.alreadyres ) %]
489
            [% IF ( biblioloo.alreadyres ) %]
476
              <ul>
490
              <ul>
477
            [% ELSE %]
491
            [% ELSE %]
Lines 509-515 Link Here
509
            [% ELSIF ( none_available ) %]
523
            [% ELSIF ( none_available ) %]
510
                <input type="submit" disabled="disabled" value="Place hold" />
524
                <input type="submit" disabled="disabled" value="Place hold" />
511
            [% ELSE %]
525
            [% ELSE %]
512
                <input type="submit" value="Place hold" />
526
                [% IF ( multi_hold ) %]
527
                    <input type="submit" value="Place hold" id="multi_hold_submit"/>
528
                [% ELSE %]
529
                    <input type="submit" value="Place hold" />
530
                [% END %]
513
            [% END %]
531
            [% END %]
514
        [% END %]
532
        [% END %]
515
    </fieldset>
533
    </fieldset>
Lines 742-748 Link Here
742
        }
760
        }
743
761
744
        function checkMultiHold() {
762
        function checkMultiHold() {
745
            var spans = $(".multi_hold_item");
763
            var spans = $(".multi_hold_item_checkbox:checked");
746
            if ($(spans).size() == 0) {
764
            if ($(spans).size() == 0) {
747
                alert(MSG_NO_ITEMS_AVAILABLE);
765
                alert(MSG_NO_ITEMS_AVAILABLE);
748
                return false;
766
                return false;
(-)a/reserve/request.pl (-1 / +16 lines)
Lines 143-148 if ( $biblionumbers ) { Link Here
143
    push @biblionumbers, $input->multi_param('biblionumber');
143
    push @biblionumbers, $input->multi_param('biblionumber');
144
}
144
}
145
145
146
my $multihold = scalar $input->param('multi_hold');
146
# FIXME multi_hold should not be a variable but depends on the number of elements in @biblionumbers
147
# FIXME multi_hold should not be a variable but depends on the number of elements in @biblionumbers
147
$template->param(multi_hold => scalar $input->param('multi_hold'));
148
$template->param(multi_hold => scalar $input->param('multi_hold'));
148
149
Lines 208-213 my $patron = Koha::Patrons->find( $borrowernumber_hold ); Link Here
208
209
209
my $logged_in_patron = Koha::Patrons->find( $borrowernumber );
210
my $logged_in_patron = Koha::Patrons->find( $borrowernumber );
210
211
212
my $wants_check;
213
if ($patron) {
214
    $wants_check = $patron->wants_check_for_previous_checkout;
215
}
211
my $itemdata_enumchron = 0;
216
my $itemdata_enumchron = 0;
212
my $itemdata_ccode = 0;
217
my $itemdata_ccode = 0;
213
my @biblioloop = ();
218
my @biblioloop = ();
Lines 374-379 foreach my $biblionumber (@biblionumbers) { Link Here
374
        foreach my $itemnumber ( @{ $itemnumbers_of_biblioitem{$biblioitemnumber} } )    {
379
        foreach my $itemnumber ( @{ $itemnumbers_of_biblioitem{$biblioitemnumber} } )    {
375
            my $item = $iteminfos_of->{$itemnumber};
380
            my $item = $iteminfos_of->{$itemnumber};
376
381
382
            if ( $patron ) {
383
                my $do_check = $patron->do_check_for_previous_checkout($item) if $wants_check;
384
                if ( $do_check && $wants_check ) {
385
                    $item->{checked_previously} = $do_check;
386
                    if ( $multihold ) {
387
                        $biblioloopiter{checked_previously} = $do_check;
388
                    } else {
389
                        $template->param( checked_previously => $do_check );
390
                    }
391
                }
392
            }
377
            $item->{force_hold_level} = $force_hold_level;
393
            $item->{force_hold_level} = $force_hold_level;
378
394
379
            unless (C4::Context->preference('item-level_itypes')) {
395
            unless (C4::Context->preference('item-level_itypes')) {
380
- 

Return to bug 20421