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

(-)a/installer/data/mysql/atomicupdate/bug_40258_-_add_RecallsRecordLevel_syspref.pl (+17 lines)
Line 0 Link Here
1
use Modern::Perl;
2
use Koha::Installer::Output qw(say_warning say_success say_info);
3
4
return {
5
    bug_number  => "40258",
6
    description => "Option to only use item-level recalls and disable record-level recalls",
7
    up          => sub {
8
        my ($args) = @_;
9
        my ( $dbh, $out ) = @$args{qw(dbh out)};
10
11
        $dbh->do(
12
            q{INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('RecallsRecordLevel', '1', NULL, 'If disabled, only item-level recalls could be requested, rather than a record-level recall for the next available item.', 'YesNo')}
13
        );
14
15
        say_success( $out, "Added new system preference 'RecallsRecordLevel'" );
16
    },
17
};
(-)a/installer/data/mysql/mandatory/sysprefs.sql (+1 lines)
Lines 667-672 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
667
('RealTimeHoldsQueue', '0', NULL, 'Enable updating the holds queue in real time', 'YesNo'),
667
('RealTimeHoldsQueue', '0', NULL, 'Enable updating the holds queue in real time', 'YesNo'),
668
('RecallsLog','1',NULL,'If ON, log create/cancel/expire/fulfill actions on recalls','YesNo'),
668
('RecallsLog','1',NULL,'If ON, log create/cancel/expire/fulfill actions on recalls','YesNo'),
669
('RecallsMaxPickUpDelay','7',NULL,'Define the maximum time a recall can be awaiting pickup','Integer'),
669
('RecallsMaxPickUpDelay','7',NULL,'Define the maximum time a recall can be awaiting pickup','Integer'),
670
('RecallsRecordLevel', '1', NULL, 'If disabled, only item-level recalls could be requested, rather than a record-level recall for the next available item.', 'YesNo'),
670
('RecordLocalUseOnReturn','0',NULL,'If ON, statistically record returns of unissued items as local use, instead of return','YesNo'),
671
('RecordLocalUseOnReturn','0',NULL,'If ON, statistically record returns of unissued items as local use, instead of return','YesNo'),
671
('RecordStaffUserOnCheckout', '0', '', 'If enabled, when an item is checked out, the user who checked out the item is recorded', 'YesNo'),
672
('RecordStaffUserOnCheckout', '0', '', 'If enabled, when an item is checked out, the user who checked out the item is recorded', 'YesNo'),
672
('RedirectGuaranteeEmail', '0', NULL, 'Enable the ability to redirect guarantee email messages to guarantor.', 'YesNo'),
673
('RedirectGuaranteeEmail', '0', NULL, 'Enable the ability to redirect guarantee email messages to guarantor.', 'YesNo'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (-4 / +10 lines)
Lines 1488-1498 Circulation: Link Here
1488
            - class: integer
1488
            - class: integer
1489
            - days.
1489
            - days.
1490
        -
1490
        -
1491
            - Recalls
1491
            - pref: UseRecalls
1492
            - pref: UseRecalls
1492
              choices:
1493
              choices:
1493
                  1: Use
1494
                  1: "are enabled"
1494
                  0: "Don't use"
1495
                  0: "are disabled"
1495
            - recalls. Make sure you configure <a href="/cgi-bin/koha/admin/smart-rules.pl">circulation and fine rules</a> for recalls once enabled.
1496
            - . When enabled, recalls can be placed
1497
            - pref: RecallsRecordLevel
1498
              choices:
1499
                  1: "at both the item-level and the record-level"
1500
                  0: "at the item-level only"
1501
            - . Make sure you configure <a href="/cgi-bin/koha/admin/smart-rules.pl">circulation and fine rules</a> for recalls once enabled.
1496
1502
1497
    SIP2:
1503
    SIP2:
1498
        -
1504
        -
Lines 1534-1537 Circulation: Link Here
1534
              choices:
1540
              choices:
1535
                  1: Enable
1541
                  1: Enable
1536
                  0: Disable
1542
                  0: Disable
1537
            - "the curbside pickup module."
1543
            - "the curbside pickup module."
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-recall.tt (-4 / +17 lines)
Lines 84-91 Link Here
84
                                                    <input type="text" name="expirationdate" id="expirationdate" size="20" class="flatpickr futuredate" />
84
                                                    <input type="text" name="expirationdate" id="expirationdate" size="20" class="flatpickr futuredate" />
85
                                                    <span id="expiration-hint">[% INCLUDE 'date-format.inc' %]</span>
85
                                                    <span id="expiration-hint">[% INCLUDE 'date-format.inc' %]</span>
86
                                                </li>
86
                                                </li>
87
                                                <li class="level-option" style="display:none;"><label for="bibliolevel">Recall next available item</label> <input type="radio" name="type" id="bibliolevel" value="bibliolevel" checked /></li>
87
                                                [% IF Koha.Preference('RecallsRecordLevel') %]
88
                                                <li class="level-option" style="display:none;"><label for="itemlevel">Recall a specific item</label> <input type="radio" name="type" id="itemlevel" value="itemlevel" /></li>
88
                                                    <li class="level-option" style="display:none;"
89
                                                        ><label for="bibliolevel">Recall next available item</label> <input type="radio" name="type" id="bibliolevel" value="bibliolevel" checked
90
                                                    /></li>
91
                                                [% END %]
92
                                                <li class="level-option" style="display:none;"
93
                                                    ><label for="itemlevel">Recall a specific item</label> [% IF Koha.Preference('RecallsRecordLevel') %]
94
                                                        <input type="radio" name="type" id="itemlevel" value="itemlevel" />
95
                                                    [% ELSE %]
96
                                                        <input type="radio" name="type" id="itemlevel" value="itemlevel" checked />
97
                                                    [% END %]</li
98
                                                >
89
                                            </ul>
99
                                            </ul>
90
100
91
                                            <table class="table table-bordered table-striped" id="items">
101
                                            <table class="table table-bordered table-striped" id="items">
Lines 190-196 Link Here
190
    <script>
200
    <script>
191
        $(document).ready(function () {
201
        $(document).ready(function () {
192
            $(".level-option").show();
202
            $(".level-option").show();
193
            $("#items").hide();
203
            [% IF Koha.Preference('RecallsRecordLevel') %]
204
                $("#items").hide();
205
            [% ELSE %]
206
                $("#items").show();
207
            [% END %]
194
            $("#expiration-hint").hide();
208
            $("#expiration-hint").hide();
195
            $("#itemlevel").click(function () {
209
            $("#itemlevel").click(function () {
196
                if ($("#itemlevel").is(":checked")) {
210
                if ($("#itemlevel").is(":checked")) {
197
- 

Return to bug 40258