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

(-)a/circ/returns.pl (-13 / +45 lines)
Lines 414-420 if ( $messages->{'ResFound'}) { Link Here
414
    my $reserve    = $messages->{'ResFound'};
414
    my $reserve    = $messages->{'ResFound'};
415
    my $patron = Koha::Patrons->find( $reserve->{borrowernumber} );
415
    my $patron = Koha::Patrons->find( $reserve->{borrowernumber} );
416
    my $holdmsgpreferences =  C4::Members::Messaging::GetMessagingPreferences( { borrowernumber => $reserve->{'borrowernumber'}, message_name   => 'Hold_Filled' } );
416
    my $holdmsgpreferences =  C4::Members::Messaging::GetMessagingPreferences( { borrowernumber => $reserve->{'borrowernumber'}, message_name   => 'Hold_Filled' } );
417
    if ( $reserve->{'ResFound'} eq "Waiting" or $reserve->{'ResFound'} eq "Reserved" ) {
417
418
    if ( $reserve->{'ResFound'} eq "Reserved" && C4::Context->preference('HoldsAutoFill') ) {
419
        my $item = Koha::Items->find( $itemnumber );
420
        my $biblio = $item->biblio;
421
422
        my $diffBranchSend = ($userenv_branch ne $reserve->{branchcode}) ? $reserve->{branchcode} : undef;
423
        ModReserveAffect( $reserve->{itemnumber}, $reserve->{borrowernumber}, $diffBranchSend, $reserve->{reserve_id} );
424
        my ( $messages, $nextreservinfo ) = GetOtherReserves($reserve->{itemnumber});
425
426
        my $patron = Koha::Patrons->find( $nextreservinfo );
427
        my $name   = $patron ? $patron->surname . ", " . $patron->title . " " . $patron->firstname : '';
428
429
        $template->param(
430
            hold_auto_filled => 1,
431
            print_slip       => C4::Context->preference('HoldsAutoFillPrintSlip'),
432
            patron           => $patron,
433
            borrowernumber   => $patron->id,
434
            biblionumber     => $biblio->id,
435
        );
436
437
        if ( $messages->{'transfert'} ) {
438
            $template->param(
439
                itemtitle      => $biblio->title,
440
                itemnumber     => $item->itemnumber,
441
                itembiblionumber => $biblio->biblionumber,
442
                iteminfo       => $biblio->author,
443
                name           => $name,
444
                diffbranch     => 1,
445
            );
446
        }
447
    }
448
    elsif ( $reserve->{'ResFound'} eq "Waiting" or $reserve->{'ResFound'} eq "Reserved" ) {
418
        if ( $reserve->{'ResFound'} eq "Waiting" ) {
449
        if ( $reserve->{'ResFound'} eq "Waiting" ) {
419
            $template->param(
450
            $template->param(
420
                waiting      => ($userenv_branch eq $reserve->{'branchcode'} ? 1 : 0 ),
451
                waiting      => ($userenv_branch eq $reserve->{'branchcode'} ? 1 : 0 ),
Lines 428-446 if ( $messages->{'ResFound'}) { Link Here
428
            );
459
            );
429
        }
460
        }
430
461
431
        # same params for Waiting or Reserved
432
        $template->param(
433
            # FIXME The full patron object should be passed to the template
434
            found          => 1,
435
            patron         => $patron,
436
            barcode        => $barcode,
437
            destbranch     => $reserve->{'branchcode'},
438
            itemnumber     => $reserve->{'itemnumber'},
439
            reservenotes   => $reserve->{'reservenotes'},
440
            reserve_id     => $reserve->{reserve_id},
441
            bormessagepref => $holdmsgpreferences->{'transports'},
442
        );
443
    } # else { ; }  # error?
462
    } # else { ; }  # error?
463
464
    # same params for Waiting or Reserved
465
    $template->param(
466
        # FIXME The full patron object should be passed to the template
467
        found          => 1,
468
        patron         => $patron,
469
        barcode        => $barcode,
470
        destbranch     => $reserve->{'branchcode'},
471
        itemnumber     => $reserve->{'itemnumber'},
472
        reservenotes   => $reserve->{'reservenotes'},
473
        reserve_id     => $reserve->{reserve_id},
474
        bormessagepref => $holdmsgpreferences->{'transports'},
475
    );
444
}
476
}
445
477
446
# Error Messages
478
# Error Messages
(-)a/installer/data/mysql/atomicupdate/bug_19383.sql (+3 lines)
Line 0 Link Here
1
INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES
2
('HoldsAutoFill','0',NULL,'If on, librarian will not be asked if hold should be filled, it will be filled automatically','YesNo'),
3
('HoldsAutoFillPrintSlip','0',NULL,'If on, hold slip print dialog will be displayed automatically','YesNo');
(-)a/installer/data/mysql/sysprefs.sql (+2 lines)
Lines 191-196 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
191
('HighlightOwnItemsOnOPAC','0','','If on, and a patron is logged into the OPAC, items from his or her home library will be emphasized and shown first in search results and item details.','YesNo'),
191
('HighlightOwnItemsOnOPAC','0','','If on, and a patron is logged into the OPAC, items from his or her home library will be emphasized and shown first in search results and item details.','YesNo'),
192
('HighlightOwnItemsOnOPACWhich','PatronBranch','PatronBranch|OpacURLBranch','Decides which branch\'s items to emphasize. If PatronBranch, emphasize the logged in user\'s library\'s items. If OpacURLBranch, highlight the items of the Apache var BRANCHCODE defined in Koha\'s Apache configuration file.','Choice'),
192
('HighlightOwnItemsOnOPACWhich','PatronBranch','PatronBranch|OpacURLBranch','Decides which branch\'s items to emphasize. If PatronBranch, emphasize the logged in user\'s library\'s items. If OpacURLBranch, highlight the items of the Apache var BRANCHCODE defined in Koha\'s Apache configuration file.','Choice'),
193
('HoldFeeMode','not_always','any_time_is_placed|not_always|any_time_is_collected','Set the hold fee mode','Choice'),
193
('HoldFeeMode','not_always','any_time_is_placed|not_always|any_time_is_collected','Set the hold fee mode','Choice'),
194
('HoldsAutoFill','0',NULL,'If on, librarian will not be asked if hold should be filled, it will be filled automatically','YesNo'),
195
('HoldsAutoFillPrintSlip','0',NULL,'If on, hold slip print dialog will be displayed automatically','YesNo'),
194
('HoldsLog','0',NULL,'If ON, log create/cancel/suspend/resume actions on holds.','YesNo'),
196
('HoldsLog','0',NULL,'If ON, log create/cancel/suspend/resume actions on holds.','YesNo'),
195
('HoldsQueueSkipClosed', '0', NULL, 'If enabled, any libraries that are closed when the holds queue is built will be ignored for the purpose of filling holds.', 'YesNo'),
197
('HoldsQueueSkipClosed', '0', NULL, 'If enabled, any libraries that are closed when the holds queue is built will be ignored for the purpose of filling holds.', 'YesNo'),
196
('HoldsToPullStartDate','2',NULL,'Set the default start date for the Holds to pull list to this many days ago','Integer'),
198
('HoldsToPullStartDate','2',NULL,'Set the default start date for the Holds to pull list to this many days ago','Integer'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (+12 lines)
Lines 478-483 Circulation: Link Here
478
            - his/her auto renewals.
478
            - his/her auto renewals.
479
    Checkin Policy:
479
    Checkin Policy:
480
        -
480
        -
481
            - pref: HoldsAutoFill
482
              choices:
483
                  yes: Do
484
                  no: "Don't"
485
            - automatically fill holds instead of asking the librarian.
486
        -
487
            - pref: HoldsAutoFillPrintSlip
488
              choices:
489
                  yes: Do
490
                  no: "Don't"
491
            - automatically display the hold slip dialog for auto-filled holds.
492
        -
481
            - pref: BlockReturnOfWithdrawnItems
493
            - pref: BlockReturnOfWithdrawnItems
482
              choices:
494
              choices:
483
                  yes: Block
495
                  yes: Block
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt (-1 / +56 lines)
Lines 51-56 Link Here
51
[% IF Koha.Preference('CircSidebar') %]<div class="yui-b">[% END %]
51
[% IF Koha.Preference('CircSidebar') %]<div class="yui-b">[% END %]
52
<div class="yui-g">
52
<div class="yui-g">
53
53
54
    [% IF hold_auto_filled %]
55
        <div class="dialog alert hold-auto-filled">
56
            [% IF ( reservenotes ) %]
57
                <h4>Notes: [% reservenotes %]</h4>
58
            [% END %]
59
            <h3>Hold filled for:</h3>
60
                <li>
61
                    [% INCLUDE 'patron-title.inc' patron=patron %]
62
                    <span class="patron-category"> - [% patron.category.description %]</span>
63
                </li>
64
65
                [% INCLUDE display_holdpatron_address %]
66
67
                [% IF ( patron.phone ) %]
68
                    <li>[% patron.phone  %]</li>
69
                [% END %]
70
71
                [% IF ( patron.email ) %]
72
                    <li>
73
                        [% IF ( transfertodo ) %]
74
                            [% patron.email %]
75
                        [% ELSE %]
76
                            <a id="boremail" href="mailto:[% patron.email %]">[% patron.email %]</a>
77
                        [% END %]
78
                    </li>
79
                [% END %]
80
81
                [% UNLESS ( transfertodo) %]
82
                    [% INCLUDE display_bormessagepref %]
83
                [% END %]
84
85
                [% IF ( patron.debarred ) %]
86
                    <li class="error">Patron is RESTRICTED</li>
87
                [% END %]
88
89
                [% IF ( patron.gonenoaddress ) %]
90
                    <li class="error">Patron's address is in doubt</li>
91
                [% END %]
92
93
            [% IF ( transfertodo ) %]
94
                <h4><strong>Transfer to:</strong> [% Branches.GetName( destbranch ) %]</h4>
95
            [% ELSE %]
96
                <h4><strong>Hold at</strong> [% Branches.GetName( destbranch ) %]</h4>
97
            [% END %]
98
99
            <a href="#" class="btn btn-default print print-slip">
100
                <i class="fa fa-print"></i> Print
101
            </a>
102
        </div>
103
    [% END %]
104
54
[% IF privacy == 2 AND NOT Koha.Preference('AnonymousPatron') %]
105
[% IF privacy == 2 AND NOT Koha.Preference('AnonymousPatron') %]
55
    <div class="dialog alert"><strong>Error:</strong> This patron has requested their circulation history be anonymized on check-in, but the AnonymousPatron system preference is empty or incorrect.</div>
106
    <div class="dialog alert"><strong>Error:</strong> This patron has requested their circulation history be anonymized on check-in, but the AnonymousPatron system preference is empty or incorrect.</div>
56
[% ELSIF NOT Koha.Preference('AnonymousPatron') AND Koha.Preference('OPACPrivacy') %]
107
[% ELSIF NOT Koha.Preference('AnonymousPatron') AND Koha.Preference('OPACPrivacy') %]
Lines 708-713 Link Here
708
759
709
            $(".modal").on('hidden.bs.modal', function (e) { $("#barcode").focus(); });
760
            $(".modal").on('hidden.bs.modal', function (e) { $("#barcode").focus(); });
710
761
762
            $(".print-slip").on('click', function(e) {
763
                e.preventDefault();
764
                Dopop('hold-transfer-slip.pl?borrowernumber=[% patron.borrowernumber %]&amp;biblionumber=[% biblionumber %]');
765
            });
766
711
            [% IF print_slip %]
767
            [% IF print_slip %]
712
                Dopop('hold-transfer-slip.pl?borrowernumber=[% patron.borrowernumber %]&amp;biblionumber=[% biblionumber %]');
768
                Dopop('hold-transfer-slip.pl?borrowernumber=[% patron.borrowernumber %]&amp;biblionumber=[% biblionumber %]');
713
            [% END %]
769
            [% END %]
714
- 

Return to bug 19383