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

(-)a/circ/circulation.pl (+6 lines)
Lines 547-552 if ( $patron ) { Link Here
547
    );
547
    );
548
    $template->param( patron_messages => $patron_messages );
548
    $template->param( patron_messages => $patron_messages );
549
549
550
    if (C4::Context->preference("WaitingNotifyAtCheckout") ) {
551
        #Check for waiting holds
552
        my $waiting_holds = $patron->holds->search({ found => 'W', branchcode => $branch })->count;
553
        
554
        $template->param( waiting_holds => $waiting_holds );
555
    }
550
}
556
}
551
557
552
my $fast_cataloging = 0;
558
my $fast_cataloging = 0;
(-)a/installer/data/mysql/atomicupdate/bug_34668-add_WaitingNotifyAtCheckout_syspref.pl (+16 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number  => "34668",
5
    description => "Add syspref WaitingNotifyAtCheckout",
6
    up          => sub {
7
        my ($args) = @_;
8
        my ( $dbh, $out ) = @$args{qw(dbh out)};
9
10
        # Do you stuffs here
11
        $dbh->do(q{INSERT IGNORE INTO `systempreferences` (variable,value,options,explanation,type) VALUES('WaitingNotifyAtCheckout','0',NULL,'If ON, notify librarians of waiting holds for the patron whose items they are checking out.','YesNo') });
12
13
        say $out "Added new system preference 'WaitingNotifyAtCheckout'";
14
15
    },
16
};
(-)a/installer/data/mysql/mandatory/sysprefs.sql (+1 lines)
Lines 793-798 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
793
('viewMARC','1','','Allow display of MARC view of bibiographic records','YesNo'),
793
('viewMARC','1','','Allow display of MARC view of bibiographic records','YesNo'),
794
('virtualshelves','1','','If ON, enables Lists management','YesNo'),
794
('virtualshelves','1','','If ON, enables Lists management','YesNo'),
795
('WaitingNotifyAtCheckin','0',NULL,'If ON, notify librarians of waiting holds for the patron whose items they are checking in.','YesNo'),
795
('WaitingNotifyAtCheckin','0',NULL,'If ON, notify librarians of waiting holds for the patron whose items they are checking in.','YesNo'),
796
('WaitingNotifyAtCheckout','0',NULL,'If ON, notify librarians of waiting holds for the patron whose items they are checking out.','YesNo'),
796
('WebBasedSelfCheck','0',NULL,'If ON, enables the web-based self-check system','YesNo'),
797
('WebBasedSelfCheck','0',NULL,'If ON, enables the web-based self-check system','YesNo'),
797
('WhenLostChargeReplacementFee','1',NULL,'If ON, Charge the replacement price when a patron loses an item.','YesNo'),
798
('WhenLostChargeReplacementFee','1',NULL,'If ON, Charge the replacement price when a patron loses an item.','YesNo'),
798
('WhenLostForgiveFine','0',NULL,'If ON, Forgives the fines on an item when it is lost.','YesNo'),
799
('WhenLostForgiveFine','0',NULL,'If ON, Forgives the fines on an item when it is lost.','YesNo'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (+6 lines)
Lines 97-102 Circulation: Link Here
97
                  1: Notify
97
                  1: Notify
98
                  0: "Don't notify"
98
                  0: "Don't notify"
99
            - librarians of waiting holds for the patron whose items they are checking in.
99
            - librarians of waiting holds for the patron whose items they are checking in.
100
        -
101
            - pref: WaitingNotifyAtCheckout
102
              choices:
103
                  1: Notify
104
                  0: "Don't notify"
105
            - librarians of waiting holds for the patron whose items they are checking out.
100
        -
106
        -
101
            - pref: FilterBeforeOverdueReport
107
            - pref: FilterBeforeOverdueReport
102
              choices:
108
              choices:
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (-2 / +33 lines)
Lines 666-672 Link Here
666
                                            <a href="#" title="Checkout settings"><i class="fa-solid fa-sliders"></i></a>
666
                                            <a href="#" title="Checkout settings"><i class="fa-solid fa-sliders"></i></a>
667
                                        </div>
667
                                        </div>
668
668
669
                                        <button type="submit" class="btn btn-primary">Check out</button>
669
                                        [% IF waiting_holds %]
670
                                            <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#circ-warnwaitingholds-modal">Check out</button>
671
                                        [% ELSE %]
672
                                            <button type="submit" class="btn btn-primary">Check out</button>
673
                                        [% END %]
670
674
671
                                        <div class="circ-settings">
675
                                        <div class="circ-settings">
672
676
Lines 865-870 Link Here
865
    </div> <!-- /.modal-dialog -->
869
    </div> <!-- /.modal-dialog -->
866
</div> <!-- /#barcodeSubmittedModal -->
870
</div> <!-- /#barcodeSubmittedModal -->
867
871
872
[% IF waiting_holds %]
873
    <div id="circ-warnwaitingholds-modal" class="modal fade audio-alert-action block">
874
        <div class="modal-dialog">
875
            <div class="modal-content">
876
                <div class="modal-header">
877
                    <h3>This patron has waiting holds</h3>
878
                </div>
879
                <div class="modal-body">
880
                    <ul>
881
                        <li>
882
                            This patron has waiting holds that are available for checkout
883
                        </li>
884
                    </ul>
885
                </div>
886
                <div class="modal-footer">
887
                    <button type="button" class="btn btn-primary" data-dismiss="modal">Ok</button>
888
                </div>
889
            </div>
890
        </div>
891
    </div>
892
[% END %]
893
868
[% MACRO jsinclude BLOCK %]
894
[% MACRO jsinclude BLOCK %]
869
    [% INCLUDE 'datatables.inc' %]
895
    [% INCLUDE 'datatables.inc' %]
870
    [% INCLUDE 'columns_settings.inc' %]
896
    [% INCLUDE 'columns_settings.inc' %]
Lines 931-936 Link Here
931
            var newin = window.open(link, 'popup', 'width=600,height=400,resizable=1,toolbar=0,scrollbars=1,top');
957
            var newin = window.open(link, 'popup', 'width=600,height=400,resizable=1,toolbar=0,scrollbars=1,top');
932
        }
958
        }
933
        $(document).ready(function() {
959
        $(document).ready(function() {
960
            [% IF waiting_holds %]
961
                $('#circ-warnwaitingholds-modal .btn-primary').on('click',function() {
962
                    $('#mainform').submit();
963
                });
964
            [% END %]
965
934
            $('#mainform').on('submit',function() {
966
            $('#mainform').on('submit',function() {
935
                if ($("#barcode") && $("#barcode").val()) {
967
                if ($("#barcode") && $("#barcode").val()) {
936
                    $('#barcode').on('keypress',function(event) {
968
                    $('#barcode').on('keypress',function(event) {
937
- 

Return to bug 34668