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

(-)a/C4/Circulation.pm (-6 / +6 lines)
Lines 392-398 sub transferbook { Link Here
392
    }
392
    }
393
393
394
    # find recall
394
    # find recall
395
    if ( C4::Context->preference('UseRecalls') ) {
395
    if ( C4::Context->preference('UseRecalls') ne "off" ) {
396
        my $recall = Koha::Recalls->find( { item_id => $itemnumber, status => 'in_transit' } );
396
        my $recall = Koha::Recalls->find( { item_id => $itemnumber, status => 'in_transit' } );
397
        if ( defined $recall ) {
397
        if ( defined $recall ) {
398
398
Lines 1176-1182 sub CanBookBeIssued { Link Here
1176
    # CHECK IF ITEM HAS BEEN RECALLED BY ANOTHER PATRON
1176
    # CHECK IF ITEM HAS BEEN RECALLED BY ANOTHER PATRON
1177
    # Only bother doing this if UseRecalls is enabled and the item is recallable
1177
    # Only bother doing this if UseRecalls is enabled and the item is recallable
1178
    # Don't look at recalls that are in transit
1178
    # Don't look at recalls that are in transit
1179
    if ( C4::Context->preference('UseRecalls') and $item_object->can_be_waiting_recall ) {
1179
    if ( C4::Context->preference('UseRecalls') ne "off" and $item_object->can_be_waiting_recall ) {
1180
        my @recalls = $biblio->recalls( {}, { order_by => { -asc => 'created_date' } } )->filter_by_current->as_list;
1180
        my @recalls = $biblio->recalls( {}, { order_by => { -asc => 'created_date' } } )->filter_by_current->as_list;
1181
1181
1182
        foreach my $r (@recalls) {
1182
        foreach my $r (@recalls) {
Lines 1705-1711 sub AddIssue { Link Here
1705
                $item_object->discard_changes;
1705
                $item_object->discard_changes;
1706
            }
1706
            }
1707
1707
1708
            if ( C4::Context->preference('UseRecalls') ) {
1708
            if ( C4::Context->preference('UseRecalls') ne "off" ) {
1709
                Koha::Recalls->move_recall(
1709
                Koha::Recalls->move_recall(
1710
                    {
1710
                    {
1711
                        action         => $cancel_recall,
1711
                        action         => $cancel_recall,
Lines 2582-2588 sub AddReturn { Link Here
2582
    }
2582
    }
2583
2583
2584
    # find recalls...
2584
    # find recalls...
2585
    if ( C4::Context->preference('UseRecalls') ) {
2585
    if ( C4::Context->preference('UseRecalls') ne "off" ) {
2586
2586
2587
        # check if this item is recallable first, which includes checking if UseRecalls syspref is enabled
2587
        # check if this item is recallable first, which includes checking if UseRecalls syspref is enabled
2588
        my $recall = undef;
2588
        my $recall = undef;
Lines 2672-2678 sub AddReturn { Link Here
2672
        $request->status('RET') if $request;
2672
        $request->status('RET') if $request;
2673
    }
2673
    }
2674
2674
2675
    if ( C4::Context->preference('UseRecalls') ) {
2675
    if ( C4::Context->preference('UseRecalls') ne "off" ) {
2676
2676
2677
        # all recalls that have triggered a transfer will have an allocated itemnumber
2677
        # all recalls that have triggered a transfer will have an allocated itemnumber
2678
        my $transfer_recall = Koha::Recalls->find( { item_id => $item->itemnumber, status => 'in_transit' } );
2678
        my $transfer_recall = Koha::Recalls->find( { item_id => $item->itemnumber, status => 'in_transit' } );
Lines 3253-3259 sub CanBookBeRenewed { Link Here
3253
3253
3254
    }
3254
    }
3255
3255
3256
    if ( C4::Context->preference('UseRecalls') ) {
3256
    if ( C4::Context->preference('UseRecalls') ne "off" ) {
3257
        my $recall = undef;
3257
        my $recall = undef;
3258
        $recall = $item->check_recalls if $item->can_be_waiting_recall;
3258
        $recall = $item->check_recalls if $item->can_be_waiting_recall;
3259
        if ( defined $recall ) {
3259
        if ( defined $recall ) {
(-)a/C4/Search.pm (-1 / +1 lines)
Lines 1988-1994 sub searchResults { Link Here
1988
                        )
1988
                        )
1989
                        : ( '', '', '' );
1989
                        : ( '', '', '' );
1990
                    $reservestatus = C4::Reserves::GetReserveStatus( $item->{itemnumber} );
1990
                    $reservestatus = C4::Reserves::GetReserveStatus( $item->{itemnumber} );
1991
                    if ( C4::Context->preference('UseRecalls') ) {
1991
                    if ( C4::Context->preference('UseRecalls') ne "off" ) {
1992
                        if ( Koha::Recalls->search( { item_id => $item->{itemnumber}, status => 'waiting' } )->count ) {
1992
                        if ( Koha::Recalls->search( { item_id => $item->{itemnumber}, status => 'waiting' } )->count ) {
1993
                            $recallstatus = 'Waiting';
1993
                            $recallstatus = 'Waiting';
1994
                        }
1994
                        }
(-)a/C4/XSLT.pm (-1 / +1 lines)
Lines 369-375 sub buildKohaItemsNamespace { Link Here
369
        my $substatus = '';
369
        my $substatus = '';
370
        my $recalls_count;
370
        my $recalls_count;
371
371
372
        if ( C4::Context->preference('UseRecalls') ) {
372
        if ( C4::Context->preference('UseRecalls') ne "off" ) {
373
            $recalls_count = Koha::Recalls->search( { item_id => $item->itemnumber, status => 'waiting' } )->count;
373
            $recalls_count = Koha::Recalls->search( { item_id => $item->itemnumber, status => 'waiting' } )->count;
374
        }
374
        }
375
375
(-)a/Koha/Biblio.pm (-1 / +1 lines)
Lines 2164-2170 if hold_convert $param is included, this is to say that this a check to convert Link Here
2164
sub can_be_recalled {
2164
sub can_be_recalled {
2165
    my ( $self, $params ) = @_;
2165
    my ( $self, $params ) = @_;
2166
2166
2167
    return 0 if !( C4::Context->preference('UseRecalls') );
2167
    return 0 if ( C4::Context->preference('UseRecalls') eq "off" );
2168
2168
2169
    my $patron = $params->{patron};
2169
    my $patron = $params->{patron};
2170
2170
(-)a/Koha/Item.pm (-2 / +2 lines)
Lines 2473-2479 if hold_convert $param is included, this is to say that this a check to convert Link Here
2473
sub can_be_recalled {
2473
sub can_be_recalled {
2474
    my ( $self, $params ) = @_;
2474
    my ( $self, $params ) = @_;
2475
2475
2476
    return 0 if !( C4::Context->preference('UseRecalls') );
2476
    return 0 if ( C4::Context->preference('UseRecalls') eq "off" );
2477
2477
2478
    # check if this item is not for loan, withdrawn or lost
2478
    # check if this item is not for loan, withdrawn or lost
2479
    return 0 if ( $self->notforloan != 0 );
2479
    return 0 if ( $self->notforloan != 0 );
Lines 2573-2579 At this point the item has already been recalled. We are now at the checkin and Link Here
2573
sub can_be_waiting_recall {
2573
sub can_be_waiting_recall {
2574
    my ($self) = @_;
2574
    my ($self) = @_;
2575
2575
2576
    return 0 if !( C4::Context->preference('UseRecalls') );
2576
    return 0 if ( C4::Context->preference('UseRecalls') eq "off" );
2577
2577
2578
    # check if this item is not for loan, withdrawn or lost
2578
    # check if this item is not for loan, withdrawn or lost
2579
    return 0 if ( $self->notforloan != 0 );
2579
    return 0 if ( $self->notforloan != 0 );
(-)a/circ/circulation.pl (-2 / +2 lines)
Lines 529-535 if ( @$barcodes && $op eq 'cud-checkout' ) { Link Here
529
            }
529
            }
530
            unless ($confirm_required) {
530
            unless ($confirm_required) {
531
                my $switch_onsite_checkout = exists $messages->{ONSITE_CHECKOUT_WILL_BE_SWITCHED};
531
                my $switch_onsite_checkout = exists $messages->{ONSITE_CHECKOUT_WILL_BE_SWITCHED};
532
                if ( C4::Context->preference('UseRecalls') && !$recall_id ) {
532
                if ( C4::Context->preference('UseRecalls') ne "off" && !$recall_id ) {
533
                    my $recall = Koha::Recalls->find(
533
                    my $recall = Koha::Recalls->find(
534
                        {
534
                        {
535
                            biblio_id => $item->biblionumber,
535
                            biblio_id => $item->biblionumber,
Lines 614-620 if ($patron) { Link Here
614
        WaitingHolds => $waiting_holds,
614
        WaitingHolds => $waiting_holds,
615
    );
615
    );
616
616
617
    if ( C4::Context->preference('UseRecalls') ) {
617
    if ( C4::Context->preference('UseRecalls') ne "off" ) {
618
        my $waiting_recalls = $patron->recalls->search( { status => 'waiting' } );
618
        my $waiting_recalls = $patron->recalls->search( { status => 'waiting' } );
619
        $template->param(
619
        $template->param(
620
            recalls => $patron->recalls->filter_by_current->search( {}, { order_by => { -asc => 'created_date' } } ),
620
            recalls => $patron->recalls->filter_by_current->search( {}, { order_by => { -asc => 'created_date' } } ),
(-)a/circ/returns.pl (-2 / +2 lines)
Lines 243-249 if ( $transit && $op eq 'cud-transfer' ) { Link Here
243
    my $transfer = Koha::Item::Transfers->find($transit);
243
    my $transfer = Koha::Item::Transfers->find($transit);
244
    if ($canceltransfer) {
244
    if ($canceltransfer) {
245
        $transfer->cancel( { reason => 'Manual', force => 1 } );
245
        $transfer->cancel( { reason => 'Manual', force => 1 } );
246
        if ( C4::Context->preference('UseRecalls') ) {
246
        if ( C4::Context->preference('UseRecalls') ne "off" ) {
247
            my $recall_transfer_deleted = Koha::Recalls->find( { item_id => $itemnumber, status => 'in_transit' } );
247
            my $recall_transfer_deleted = Koha::Recalls->find( { item_id => $itemnumber, status => 'in_transit' } );
248
            if ( defined $recall_transfer_deleted ) {
248
            if ( defined $recall_transfer_deleted ) {
249
                $recall_transfer_deleted->revert_transfer;
249
                $recall_transfer_deleted->revert_transfer;
Lines 257-263 if ( $transit && $op eq 'cud-transfer' ) { Link Here
257
    my $item     = Koha::Items->find($itemnumber);
257
    my $item     = Koha::Items->find($itemnumber);
258
    my $transfer = $item->get_transfer;
258
    my $transfer = $item->get_transfer;
259
    $transfer->cancel( { reason => 'Manual', force => 1 } );
259
    $transfer->cancel( { reason => 'Manual', force => 1 } );
260
    if ( C4::Context->preference('UseRecalls') ) {
260
    if ( C4::Context->preference('UseRecalls') ne "off" ) {
261
        my $recall_transfer_deleted = Koha::Recalls->find( { item_id => $itemnumber, status => 'in_transit' } );
261
        my $recall_transfer_deleted = Koha::Recalls->find( { item_id => $itemnumber, status => 'in_transit' } );
262
        if ( defined $recall_transfer_deleted ) {
262
        if ( defined $recall_transfer_deleted ) {
263
            $recall_transfer_deleted->revert_transfer;
263
            $recall_transfer_deleted->revert_transfer;
(-)a/circ/transferstoreceive.pl (-2 / +1 lines)
Lines 110-116 while ( my $library = $libraries->next ) { Link Here
110
            }
110
            }
111
111
112
            # check for a recall for this transfer
112
            # check for a recall for this transfer
113
            if ( C4::Context->preference('UseRecalls') ) {
113
            if ( C4::Context->preference('UseRecalls') ne "off" ) {
114
                my $recall = $item->recall;
114
                my $recall = $item->recall;
115
                if ( defined $recall ) {
115
                if ( defined $recall ) {
116
                    $getransf{recall} = $recall;
116
                    $getransf{recall} = $recall;
Lines 137-140 $template->param( Link Here
137
$template->param( fast_cataloging => 1 ) if Koha::BiblioFrameworks->find('FA');
137
$template->param( fast_cataloging => 1 ) if Koha::BiblioFrameworks->find('FA');
138
138
139
output_html_with_http_headers $input, $cookie, $template->output;
139
output_html_with_http_headers $input, $cookie, $template->output;
140
(-)a/installer/data/mysql/atomicupdate/bug_31391_-_add_RecallsInterface_syspref.pl (-16 / +1 lines)
Lines 1-16 Link Here
1
use Modern::Perl;
1
rm 'installer/data/mysql/atomicupdate/bug_31391_-_add_RecallsInterface_syspref.pl'
2
3
return {
4
    bug_number  => "31391",
5
    description => "Staff-side recalls",
6
    up          => sub {
7
        my ($args) = @_;
8
        my ( $dbh, $out ) = @$args{qw(dbh out)};
9
10
        $dbh->do(
11
            q{INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('RecallsInterface','opac','opac|staff|both','The interface that recalls can be placed through','Choice') }
12
        );
13
14
        say $out "Added system preference 'RecallsInterface'";
15
    },
16
};
(-)a/installer/data/mysql/atomicupdate/bug_31391_-_update_UseRecalls_syspref.pl (+22 lines)
Line 0 Link Here
1
use Modern::Perl;
2
use Koha::Installer::Output qw(say_warning say_failure say_success say_info);
3
4
return {
5
    bug_number  => "31391",
6
    description => "Staff-side recalls",
7
    up          => sub {
8
        my ($args) = @_;
9
        my ( $dbh, $out ) = @$args{qw(dbh out)};
10
        try {
11
            $dbh->do(
12
                q{UPDATE systempreferences SET value = "off", options = "off|opac|staff|opac_and_staff", type="Choice" WHERE variable = "UseRecalls" AND value = "0"}
13
            );
14
            $dbh->do(
15
                q{UPDATE systempreferences SET value = "opac", options = "off|opac|staff|opac_and_staff", type="Choice" WHERE variable = "UseRecalls" AND value = "1"}
16
            );
17
            say_success( $out, "Updated system preference 'UseRecalls' to include interface choices" );
18
        } catch {
19
            say_failure( $out, "Database modification failed with errors: $_" );
20
        };
21
    },
22
};
(-)a/installer/data/mysql/mandatory/sysprefs.sql (-2 / +1 lines)
Lines 668-674 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
668
('QuoteOfTheDay','','intranet,opac','Enable or disable display of Quote of the Day on the OPAC and staff interface home page','multiple'),
668
('QuoteOfTheDay','','intranet,opac','Enable or disable display of Quote of the Day on the OPAC and staff interface home page','multiple'),
669
('RandomizeHoldsQueueWeight','0',NULL,'if ON, the holds queue in circulation will be randomized, either based on all location codes, or by the location codes specified in StaticHoldsQueueWeight','YesNo'),
669
('RandomizeHoldsQueueWeight','0',NULL,'if ON, the holds queue in circulation will be randomized, either based on all location codes, or by the location codes specified in StaticHoldsQueueWeight','YesNo'),
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
('RecallsInterface','opac','opac|staff|both','The interface that recalls can be placed through','Choice'),
672
('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'),
673
('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'),
674
('RecordLocalUseOnReturn','0',NULL,'If ON, statistically record returns of unissued items as local use, instead of return','YesNo'),
673
('RecordLocalUseOnReturn','0',NULL,'If ON, statistically record returns of unissued items as local use, instead of return','YesNo'),
Lines 875-881 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
875
('UseICUStyleQuotes','0','1','Tell Koha whether to use ICU style quotes ({) or default (") when tracing subjects .','YesNo'),
874
('UseICUStyleQuotes','0','1','Tell Koha whether to use ICU style quotes ({) or default (") when tracing subjects .','YesNo'),
876
('UseLocationAsAQInSIP', '0', '', 'Use permanent_location instead of homebranch for AQ in SIP response', 'YesNo'),
875
('UseLocationAsAQInSIP', '0', '', 'Use permanent_location instead of homebranch for AQ in SIP response', 'YesNo'),
877
('UseOCLCEncodingLevels','0',NULL,'If enabled, include OCLC encoding levels in leader value builder dropdown for position 17.','YesNo'),
876
('UseOCLCEncodingLevels','0',NULL,'If enabled, include OCLC encoding levels in leader value builder dropdown for position 17.','YesNo'),
878
('UseRecalls','0',NULL,'Enable or disable recalls','YesNo'),
877
('UseRecalls','off','off|opac|staff|opac_and_staff','Enable or disable recalls','Choice'),
879
('UseTransportCostMatrix','0','','Use Transport Cost Matrix when filling holds','YesNo'),
878
('UseTransportCostMatrix','0','','Use Transport Cost Matrix when filling holds','YesNo'),
880
('UseWYSIWYGinSystemPreferences','0','','Show WYSIWYG editor when editing certain HTML system preferences.','YesNo'),
879
('UseWYSIWYGinSystemPreferences','0','','Show WYSIWYG editor when editing certain HTML system preferences.','YesNo'),
881
('viewISBD','1','','Allow display of ISBD view of bibiographic records','YesNo'),
880
('viewISBD','1','','Allow display of ISBD view of bibiographic records','YesNo'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/biblio-view-menu.inc (-1 / +1 lines)
Lines 91-97 Link Here
91
            </li>
91
            </li>
92
        [%- END -%]
92
        [%- END -%]
93
93
94
        [%- IF ( Koha.Preference('UseRecalls') && CAN_user_recalls ) -%]
94
        [%- IF ( Koha.Preference('UseRecalls') != "off" && CAN_user_recalls ) -%]
95
            <li [% IF recallsview %]class="active"[% END %]>
95
            <li [% IF recallsview %]class="active"[% END %]>
96
                <a href="/cgi-bin/koha/recalls/request.pl?biblionumber=[% biblio_object_id | url %]">Recalls ([% biblio.recalls.search( completed => 0 ).count | html %])</a>
96
                <a href="/cgi-bin/koha/recalls/request.pl?biblionumber=[% biblio_object_id | url %]">Recalls ([% biblio.recalls.search( completed => 0 ).count | html %])</a>
97
            </li>
97
            </li>
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc (-3 / +2 lines)
Lines 253-259 Link Here
253
                    <a href="/cgi-bin/koha/members/ill-requests.pl?borrowernumber=[% patron.borrowernumber | uri %]">ILL requests history</a>
253
                    <a href="/cgi-bin/koha/members/ill-requests.pl?borrowernumber=[% patron.borrowernumber | uri %]">ILL requests history</a>
254
                </li>
254
                </li>
255
            [% END %]
255
            [% END %]
256
            [% IF Koha.Preference('UseRecalls') && CAN_user_recalls %]
256
            [% IF Koha.Preference('UseRecalls') != "off" && CAN_user_recalls %]
257
                <li [% IF recallsview %]class="active"[% END %]>
257
                <li [% IF recallsview %]class="active"[% END %]>
258
                    <a href="/cgi-bin/koha/members/recallshistory.pl?borrowernumber=[% patron.borrowernumber | uri %]">Recalls history</a>
258
                    <a href="/cgi-bin/koha/members/recallshistory.pl?borrowernumber=[% patron.borrowernumber | uri %]">Recalls history</a>
259
                </li>
259
                </li>
Lines 291-298 Link Here
291
                                        <div class="hint">
291
                                        <div class="hint">
292
                                            [% patron.title | html %] [% patron.firstname | html %] [% patron.surname | html %] does not currently have an image available. To import an image for [% patron.title | html %]
292
                                            [% patron.title | html %] [% patron.firstname | html %] [% patron.surname | html %] does not currently have an image available. To import an image for [% patron.title | html %]
293
                                            [% patron.firstname | html %]
293
                                            [% patron.firstname | html %]
294
                                            [% patron.surname | html %],
294
                                            [% patron.surname | html %], enter the name of an image file to upload.
295
                                            enter the name of an image file to upload.
296
                                        </div>
295
                                        </div>
297
                                    [% END # /IF patron.image %]
296
                                    [% END # /IF patron.image %]
298
                                    <p>Only PNG, GIF, JPEG, XPM formats are supported.</p>
297
                                    <p>Only PNG, GIF, JPEG, XPM formats are supported.</p>
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-nav.inc (-1 / +1 lines)
Lines 64-70 Link Here
64
        </li>
64
        </li>
65
    </ul>
65
    </ul>
66
66
67
    [% IF Koha.Preference('UseRecalls') and CAN_user_recalls %]
67
    [% IF Koha.Preference('UseRecalls') != "off" and CAN_user_recalls %]
68
        <h5>Recalls</h5>
68
        <h5>Recalls</h5>
69
        <ul>
69
        <ul>
70
            <li>
70
            <li>
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc (-3 / +3 lines)
Lines 79-85 Link Here
79
                                        <option value="[% hold.priority | html %]" selected="selected">[% this_priority | html %]</option>
79
                                        <option value="[% hold.priority | html %]" selected="selected">[% this_priority | html %]</option>
80
                                    [% END %]
80
                                    [% END %]
81
                                    <option value="del">del</option>
81
                                    <option value="del">del</option>
82
                                    [% IF Koha.Preference('UseRecalls') AND Koha.Preference('RecallsInterface') != 'opac' %]
82
                                    [% IF ( Koha.Preference('UseRecalls').match('staff') %]
83
                                        <option value="recall">recall</option>
83
                                        <option value="recall">recall</option>
84
                                    [% END %]
84
                                    [% END %]
85
                                </select>
85
                                </select>
Lines 97-103 Link Here
97
                                    [% ELSE %]
97
                                    [% ELSE %]
98
                                        <option value="[% hold.priority | html %]" selected="selected">[% this_priority | html %]</option>
98
                                        <option value="[% hold.priority | html %]" selected="selected">[% this_priority | html %]</option>
99
                                    [% END %]
99
                                    [% END %]
100
                                    [% IF Koha.Preference('UseRecalls') AND Koha.Preference('RecallsInterface') != 'opac' %]
100
                                    [% IF ( Koha.Preference('UseRecalls').match('staff') ) %]
101
                                        <option value="recall">recall</option>
101
                                        <option value="recall">recall</option>
102
                                    [% END %]
102
                                    [% END %]
103
                                </select>
103
                                </select>
Lines 382-388 Link Here
382
                    <td></td>
382
                    <td></td>
383
                [% END %]
383
                [% END %]
384
                <td>
384
                <td>
385
                    [% IF Koha.Preference('UseRecalls') AND Koha.Preference('RecallsInterface') != 'opac' %]
385
                    [% IF ( Koha.Preference('UseRecalls').match('staff') ) %]
386
                        <a class="convert-to-recall btn" title="Convert hold to recall" data-id="[% hold.reserve_id | html %]">Mark for conversion to recall</a>
386
                        <a class="convert-to-recall btn" title="Convert hold to recall" data-id="[% hold.reserve_id | html %]">Mark for conversion to recall</a>
387
                    [% END %]
387
                    [% END %]
388
                </td>
388
                </td>
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc (-2 / +2 lines)
Lines 261-267 Link Here
261
        [% IF biblio.serial %]
261
        [% IF biblio.serial %]
262
            embed.push('serial_item.serial');
262
            embed.push('serial_item.serial');
263
        [% END %]
263
        [% END %]
264
        [% IF Koha.Preference('UseRecalls') %]
264
        [% IF Koha.Preference('UseRecalls') != "off" %]
265
            embed.push('recall', 'recall+strings', 'recall.patron')
265
            embed.push('recall', 'recall+strings', 'recall.patron')
266
        [% END %]
266
        [% END %]
267
        embed.push('in_bundle', 'bundle_host', 'bundle_host.biblio', 'bundle_items_lost+count', 'bundle_items_not_lost+count');
267
        embed.push('in_bundle', 'bundle_host', 'bundle_host.biblio', 'bundle_items_lost+count', 'bundle_items_not_lost+count');
Lines 591-597 Link Here
591
                                }
591
                                }
592
                            }
592
                            }
593
593
594
                        [% IF Koha.Preference('UseRecalls') %]
594
                        [% IF Koha.Preference('UseRecalls') != "off" %]
595
                            if ( row.recall && ( row.item_id === row.recall.item_id ) ) {
595
                            if ( row.recall && ( row.item_id === row.recall.item_id ) ) {
596
                                if ( row.recall.waiting_date ) {
596
                                if ( row.recall.waiting_date ) {
597
                                    nodes += '<span class="holding_status recallwaiting">%s</span>'.format(_("Waiting recall at %s since %s").format(escape_str(row.recall._strings.pickup_library_id.str), $date(row.recall.waiting_date)));
597
                                    nodes += '<span class="holding_status recallwaiting">%s</span>'.format(_("Waiting recall at %s since %s").format(escape_str(row.recall._strings.pickup_library_id.str), $date(row.recall.waiting_date)));
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/messaging-preference-form.inc (-1 / +1 lines)
Lines 24-30 Link Here
24
            [% NEXT IF !Koha.Preference('MembershipExpiryDaysNotice') && messaging_preference.Patron_Expiry %]
24
            [% NEXT IF !Koha.Preference('MembershipExpiryDaysNotice') && messaging_preference.Patron_Expiry %]
25
            [% NEXT IF messaging_preference.Patron_Expiry && (category.enforce_expiry_notice || patron.category.enforce_expiry_notice) %]
25
            [% NEXT IF messaging_preference.Patron_Expiry && (category.enforce_expiry_notice || patron.category.enforce_expiry_notice) %]
26
            [% NEXT IF messaging_preference.Auto_Renewals && Koha.Preference('AutoRenewalNotices') != 'preferences' %]
26
            [% NEXT IF messaging_preference.Auto_Renewals && Koha.Preference('AutoRenewalNotices') != 'preferences' %]
27
            [% NEXT IF !Koha.Preference('UseRecalls') && messaging_preference.message_name.match('^Recall_') %]
27
            [% NEXT IF Koha.Preference('UseRecalls') != "off" && messaging_preference.message_name.match('^Recall_') %]
28
            <tr id="[% messaging_preference.message_name _ "_message" | lower | html %]">
28
            <tr id="[% messaging_preference.message_name _ "_message" | lower | html %]">
29
                <td
29
                <td
30
                    >[% IF ( messaging_preference.Item_Due ) %]
30
                    >[% IF ( messaging_preference.Item_Due ) %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-detail-tabs.inc (-2 / +2 lines)
Lines 33-39 Link Here
33
            [% END %]
33
            [% END %]
34
        [% END %]
34
        [% END %]
35
35
36
        [% IF Koha.Preference('UseRecalls') %]
36
        [% IF Koha.Preference('UseRecalls') != "off" %]
37
            [% WRAPPER tab_item tabname= "recalls" %]
37
            [% WRAPPER tab_item tabname= "recalls" %]
38
                <span>Recalls</span> ([% recalls.count || 0 | html %])
38
                <span>Recalls</span> ([% recalls.count || 0 | html %])
39
            [% END %]
39
            [% END %]
Lines 217-223 Link Here
217
            [% END %]
217
            [% END %]
218
        [% END %]
218
        [% END %]
219
219
220
        [% IF Koha.Preference('UseRecalls') %]
220
        [% IF Koha.Preference('UseRecalls') != "off" %]
221
            [% WRAPPER tab_panel tabname="recalls" %]
221
            [% WRAPPER tab_panel tabname="recalls" %]
222
                [% INCLUDE 'recalls.inc' %]
222
                [% INCLUDE 'recalls.inc' %]
223
            [% END # /tab_panel# %]
223
            [% END # /tab_panel# %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (-13 / +7 lines)
Lines 1494-1514 Circulation: Link Here
1494
            - class: integer
1494
            - class: integer
1495
            - days.
1495
            - days.
1496
        -
1496
        -
1497
            - Recalls
1497
            - pref: UseRecalls
1498
            - pref: UseRecalls
1498
              type: boolean
1499
              default: off
1499
              choices:
1500
              choices:
1500
                  1: Use
1501
                  off: are disabled
1501
                  0: "Don't use"
1502
                  opac: can be placed through the OPAC only
1502
            - recalls. Make sure you configure <a href="/cgi-bin/koha/admin/smart-rules.pl">circulation and fine rules</a> for recalls once enabled.
1503
                  staff: can be placed through the staff interface only
1503
        -
1504
                  opac_and_staff: can be placed through both the OPAC and staff interface
1504
            - Recalls can be placed through
1505
            - . Make sure you configure <a href="/cgi-bin/koha/admin/smart-rules.pl">circulation and fine rules</a> for recalls when enabled.
1505
            - pref: RecallsInterface
1506
              default: opac
1507
              choices:
1508
                  opac: the OPAC only
1509
                  staff: the staff interface only
1510
                  both: both the OPAC and the staff interface
1511
            - . (Requires <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=UseRecalls">UseRecalls</a>.)
1512
1506
1513
    SIP2:
1507
    SIP2:
1514
        -
1508
        -
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt (-4 / +4 lines)
Lines 160-166 Link Here
160
                            <th>Article requests</th>
160
                            <th>Article requests</th>
161
                        [% END %]
161
                        [% END %]
162
                        <th>Rental discount (%)</th>
162
                        <th>Rental discount (%)</th>
163
                        [% IF Koha.Preference('UseRecalls') %]
163
                        [% IF Koha.Preference('UseRecalls') != "off" %]
164
                            <th>Recalls allowed (total)</th>
164
                            <th>Recalls allowed (total)</th>
165
                            <th>Recalls per record (count)</th>
165
                            <th>Recalls per record (count)</th>
166
                            <th>On shelf recalls allowed</th>
166
                            <th>On shelf recalls allowed</th>
Lines 426-432 Link Here
426
                                        </td>
426
                                        </td>
427
                                    [% END %]
427
                                    [% END %]
428
                                    <td>[% rentaldiscount | html %]</td>
428
                                    <td>[% rentaldiscount | html %]</td>
429
                                    [% IF Koha.Preference('UseRecalls') %]
429
                                    [% IF Koha.Preference('UseRecalls') != "off" %]
430
                                        <td>[% recalls_allowed | html %]</td>
430
                                        <td>[% recalls_allowed | html %]</td>
431
                                        <td>[% recalls_per_record | html %]</td>
431
                                        <td>[% recalls_per_record | html %]</td>
432
                                        <td data-code="[% on_shelf_recalls | html %]">
432
                                        <td data-code="[% on_shelf_recalls | html %]">
Lines 576-582 Link Here
576
                            </td>
576
                            </td>
577
                        [% END %]
577
                        [% END %]
578
                        <td><input type="text" name="rentaldiscount" id="rentaldiscount" size="3" inputmode="decimal" pattern="^\d+(\.\d{2})?$" /></td>
578
                        <td><input type="text" name="rentaldiscount" id="rentaldiscount" size="3" inputmode="decimal" pattern="^\d+(\.\d{2})?$" /></td>
579
                        [% IF Koha.Preference('UseRecalls') %]
579
                        [% IF Koha.Preference('UseRecalls') != "off" %]
580
                            <td><input type="text" name="recalls_allowed" id="recalls_allowed" size="3" /></td>
580
                            <td><input type="text" name="recalls_allowed" id="recalls_allowed" size="3" /></td>
581
                            <td><input type="text" name="recalls_per_record" id="recalls_per_record" size="3" /></td>
581
                            <td><input type="text" name="recalls_per_record" id="recalls_per_record" size="3" /></td>
582
                            <td>
582
                            <td>
Lines 641-647 Link Here
641
                            <th>Article requests</th>
641
                            <th>Article requests</th>
642
                        [% END %]
642
                        [% END %]
643
                        <th>Rental discount (%)</th>
643
                        <th>Rental discount (%)</th>
644
                        [% IF Koha.Preference('UseRecalls') %]
644
                        [% IF Koha.Preference('UseRecalls') != "off" %]
645
                            <th>Recalls allowed (total)</th>
645
                            <th>Recalls allowed (total)</th>
646
                            <th>Recalls per record (count)</th>
646
                            <th>Recalls per record (count)</th>
647
                            <th>On shelf recalls allowed</th>
647
                            <th>On shelf recalls allowed</th>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt (-1 / +1 lines)
Lines 706-712 Link Here
706
                                                    <span>Holds ([% SEARCH_RESULT.biblio_object.holds.count | html %])</span>
706
                                                    <span>Holds ([% SEARCH_RESULT.biblio_object.holds.count | html %])</span>
707
                                                [% END %]
707
                                                [% END %]
708
                                            [% END # /IF SEARCH_RESULT.norequests %]
708
                                            [% END # /IF SEARCH_RESULT.norequests %]
709
                                            [% IF Koha.Preference('UseRecalls') and CAN_user_recalls %]
709
                                            [% IF Koha.Preference('UseRecalls') != "off" and CAN_user_recalls %]
710
                                                |
710
                                                |
711
                                                <a id="recall_[% SEARCH_RESULT.biblionumber | html %]" href="/cgi-bin/koha/recalls/request.pl?biblionumber=[% SEARCH_RESULT.biblionumber | html %]"
711
                                                <a id="recall_[% SEARCH_RESULT.biblionumber | html %]" href="/cgi-bin/koha/recalls/request.pl?biblionumber=[% SEARCH_RESULT.biblionumber | html %]"
712
                                                    >Recalls ([% SEARCH_RESULT.biblio_object.recalls.search( completed => 0 ).count | html %])</a
712
                                                    >Recalls ([% SEARCH_RESULT.biblio_object.recalls.search( completed => 0 ).count | html %])</a
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt (-1 / +1 lines)
Lines 104-110 Link Here
104
                </ul>
104
                </ul>
105
            </div>
105
            </div>
106
106
107
            [% IF Koha.Preference('UseRecalls') and CAN_user_recalls %]
107
            [% IF Koha.Preference('UseRecalls') != off and CAN_user_recalls %]
108
                <div class="recalls">
108
                <div class="recalls">
109
                    <h3>Recalls</h3>
109
                    <h3>Recalls</h3>
110
110
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/recallshistory.tt (-1 / +1 lines)
Lines 39-45 Link Here
39
[% WRAPPER 'main-container.inc' aside='circ-menu' %]
39
[% WRAPPER 'main-container.inc' aside='circ-menu' %]
40
    [% INCLUDE 'members-toolbar.inc' %]
40
    [% INCLUDE 'members-toolbar.inc' %]
41
    <h1>Recalls history</h1>
41
    <h1>Recalls history</h1>
42
    [% IF Koha.Preference('UseRecalls') %]
42
    [% IF Koha.Preference('UseRecalls') != "off" %]
43
        <input type="checkbox" id="hide_old" name="hide_old" checked="checked" />
43
        <input type="checkbox" id="hide_old" name="hide_old" checked="checked" />
44
        <label for="hide_old">Show old recalls</label>
44
        <label for="hide_old">Show old recalls</label>
45
        [% INCLUDE 'recalls.inc' %]
45
        [% INCLUDE 'recalls.inc' %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/recalls/recalls_old_queue.tt (-1 / +1 lines)
Lines 32-38 Link Here
32
[% SET aside = Koha.Preference('CircSidebar') ? 'circ-nav' : '' %]
32
[% SET aside = Koha.Preference('CircSidebar') ? 'circ-nav' : '' %]
33
[% WRAPPER 'main-container.inc' aside=aside %]
33
[% WRAPPER 'main-container.inc' aside=aside %]
34
    <h1>Old recalls</h1>
34
    <h1>Old recalls</h1>
35
    [% IF Koha.Preference('UseRecalls') %]
35
    [% IF Koha.Preference('UseRecalls') != "off" %]
36
        <div class="page-section"> [% INCLUDE 'recalls.inc' %] </div>
36
        <div class="page-section"> [% INCLUDE 'recalls.inc' %] </div>
37
        <!-- /.page-section -->
37
        <!-- /.page-section -->
38
    [% ELSE %]
38
    [% ELSE %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/recalls/recalls_overdue.tt (-1 / +1 lines)
Lines 32-38 Link Here
32
[% SET aside = Koha.Preference('CircSidebar') ? 'circ-nav' : '' %]
32
[% SET aside = Koha.Preference('CircSidebar') ? 'circ-nav' : '' %]
33
[% WRAPPER 'main-container.inc' aside=aside %]
33
[% WRAPPER 'main-container.inc' aside=aside %]
34
    <h1>Overdue recalls</h1>
34
    <h1>Overdue recalls</h1>
35
    [% IF Koha.Preference('UseRecalls') %]
35
    [% IF Koha.Preference('UseRecalls') != "off" %]
36
        [% IF recalls.count %]
36
        [% IF recalls.count %]
37
            <div class="page-section">
37
            <div class="page-section">
38
                <form method="post" action="/cgi-bin/koha/recalls/recalls_overdue.pl">
38
                <form method="post" action="/cgi-bin/koha/recalls/recalls_overdue.pl">
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/recalls/recalls_queue.tt (-1 / +1 lines)
Lines 32-38 Link Here
32
[% SET aside = Koha.Preference('CircSidebar') ? 'circ-nav' : '' %]
32
[% SET aside = Koha.Preference('CircSidebar') ? 'circ-nav' : '' %]
33
[% WRAPPER 'main-container.inc' aside=aside %]
33
[% WRAPPER 'main-container.inc' aside=aside %]
34
    <h1>Recalls queue</h1>
34
    <h1>Recalls queue</h1>
35
    [% IF Koha.Preference('UseRecalls') %]
35
    [% IF Koha.Preference('UseRecalls') != "off" %]
36
        [% IF recalls.count %]
36
        [% IF recalls.count %]
37
            <div class="page-section">
37
            <div class="page-section">
38
                <form method="post" action="/cgi-bin/koha/recalls/recalls_queue.pl">
38
                <form method="post" action="/cgi-bin/koha/recalls/recalls_queue.pl">
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/recalls/recalls_to_pull.tt (-1 / +1 lines)
Lines 36-42 Link Here
36
[% WRAPPER 'main-container.inc' aside=aside %]
36
[% WRAPPER 'main-container.inc' aside=aside %]
37
    <h1>Recalls to pull</h1>
37
    <h1>Recalls to pull</h1>
38
    The following recalls could be fulfilled by available items.
38
    The following recalls could be fulfilled by available items.
39
    [% IF Koha.Preference('UseRecalls') %]
39
    [% IF Koha.Preference('UseRecalls') != "off" %]
40
        [% IF recalls %]
40
        [% IF recalls %]
41
            <div id="recalls" class="page-section">
41
            <div id="recalls" class="page-section">
42
                <table id="recalls-table">
42
                <table id="recalls-table">
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/recalls/recalls_waiting.tt (-1 / +1 lines)
Lines 33-39 Link Here
33
[% WRAPPER 'main-container.inc' aside=aside %]
33
[% WRAPPER 'main-container.inc' aside=aside %]
34
    <h1>Recalls awaiting pickup</h1>
34
    <h1>Recalls awaiting pickup</h1>
35
35
36
    [% IF Koha.Preference('UseRecalls') %]
36
    [% IF Koha.Preference('UseRecalls') != "off" %]
37
37
38
        [% WRAPPER tabs id= "results" %]
38
        [% WRAPPER tabs id= "results" %]
39
            [% WRAPPER tabs_nav %]
39
            [% WRAPPER tabs_nav %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/recalls/request.tt (-5 / +5 lines)
Lines 49-59 Link Here
49
    [% IF patron %]
49
    [% IF patron %]
50
50
51
        [% IF error %]
51
        [% IF error %]
52
            <div class="dialog alert"> Unable to place a recall. Check your circulation rules. </div>
52
            <div class="alert alert-warning"> <strong>Cannot place recalls:</strong> check your circulation rules. </div>
53
        [% END %]
53
        [% END %]
54
54
55
        [% IF patron_holds_count %]
55
        [% IF patron_holds_count %]
56
            <div class="dialog alert alert-info"> Patron has placed one or more record-level holds. <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% biblio.biblionumber | uri %]">Convert a hold to a recall</a>. </div>
56
            <div class="alert alert-info"> Patron has placed one or more record-level holds. <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% biblio.biblionumber | uri %]">Convert a hold to a recall</a>. </div>
57
        [% END %]
57
        [% END %]
58
58
59
        <fieldset class="rows">
59
        <fieldset class="rows">
Lines 188-195 Link Here
188
        </fieldset>
188
        </fieldset>
189
    [% ELSE %]
189
    [% ELSE %]
190
190
191
        [% IF Koha.Preference('RecallsInterface') == 'opac' %]
191
        [% IF Koha.Preference('UseRecalls') == 'opac' %]
192
            <div class="dialog alert"> Due to the <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=RecallsInterface">RecallsInterface</a> system preference, recalls cannot be placed through the staff interface. </div>
192
            <div class="dialog alert"> Due to the <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=UseRecalls">UseRecalls</a> system preference, recalls cannot be placed through the staff interface. </div>
193
        [% ELSE %]
193
        [% ELSE %]
194
            <fieldset>
194
            <fieldset>
195
                <h2>Search patrons</h2>
195
                <h2>Search patrons</h2>
Lines 211-217 Link Here
211
        <div class="page-section">
211
        <div class="page-section">
212
            <h2>Existing recalls</h2>
212
            <h2>Existing recalls</h2>
213
213
214
            [% IF Koha.Preference('UseRecalls') %]
214
            [% IF Koha.Preference('UseRecalls') != "off" %]
215
                [% IF recalls.count %]
215
                [% IF recalls.count %]
216
                    <div class="page-section">
216
                    <div class="page-section">
217
                        <form method="post" action="/cgi-bin/koha/recalls/request.pl">
217
                        <form method="post" action="/cgi-bin/koha/recalls/request.pl">
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc (-2 / +2 lines)
Lines 63-69 Link Here
63
            <span class="item-status checkedout">Checked out</span>
63
            <span class="item-status checkedout">Checked out</span>
64
        [% END %]
64
        [% END %]
65
    [% END %]
65
    [% END %]
66
    [% IF show_recall_link %]
66
    [% IF show_recall_link != "off" %]
67
        [% IF logged_in_user.borrowernumber != issue.borrowernumber %]
67
        [% IF logged_in_user.borrowernumber != issue.borrowernumber %]
68
            <a href="/cgi-bin/koha/opac-recall.pl?biblionumber=[% item.biblionumber | uri %]" class="btn btn-default btn-xs">Recall</a>
68
            <a href="/cgi-bin/koha/opac-recall.pl?biblionumber=[% item.biblionumber | uri %]" class="btn btn-default btn-xs">Recall</a>
69
        [% END %]
69
        [% END %]
Lines 129-135 Link Here
129
    <span class="item-status pendinghold">Pending hold</span>
129
    <span class="item-status pendinghold">Pending hold</span>
130
[% END %]
130
[% END %]
131
131
132
[% IF Koha.Preference('UseRecalls') && item.has_pending_recall %]
132
[% IF Koha.Preference('UseRecalls') != "off" && item.has_pending_recall %]
133
    [% SET itemavailable = 0 %]
133
    [% SET itemavailable = 0 %]
134
    <span class="item-status pendingrecall">Pending recall</span>
134
    <span class="item-status pendingrecall">Pending recall</span>
135
[% END %]
135
[% END %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-detail-sidebar.inc (-1 / +1 lines)
Lines 13-19 Link Here
13
        [% END %]
13
        [% END %]
14
    [% END %]
14
    [% END %]
15
15
16
    [% IF Koha.Preference('UseRecalls') AND Koha.Preference('RecallsInterface') != 'staff' %]
16
    [% IF Koha.Preference('UseRecalls').match('opac') %]
17
        <li
17
        <li
18
            ><a class="recall btn btn-link btn-lg" href="/cgi-bin/koha/opac-recall.pl?biblionumber=[% biblio.biblionumber | html %]"><i class="fa fa-solid fa-fw fa-book-bookmark" aria-hidden="true"></i> Place recall</a></li
18
            ><a class="recall btn btn-link btn-lg" href="/cgi-bin/koha/opac-recall.pl?biblionumber=[% biblio.biblionumber | html %]"><i class="fa fa-solid fa-fw fa-book-bookmark" aria-hidden="true"></i> Place recall</a></li
19
        >
19
        >
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/usermenu.inc (-1 / +1 lines)
Lines 44-50 Link Here
44
                <li [% IF holdshistoryview %]class="active"[% END %]> <a href="/cgi-bin/koha/opac-holdshistory.pl">Holds history</a></li>
44
                <li [% IF holdshistoryview %]class="active"[% END %]> <a href="/cgi-bin/koha/opac-holdshistory.pl">Holds history</a></li>
45
            [% END %]
45
            [% END %]
46
46
47
            [% IF Koha.Preference('UseRecalls') %]
47
            [% IF Koha.Preference('UseRecalls') != "off" %]
48
                <li [% IF recallsview %]class="active"[% END %]> <a href="/cgi-bin/koha/opac-recalls.pl">Recalls history</a> </li>
48
                <li [% IF recallsview %]class="active"[% END %]> <a href="/cgi-bin/koha/opac-recalls.pl">Recalls history</a> </li>
49
            [% END %]
49
            [% END %]
50
50
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt (-1 / +1 lines)
Lines 77-83 Link Here
77
                                            [% NEXT IF !Koha.Preference('MembershipExpiryDaysNotice') && messaging_preference.Patron_Expiry %]
77
                                            [% NEXT IF !Koha.Preference('MembershipExpiryDaysNotice') && messaging_preference.Patron_Expiry %]
78
                                            [% NEXT IF messaging_preference.Patron_Expiry && enforce_expiry_notice %]
78
                                            [% NEXT IF messaging_preference.Patron_Expiry && enforce_expiry_notice %]
79
                                            [% NEXT IF messaging_preference.Auto_Renewals && Koha.Preference('AutoRenewalNotices') != 'preferences' %]
79
                                            [% NEXT IF messaging_preference.Auto_Renewals && Koha.Preference('AutoRenewalNotices') != 'preferences' %]
80
                                            [% NEXT IF !Koha.Preference('UseRecalls') && messaging_preference.message_name.match('^Recall_') %]
80
                                            [% NEXT IF Koha.Preference('UseRecalls') != "off" && messaging_preference.message_name.match('^Recall_') %]
81
                                            <tr id="[% messaging_preference.message_name _ "_message" | lower | html %]">
81
                                            <tr id="[% messaging_preference.message_name _ "_message" | lower | html %]">
82
                                                <td
82
                                                <td
83
                                                    >[% IF ( messaging_preference.Item_Due ) %]
83
                                                    >[% IF ( messaging_preference.Item_Due ) %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-recalls.tt (-1 / +1 lines)
Lines 34-40 Link Here
34
            <div class="col-md-12 col-lg-10 order-1 order-lg-2">
34
            <div class="col-md-12 col-lg-10 order-1 order-lg-2">
35
                <div id="recalls" class="maincontent">
35
                <div id="recalls" class="maincontent">
36
                    <h1>Recalls history</h1>
36
                    <h1>Recalls history</h1>
37
                    [% IF Koha.Preference('UseRecalls') %]
37
                    [% IF Koha.Preference('UseRecalls') != "off" %]
38
                        [% IF RECALLS.count %]
38
                        [% IF RECALLS.count %]
39
                            <div id="opac-user-recalls">
39
                            <div id="opac-user-recalls">
40
                                <table id="recalls-table" class="table table-bordered table-striped">
40
                                <table id="recalls-table" class="table table-bordered table-striped">
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt (-1 / +1 lines)
Lines 13-19 Link Here
13
[% SET CartEnabled = ( Koha.Preference('opacbookbag') == 1 ) %]
13
[% SET CartEnabled = ( Koha.Preference('opacbookbag') == 1 ) %]
14
[% SET ListsEnabled = ( Koha.Preference('virtualshelves') == 1 ) && LoginEnabled %]
14
[% SET ListsEnabled = ( Koha.Preference('virtualshelves') == 1 ) && LoginEnabled %]
15
[% SET HoldsEnabled = ( Koha.Preference('OPACHoldRequests') == 1 ) && LoginEnabled %]
15
[% SET HoldsEnabled = ( Koha.Preference('OPACHoldRequests') == 1 ) && LoginEnabled %]
16
[% SET RecallsEnabled = ( Koha.Preference('UseRecalls') == 1 ) && LoginEnabled && ( Koha.Preference('RecallsInterface') != 'staff' ) %]
16
[% SET RecallsEnabled = ( Koha.Preference('UseRecalls').match('opac') ) && LoginEnabled %]
17
[% SET ArticleRequestsEnabled = ( Koha.Preference('ArticleRequests') == 1 ) && LoginEnabled %]
17
[% SET ArticleRequestsEnabled = ( Koha.Preference('ArticleRequests') == 1 ) && LoginEnabled %]
18
[% SET MultiHolds = ( Koha.Preference('DisplayMultiPlaceHold') == 1 ) && HoldsEnabled %]
18
[% SET MultiHolds = ( Koha.Preference('DisplayMultiPlaceHold') == 1 ) && HoldsEnabled %]
19
[% SET CoverImagePlugins = KohaPlugins.get_plugins_opac_cover_images %]
19
[% SET CoverImagePlugins = KohaPlugins.get_plugins_opac_cover_images %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt (-1 / +1 lines)
Lines 14-20 Link Here
14
[% SET CartEnabled = ( Koha.Preference('opacbookbag') == 1 ) %]
14
[% SET CartEnabled = ( Koha.Preference('opacbookbag') == 1 ) %]
15
[% SET ListsEnabled = ( Koha.Preference('virtualshelves') == 1 ) && LoginEnabled %]
15
[% SET ListsEnabled = ( Koha.Preference('virtualshelves') == 1 ) && LoginEnabled %]
16
[% SET HoldsEnabled = ( Koha.Preference('OPACHoldRequests') == 1 ) && LoginEnabled %]
16
[% SET HoldsEnabled = ( Koha.Preference('OPACHoldRequests') == 1 ) && LoginEnabled %]
17
[% SET RecallsEnabled = ( Koha.Preference('UseRecalls') == 1 ) && LoginEnabled && ( Koha.Preference('RecallsInterface') != 'staff' ) %]
17
[% SET RecallsEnabled = ( Koha.Preference('UseRecalls').match('opac') ) && LoginEnabled %]
18
[% SET ArticleRequestsEnabled = ( Koha.Preference('ArticleRequests') == 1 ) && LoginEnabled %]
18
[% SET ArticleRequestsEnabled = ( Koha.Preference('ArticleRequests') == 1 ) && LoginEnabled %]
19
[% SET MultiHolds = ( Koha.Preference('DisplayMultiPlaceHold') == 1 ) && HoldsEnabled %]
19
[% SET MultiHolds = ( Koha.Preference('DisplayMultiPlaceHold') == 1 ) && HoldsEnabled %]
20
[% SET CoverImagePlugins = KohaPlugins.get_plugins_opac_cover_images %]
20
[% SET CoverImagePlugins = KohaPlugins.get_plugins_opac_cover_images %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags.tt (-1 / +1 lines)
Lines 12-18 Link Here
12
[% SET CartEnabled = ( Koha.Preference('opacbookbag') == 1 ) %]
12
[% SET CartEnabled = ( Koha.Preference('opacbookbag') == 1 ) %]
13
[% SET ListsEnabled = ( Koha.Preference('virtualshelves') == 1 ) && LoginEnabled %]
13
[% SET ListsEnabled = ( Koha.Preference('virtualshelves') == 1 ) && LoginEnabled %]
14
[% SET HoldsEnabled = ( Koha.Preference('OPACHoldRequests') == 1 ) && LoginEnabled %]
14
[% SET HoldsEnabled = ( Koha.Preference('OPACHoldRequests') == 1 ) && LoginEnabled %]
15
[% SET RecallsEnabled = ( Koha.Preference('UseRecalls') == 1 ) && LoginEnabled && ( Koha.Preference('RecallsInterface') != 'staff' ) %]
15
[% SET RecallsEnabled = ( Koha.Preference('UseRecalls').match('opac') ) && LoginEnabled %]
16
[% SET ArticleRequestsEnabled = ( Koha.Preference('ArticleRequests') == 1 ) && LoginEnabled %]
16
[% SET ArticleRequestsEnabled = ( Koha.Preference('ArticleRequests') == 1 ) && LoginEnabled %]
17
[% SET MultiHolds = ( Koha.Preference('DisplayMultiPlaceHold') == 1 ) && HoldsEnabled %]
17
[% SET MultiHolds = ( Koha.Preference('DisplayMultiPlaceHold') == 1 ) && HoldsEnabled %]
18
[% INCLUDE 'doc-head-open.inc' %]
18
[% INCLUDE 'doc-head-open.inc' %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt (-2 / +2 lines)
Lines 275-281 Link Here
275
                                    <span>Holds ([% reserves_count | html %])</span>
275
                                    <span>Holds ([% reserves_count | html %])</span>
276
                                [% END %]
276
                                [% END %]
277
                            [% END %]
277
                            [% END %]
278
                            [% IF Koha.Preference('UseRecalls') && RECALLS.count %]
278
                            [% IF Koha.Preference('UseRecalls') != "off" && RECALLS.count  %]
279
                                [% WRAPPER tab_item tabname= "opac-user-recalls" %]
279
                                [% WRAPPER tab_item tabname= "opac-user-recalls" %]
280
                                    <span>Recalls ([% RECALLS.count | html %])</span>
280
                                    <span>Recalls ([% RECALLS.count | html %])</span>
281
                                [% END %]
281
                                [% END %]
Lines 826-832 Link Here
826
                                [% END # /tab_panel#opac-user-holds %]
826
                                [% END # /tab_panel#opac-user-holds %]
827
                            [% END # / #RESERVES.count %]
827
                            [% END # / #RESERVES.count %]
828
828
829
                            [% IF Koha.Preference('UseRecalls') && RECALLS.count %]
829
                            [% IF Koha.Preference('UseRecalls') != "off" && RECALLS.count %]
830
                                [% WRAPPER tab_panel tabname="opac-user-recalls" %]
830
                                [% WRAPPER tab_panel tabname="opac-user-recalls" %]
831
                                    <table id="recalls-table" class="table table-bordered table-striped">
831
                                    <table id="recalls-table" class="table table-bordered table-striped">
832
                                        <caption>Recalls <span class="count">([% RECALLS.count | html %])</span></caption>
832
                                        <caption>Recalls <span class="count">([% RECALLS.count | html %])</span></caption>
(-)a/members/moremember.pl (-2 / +2 lines)
Lines 214-220 $template->param( Link Here
214
    WaitingHolds => $waiting_holds,
214
    WaitingHolds => $waiting_holds,
215
);
215
);
216
216
217
if ( C4::Context->preference('UseRecalls') ) {
217
if ( C4::Context->preference('UseRecalls') ne "off" ) {
218
    my $waiting_recalls = $patron->recalls->search( { status => 'waiting' } );
218
    my $waiting_recalls = $patron->recalls->search( { status => 'waiting' } );
219
    $template->param( waiting_recalls => $waiting_recalls );
219
    $template->param( waiting_recalls => $waiting_recalls );
220
}
220
}
Lines 309-315 $template->param( Link Here
309
    patron_lists_count        => $patron_lists_count,
309
    patron_lists_count        => $patron_lists_count,
310
);
310
);
311
311
312
if ( C4::Context->preference('UseRecalls') ) {
312
if ( C4::Context->preference('UseRecalls') ne "off" ) {
313
    $template->param(
313
    $template->param(
314
        recalls         => $patron->recalls( {}, { order_by => { -asc => 'recalldate' } } )->filter_by_current,
314
        recalls         => $patron->recalls( {}, { order_by => { -asc => 'recalldate' } } )->filter_by_current,
315
        specific_patron => 1,
315
        specific_patron => 1,
(-)a/opac/opac-recall.pl (-1 / +1 lines)
Lines 42-48 if ( $op eq 'cud-cancel' ) { Link Here
42
    print $query->redirect('/cgi-bin/koha/opac-user.pl');
42
    print $query->redirect('/cgi-bin/koha/opac-user.pl');
43
}
43
}
44
44
45
if ( C4::Context->preference('UseRecalls') and C4::Context->preference('RecallsInterface') ne 'staff' ) {
45
if ( C4::Context->preference('UseRecalls') =~ m/opac/ ) {
46
46
47
    my $patron = Koha::Patrons->find($borrowernumber);
47
    my $patron = Koha::Patrons->find($borrowernumber);
48
    my $error;
48
    my $error;
(-)a/opac/opac-user.pl (-2 / +2 lines)
Lines 313-319 if ( $pending_checkouts->count ) { # Useless test Link Here
313
            $issue->{normalized_oclc} = GetNormalizedOCLCNumber( $marcrecord, C4::Context->preference('marcflavour') );
313
            $issue->{normalized_oclc} = GetNormalizedOCLCNumber( $marcrecord, C4::Context->preference('marcflavour') );
314
        }
314
        }
315
315
316
        if ( C4::Context->preference('UseRecalls') ) {
316
        if ( C4::Context->preference('UseRecalls') ne "off" ) {
317
            my $maybe_recalls = Koha::Recalls->search(
317
            my $maybe_recalls = Koha::Recalls->search(
318
                { biblio_id => $issue->{biblionumber}, item_id => [ undef, $issue->{itemnumber} ], completed => 0 } );
318
                { biblio_id => $issue->{biblionumber}, item_id => [ undef, $issue->{itemnumber} ], completed => 0 } );
319
            while ( my $recall = $maybe_recalls->next ) {
319
            while ( my $recall = $maybe_recalls->next ) {
Lines 352-358 $template->param( Link Here
352
    showpriority   => $show_priority,
352
    showpriority   => $show_priority,
353
);
353
);
354
354
355
if ( C4::Context->preference('UseRecalls') ) {
355
if ( C4::Context->preference('UseRecalls') ne "off" ) {
356
    my $recalls = Koha::Recalls->search( { patron_id => $borrowernumber, completed => 0 } );
356
    my $recalls = Koha::Recalls->search( { patron_id => $borrowernumber, completed => 0 } );
357
    $template->param( RECALLS => $recalls );
357
    $template->param( RECALLS => $recalls );
358
}
358
}
(-)a/recalls/request.pl (-6 / +2 lines)
Lines 49-58 if ( $op eq 'cud-cancel_multiple_recalls' ) { Link Here
49
    print $input->redirect( '/cgi-bin/koha/recalls/request.pl?biblionumber=' . $biblionumber );
49
    print $input->redirect( '/cgi-bin/koha/recalls/request.pl?biblionumber=' . $biblionumber );
50
} elsif ( $op eq 'cud-request' ) {
50
} elsif ( $op eq 'cud-request' ) {
51
51
52
    if (    C4::Context->preference('UseRecalls')
52
    if ( C4::Context->preference('UseRecalls') =~ m/staff/ and $borrowernumber ) {
53
        and C4::Context->preference('RecallsInterface') ne 'opac'
54
        and $borrowernumber )
55
    {
56
        my $patron = Koha::Patrons->find($borrowernumber);
53
        my $patron = Koha::Patrons->find($borrowernumber);
57
54
58
        unless ( $biblio->can_be_recalled( { patron => $patron } ) ) { $error = 'unavailable'; }
55
        unless ( $biblio->can_be_recalled( { patron => $patron } ) ) { $error = 'unavailable'; }
Lines 130-137 if ( $op eq 'cud-cancel_multiple_recalls' ) { Link Here
130
if ($borrowernumber) {
127
if ($borrowernumber) {
131
    my $patron = Koha::Patrons->find($borrowernumber);
128
    my $patron = Koha::Patrons->find($borrowernumber);
132
129
133
    if (    C4::Context->preference('UseRecalls')
130
    if (    C4::Context->preference('UseRecalls') =~ m/staff/
134
        and C4::Context->preference('RecallsInterface') ne 'opac'
135
        and $patron
131
        and $patron
136
        and $patron->borrowernumber )
132
        and $patron->borrowernumber )
137
    {
133
    {
(-)a/svc/checkouts (-1 / +1 lines)
Lines 218-224 while ( my $c = $sth->fetchrow_hashref() ) { Link Here
218
    my @subtitles = split( / \| /, $c->{'subtitle'} // '' );
218
    my @subtitles = split( / \| /, $c->{'subtitle'} // '' );
219
219
220
    my $recalled = 0;
220
    my $recalled = 0;
221
    if ( C4::Context->preference('UseRecalls') ) {
221
    if ( C4::Context->preference('UseRecalls') ne "off" ) {
222
        my $item   = Koha::Items->find( $c->{itemnumber} );
222
        my $item   = Koha::Items->find( $c->{itemnumber} );
223
        my $recall = undef;
223
        my $recall = undef;
224
        $recall = $item->check_recalls if $item->can_be_waiting_recall;
224
        $recall = $item->check_recalls if $item->can_be_waiting_recall;
(-)a/t/db_dependent/Circulation.t (-4 / +4 lines)
Lines 1822-1828 subtest "CanBookBeRenewed tests" => sub { Link Here
1822
    );
1822
    );
1823
1823
1824
    # Recalls
1824
    # Recalls
1825
    t::lib::Mocks::mock_preference( 'UseRecalls', 1 );
1825
    t::lib::Mocks::mock_preference( 'UseRecalls', 'opac' );
1826
    Koha::CirculationRules->set_rules(
1826
    Koha::CirculationRules->set_rules(
1827
        {
1827
        {
1828
            categorycode => undef,
1828
            categorycode => undef,
Lines 2662-2668 subtest 'AddIssue & AllowReturnToBranch' => sub { Link Here
2662
subtest 'AddIssue | recalls' => sub {
2662
subtest 'AddIssue | recalls' => sub {
2663
    plan tests => 3;
2663
    plan tests => 3;
2664
2664
2665
    t::lib::Mocks::mock_preference( "UseRecalls",        1 );
2665
    t::lib::Mocks::mock_preference( "UseRecalls",        'opac' );
2666
    t::lib::Mocks::mock_preference( "item-level_itypes", 1 );
2666
    t::lib::Mocks::mock_preference( "item-level_itypes", 1 );
2667
    my $patron1 = $builder->build_object( { class => 'Koha::Patrons' } );
2667
    my $patron1 = $builder->build_object( { class => 'Koha::Patrons' } );
2668
    my $patron2 = $builder->build_object( { class => 'Koha::Patrons' } );
2668
    my $patron2 = $builder->build_object( { class => 'Koha::Patrons' } );
Lines 5250-5256 subtest 'CanBookBeIssued | notforloan' => sub { Link Here
5250
subtest 'CanBookBeIssued | recalls' => sub {
5250
subtest 'CanBookBeIssued | recalls' => sub {
5251
    plan tests => 3;
5251
    plan tests => 3;
5252
5252
5253
    t::lib::Mocks::mock_preference( "UseRecalls",        1 );
5253
    t::lib::Mocks::mock_preference( "UseRecalls",        'opac' );
5254
    t::lib::Mocks::mock_preference( "item-level_itypes", 1 );
5254
    t::lib::Mocks::mock_preference( "item-level_itypes", 1 );
5255
    my $patron1 = $builder->build_object( { class => 'Koha::Patrons' } );
5255
    my $patron1 = $builder->build_object( { class => 'Koha::Patrons' } );
5256
    my $patron2 = $builder->build_object( { class => 'Koha::Patrons' } );
5256
    my $patron2 = $builder->build_object( { class => 'Koha::Patrons' } );
Lines 5415-5421 subtest 'AddReturn should clear items.onloan for unissued items' => sub { Link Here
5415
subtest 'AddReturn | recalls' => sub {
5415
subtest 'AddReturn | recalls' => sub {
5416
    plan tests => 3;
5416
    plan tests => 3;
5417
5417
5418
    t::lib::Mocks::mock_preference( "UseRecalls",        1 );
5418
    t::lib::Mocks::mock_preference( "UseRecalls",        'opac' );
5419
    t::lib::Mocks::mock_preference( "item-level_itypes", 1 );
5419
    t::lib::Mocks::mock_preference( "item-level_itypes", 1 );
5420
    my $patron1 = $builder->build_object( { class => 'Koha::Patrons' } );
5420
    my $patron1 = $builder->build_object( { class => 'Koha::Patrons' } );
5421
    my $patron2 = $builder->build_object( { class => 'Koha::Patrons' } );
5421
    my $patron2 = $builder->build_object( { class => 'Koha::Patrons' } );
(-)a/t/db_dependent/Circulation/transferbook.t (-1 / +1 lines)
Lines 168-174 subtest 'transfer already at destination' => sub { Link Here
168
    is( $messages->{ResFound}->{itemnumber}, $item->itemnumber, "We got the reserve info" );
168
    is( $messages->{ResFound}->{itemnumber}, $item->itemnumber, "We got the reserve info" );
169
169
170
    # recalls
170
    # recalls
171
    t::lib::Mocks::mock_preference( 'UseRecalls', 1 );
171
    t::lib::Mocks::mock_preference( 'UseRecalls', 'opac' );
172
    my $recall = Koha::Recall->new(
172
    my $recall = Koha::Recall->new(
173
        {
173
        {
174
            biblio_id         => $item->biblionumber,
174
            biblio_id         => $item->biblionumber,
(-)a/t/db_dependent/Holds.t (-1 / +1 lines)
Lines 2180-2186 subtest 'ModReserve to convert a hold to a recall' => sub { Link Here
2180
        }
2180
        }
2181
    )->store;
2181
    )->store;
2182
2182
2183
    t::lib::Mocks::mock_preference( "UseRecalls", 1 );
2183
    t::lib::Mocks::mock_preference( "UseRecalls", 'opac' );
2184
    t::lib::Mocks::mock_userenv( { branchcode => $branch } );
2184
    t::lib::Mocks::mock_userenv( { branchcode => $branch } );
2185
2185
2186
    C4::Circulation::AddIssue( $patron2, $item->barcode );
2186
    C4::Circulation::AddIssue( $patron2, $item->barcode );
(-)a/t/db_dependent/Koha/Biblio.t (-2 / +2 lines)
Lines 1841-1850 subtest 'Recalls tests' => sub { Link Here
1841
    is( $recalls->count,                    3, 'Correctly get number of recalls for biblio' );
1841
    is( $recalls->count,                    3, 'Correctly get number of recalls for biblio' );
1842
    is( $recalls->filter_by_current->count, 1, 'Correctly get number of active recalls for biblio' );
1842
    is( $recalls->filter_by_current->count, 1, 'Correctly get number of active recalls for biblio' );
1843
1843
1844
    t::lib::Mocks::mock_preference( 'UseRecalls', 0 );
1844
    t::lib::Mocks::mock_preference( 'UseRecalls', 'off' );
1845
    is( $biblio->can_be_recalled( { patron => $patron1 } ), 0, "Can't recall with UseRecalls disabled" );
1845
    is( $biblio->can_be_recalled( { patron => $patron1 } ), 0, "Can't recall with UseRecalls disabled" );
1846
1846
1847
    t::lib::Mocks::mock_preference( "UseRecalls", 1 );
1847
    t::lib::Mocks::mock_preference( "UseRecalls", 'opac' );
1848
    $item1->update( { notforloan => 1 } );
1848
    $item1->update( { notforloan => 1 } );
1849
    is( $biblio->can_be_recalled( { patron => $patron1 } ), 0, "Can't recall with no available items" );
1849
    is( $biblio->can_be_recalled( { patron => $patron1 } ), 0, "Can't recall with no available items" );
1850
1850
(-)a/t/db_dependent/Koha/Item.t (-4 / +4 lines)
Lines 2957-2963 subtest 'Recalls tests' => sub { Link Here
2957
    );
2957
    );
2958
2958
2959
    t::lib::Mocks::mock_userenv( { patron => $patron1 } );
2959
    t::lib::Mocks::mock_userenv( { patron => $patron1 } );
2960
    t::lib::Mocks::mock_preference( 'UseRecalls', 1 );
2960
    t::lib::Mocks::mock_preference( 'UseRecalls', 'opac' );
2961
2961
2962
    my $recall1 = Koha::Recall->new(
2962
    my $recall1 = Koha::Recall->new(
2963
        {
2963
        {
Lines 2987-2996 subtest 'Recalls tests' => sub { Link Here
2987
2987
2988
    $recall2->set_cancelled;
2988
    $recall2->set_cancelled;
2989
2989
2990
    t::lib::Mocks::mock_preference( 'UseRecalls', 0 );
2990
    t::lib::Mocks::mock_preference( 'UseRecalls', 'off' );
2991
    is( $item1->can_be_recalled( { patron => $patron1 } ), 0, "Can't recall with UseRecalls disabled" );
2991
    is( $item1->can_be_recalled( { patron => $patron1 } ), 0, "Can't recall with UseRecalls disabled" );
2992
2992
2993
    t::lib::Mocks::mock_preference( "UseRecalls", 1 );
2993
    t::lib::Mocks::mock_preference( "UseRecalls", 'opac' );
2994
2994
2995
    $item1->update( { notforloan => 1 } );
2995
    $item1->update( { notforloan => 1 } );
2996
    is( $item1->can_be_recalled( { patron => $patron1 } ), 0, "Can't recall that is not for loan" );
2996
    is( $item1->can_be_recalled( { patron => $patron1 } ), 0, "Can't recall that is not for loan" );
Lines 3210-3216 subtest 'has_pending_recall() tests' => sub { Link Here
3210
    my $patron  = $builder->build_object( { class => 'Koha::Patrons' } );
3210
    my $patron  = $builder->build_object( { class => 'Koha::Patrons' } );
3211
3211
3212
    t::lib::Mocks::mock_userenv( { branchcode => $library->branchcode } );
3212
    t::lib::Mocks::mock_userenv( { branchcode => $library->branchcode } );
3213
    t::lib::Mocks::mock_preference( 'UseRecalls', 1 );
3213
    t::lib::Mocks::mock_preference( 'UseRecalls', 'opac' );
3214
3214
3215
    C4::Circulation::AddIssue( $patron, $item->barcode );
3215
    C4::Circulation::AddIssue( $patron, $item->barcode );
3216
3216
(-)a/t/db_dependent/SIP/Transaction.t (-1 / +1 lines)
Lines 1521-1527 subtest do_checkout_with_recalls => sub { Link Here
1521
        }
1521
        }
1522
    );
1522
    );
1523
1523
1524
    t::lib::Mocks::mock_preference( 'UseRecalls', 1 );
1524
    t::lib::Mocks::mock_preference( 'UseRecalls', 'opac' );
1525
    Koha::CirculationRules->set_rule(
1525
    Koha::CirculationRules->set_rule(
1526
        {
1526
        {
1527
            branchcode   => undef,
1527
            branchcode   => undef,
(-)a/t/db_dependent/Search.t (-1 / +1 lines)
Lines 161-167 $contextmodule->mock( Link Here
161
        } elsif ( $pref eq 'SearchLimitLibrary' ) {
161
        } elsif ( $pref eq 'SearchLimitLibrary' ) {
162
            return 'both';
162
            return 'both';
163
        } elsif ( $pref eq 'UseRecalls' ) {
163
        } elsif ( $pref eq 'UseRecalls' ) {
164
            return '0';
164
            return 'off';
165
        } elsif ( $pref eq 'ContentWarningField' ) {
165
        } elsif ( $pref eq 'ContentWarningField' ) {
166
            return q{};
166
            return q{};
167
        } elsif ( $pref eq 'AuthorLinkSortBy' ) {
167
        } elsif ( $pref eq 'AuthorLinkSortBy' ) {
(-)a/t/db_dependent/XSLT.t (-3 / +2 lines)
Lines 202-208 subtest 'buildKohaItemsNamespace status tests' => sub { Link Here
202
    my $library_name = $holdinglibrary->branchname;
202
    my $library_name = $holdinglibrary->branchname;
203
    like( $xml, qr{<resultbranch>${library_name}</resultbranch>}, "Found resultbranch / holding branch" );
203
    like( $xml, qr{<resultbranch>${library_name}</resultbranch>}, "Found resultbranch / holding branch" );
204
204
205
    t::lib::Mocks::mock_preference( 'UseRecalls', 1 );
205
    t::lib::Mocks::mock_preference( 'UseRecalls', 'opac' );
206
    my $recall = $builder->build_object(
206
    my $recall = $builder->build_object(
207
        {
207
        {
208
            class => 'Koha::Recalls',
208
            class => 'Koha::Recalls',
Lines 220-226 subtest 'buildKohaItemsNamespace status tests' => sub { Link Here
220
        $xml, qr{<substatus>Recall waiting</substatus>},
220
        $xml, qr{<substatus>Recall waiting</substatus>},
221
        "Waiting status takes precedence over In transit (recalls)"
221
        "Waiting status takes precedence over In transit (recalls)"
222
    );
222
    );
223
    t::lib::Mocks::mock_preference( 'UseRecalls', 0 );
223
    t::lib::Mocks::mock_preference( 'UseRecalls', 'off' );
224
224
225
    $schema->storage->txn_rollback;
225
    $schema->storage->txn_rollback;
226
};
226
};
227
- 

Return to bug 31391