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 98-104 function check() { Link Here
98
}
98
}
99
99
100
function checkMultiHold() {
100
function checkMultiHold() {
101
    var spans = $(".multi_hold_item");
101
    var spans = $(".multi_hold_item_checkbox:checked");
102
    if ($(spans).size() == 0) {
102
    if ($(spans).size() == 0) {
103
        alert(MSG_NO_ITEMS_AVAILABLE);
103
        alert(MSG_NO_ITEMS_AVAILABLE);
104
        return false;
104
        return false;
Lines 291-296 function checkMultiHold() { Link Here
291
    </form>
291
    </form>
292
  [% ELSIF NOT noitems %]
292
  [% ELSIF NOT noitems %]
293
293
294
[% IF ( checked_previously && !multi_hold ) %]
295
<div class="dialog alert">
296
  <ul>
297
    <li>Patron has previously checked out this title on <strong>[% checked_previously | $KohaDates %]</strong></li>
298
  </ul>
299
</div>
300
[% END %]
301
294
[% IF ( exceeded_maxreserves || exceeded_holds_per_record || alreadyreserved || none_available || alreadypossession || ageRestricted ) %]
302
[% IF ( exceeded_maxreserves || exceeded_holds_per_record || alreadyreserved || none_available || alreadypossession || ageRestricted ) %]
295
    <div class="dialog alert">
303
    <div class="dialog alert">
296
304
Lines 630-635 function checkMultiHold() { Link Here
630
638
631
    <table id="requesttitles">
639
    <table id="requesttitles">
632
      <tr>
640
      <tr>
641
        <th>&nbsp;</th>
633
        <th>Title</th>
642
        <th>Title</th>
634
        [% UNLESS ( item_level_itypes ) %]
643
        [% UNLESS ( item_level_itypes ) %]
635
          <th>Item type</th>
644
          <th>Item type</th>
Lines 644-658 function checkMultiHold() { Link Here
644
          <tr>
653
          <tr>
645
        [% END %]
654
        [% END %]
646
          <td>
655
          <td>
656
            [% UNLESS ( biblioloo.warn ) %]
657
              <input class="multi_hold_item_checkbox" type="checkbox" checked="checked" title="[% biblioloo.biblionumber %]"/></td>
658
            [% END %]
659
            <td>
647
            <ul>
660
            <ul>
648
              <li><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblioloo.biblionumber %]">[% biblioloo.title |html %]</a></li>
661
              <li><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblioloo.biblionumber %]">[% biblioloo.title |html %]</a></li>
649
              [% IF ( biblioloo.publicationyear ) %]
662
              [% IF ( biblioloo.publicationyear ) %]
650
                <li><span class="label">Publication year:</span> [% biblioloo.publicationyear %]</li>
663
                <li><span class="label">Publication year:</span> [% biblioloo.publicationyear %]</li>
651
              [% END %]
664
              [% END %]
652
            </ul>
665
            </ul>
653
            [% UNLESS ( biblioloo.warn ) %]
666
            [% IF ( biblioloo.warn ) %]
654
              <span class="multi_hold_item" title="[% biblioloo.biblionumber %]"></span>
655
            [% ELSE %]
656
              <span class="not_holdable" title="[% biblioloo.biblionumber %]"></span>
667
              <span class="not_holdable" title="[% biblioloo.biblionumber %]"></span>
657
            [% END %]
668
            [% END %]
658
          </td>
669
          </td>
Lines 663-668 function checkMultiHold() { Link Here
663
          [% END %]
674
          [% END %]
664
            <td>[% biblioloo.rank %]</td>
675
            <td>[% biblioloo.rank %]</td>
665
          <td>
676
          <td>
677
            [% IF ( biblioloo.checked_previously ) %]
678
              <span class="alert">Patron has previously checked out this title on <b>[% biblioloo.checked_previously | $KohaDates %]</b></span><br/>
679
            [% END %]
666
            [% IF ( biblioloo.alreadyres ) %]
680
            [% IF ( biblioloo.alreadyres ) %]
667
              <ul>
681
              <ul>
668
            [% ELSE %]
682
            [% ELSE %]
Lines 700-706 function checkMultiHold() { Link Here
700
            [% ELSIF ( none_available ) %]
714
            [% ELSIF ( none_available ) %]
701
                <input type="submit" disabled="disabled" value="Place hold" />
715
                <input type="submit" disabled="disabled" value="Place hold" />
702
            [% ELSE %]
716
            [% ELSE %]
703
                <input type="submit" value="Place hold" />
717
                [% IF ( multi_hold ) %]
718
                    <input type="submit" value="Place hold" id="multi_hold_submit"/>
719
                [% ELSE %]
720
                    <input type="submit" value="Place hold" />
721
                [% END %]
704
            [% END %]
722
            [% END %]
705
        [% END %]
723
        [% END %]
706
    </fieldset>
724
    </fieldset>
(-)a/reserve/request.pl (-1 / +16 lines)
Lines 196-201 my $patron = Koha::Patrons->find( $borrowernumber_hold ); Link Here
196
196
197
my $logged_in_patron = Koha::Patrons->find( $borrowernumber );
197
my $logged_in_patron = Koha::Patrons->find( $borrowernumber );
198
198
199
my $wants_check;
200
if ($logged_in_patron) {
201
    $wants_check = $logged_in_patron->wants_check_for_previous_checkout;
202
}
199
my $itemdata_enumchron = 0;
203
my $itemdata_enumchron = 0;
200
my @biblioloop = ();
204
my @biblioloop = ();
201
foreach my $biblionumber (@biblionumbers) {
205
foreach my $biblionumber (@biblionumbers) {
Lines 353-358 foreach my $biblionumber (@biblionumbers) { Link Here
353
        foreach my $itemnumber ( @{ $itemnumbers_of_biblioitem{$biblioitemnumber} } )    {
357
        foreach my $itemnumber ( @{ $itemnumbers_of_biblioitem{$biblioitemnumber} } )    {
354
            my $item = $iteminfos_of->{$itemnumber};
358
            my $item = $iteminfos_of->{$itemnumber};
355
359
360
            if ( $logged_in_patron ) {
361
                my $do_check = $logged_in_patron->do_check_for_previous_checkout($item) if $wants_check;
362
                if ( $do_check && $wants_check ) {
363
                    $item->{checked_previously} = $do_check;
364
                    if ( $multihold ) {
365
                        $biblioloopiter{checked_previously} = $do_check;
366
                    } else {
367
                        $template->param( checked_previously => $do_check );
368
                    }
369
                }
370
371
            }
356
            $item->{force_hold_level} = $force_hold_level;
372
            $item->{force_hold_level} = $force_hold_level;
357
373
358
            unless (C4::Context->preference('item-level_itypes')) {
374
            unless (C4::Context->preference('item-level_itypes')) {
359
- 

Return to bug 20421