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 670-675 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
670
('RealTimeHoldsQueue', '0', NULL, 'Enable updating the holds queue in real time', 'YesNo'),
670
('RealTimeHoldsQueue', '0', NULL, 'Enable updating the holds queue in real time', 'YesNo'),
671
('RecallsLog','1',NULL,'If ON, log create/cancel/expire/fulfill actions on recalls','YesNo'),
671
('RecallsLog','1',NULL,'If ON, log create/cancel/expire/fulfill actions on recalls','YesNo'),
672
('RecallsMaxPickUpDelay','7',NULL,'Define the maximum time a recall can be awaiting pickup','Integer'),
672
('RecallsMaxPickUpDelay','7',NULL,'Define the maximum time a recall can be awaiting pickup','Integer'),
673
('RecallsRecordLevel', '1', NULL, 'If disabled, only item-level recalls could be requested, rather than a record-level recall for the next available item.', 'YesNo'),
673
('RecordLocalUseOnReturn','0',NULL,'If ON, statistically record returns of unissued items as local use, instead of return','YesNo'),
674
('RecordLocalUseOnReturn','0',NULL,'If ON, statistically record returns of unissued items as local use, instead of return','YesNo'),
674
('RecordStaffUserOnCheckout', '0', '', 'If enabled, when an item is checked out, the user who checked out the item is recorded', 'YesNo'),
675
('RecordStaffUserOnCheckout', '0', '', 'If enabled, when an item is checked out, the user who checked out the item is recorded', 'YesNo'),
675
('RedirectGuaranteeEmail', '0', NULL, 'Enable the ability to redirect guarantee email messages to guarantor.', 'YesNo'),
676
('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 (-3 / +9 lines)
Lines 1494-1504 Circulation: Link Here
1494
            - class: integer
1494
            - class: integer
1495
            - days.
1495
            - days.
1496
        -
1496
        -
1497
            - Recalls
1497
            - pref: UseRecalls
1498
            - pref: UseRecalls
1498
              choices:
1499
              choices:
1499
                  1: Use
1500
                  1: "are enabled"
1500
                  0: "Don't use"
1501
                  0: "are disabled"
1501
            - recalls. Make sure you configure <a href="/cgi-bin/koha/admin/smart-rules.pl">circulation and fine rules</a> for recalls once enabled.
1502
            - . When enabled, recalls can be placed
1503
            - pref: RecallsRecordLevel
1504
              choices:
1505
                  1: "at both the item-level and the record-level"
1506
                  0: "at the item-level only"
1507
            - . Make sure you configure <a href="/cgi-bin/koha/admin/smart-rules.pl">circulation and fine rules</a> for recalls once enabled.
1502
1508
1503
    SIP2:
1509
    SIP2:
1504
        -
1510
        -
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-recall.tt (-4 / +17 lines)
Lines 91-98 Link Here
91
                                                    <input type="text" name="expirationdate" id="expirationdate" size="20" class="flatpickr futuredate" />
91
                                                    <input type="text" name="expirationdate" id="expirationdate" size="20" class="flatpickr futuredate" />
92
                                                    <span id="expiration-hint">[% INCLUDE 'date-format.inc' %]</span>
92
                                                    <span id="expiration-hint">[% INCLUDE 'date-format.inc' %]</span>
93
                                                </li>
93
                                                </li>
94
                                                <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>
94
                                                [% IF Koha.Preference('RecallsRecordLevel') %]
95
                                                <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>
95
                                                    <li class="level-option" style="display:none;"
96
                                                        ><label for="bibliolevel">Recall next available item</label> <input type="radio" name="type" id="bibliolevel" value="bibliolevel" checked
97
                                                    /></li>
98
                                                [% END %]
99
                                                <li class="level-option" style="display:none;"
100
                                                    ><label for="itemlevel">Recall a specific item</label> [% IF Koha.Preference('RecallsRecordLevel') %]
101
                                                        <input type="radio" name="type" id="itemlevel" value="itemlevel" />
102
                                                    [% ELSE %]
103
                                                        <input type="radio" name="type" id="itemlevel" value="itemlevel" checked />
104
                                                    [% END %]</li
105
                                                >
96
                                            </ul>
106
                                            </ul>
97
107
98
                                            <table class="table table-bordered table-striped" id="items">
108
                                            <table class="table table-bordered table-striped" id="items">
Lines 197-203 Link Here
197
    <script>
207
    <script>
198
        $(document).ready(function () {
208
        $(document).ready(function () {
199
            $(".level-option").show();
209
            $(".level-option").show();
200
            $("#items").hide();
210
            [% IF Koha.Preference('RecallsRecordLevel') %]
211
                $("#items").hide();
212
            [% ELSE %]
213
                $("#items").show();
214
            [% END %]
201
            $("#expiration-hint").hide();
215
            $("#expiration-hint").hide();
202
            $("#itemlevel").click(function () {
216
            $("#itemlevel").click(function () {
203
                if ($("#itemlevel").is(":checked")) {
217
                if ($("#itemlevel").is(":checked")) {
204
- 

Return to bug 40258