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

(-)a/C4/Circulation.pm (-6 / +6 lines)
Lines 391-397 sub transferbook { Link Here
391
    }
391
    }
392
392
393
    # find recall
393
    # find recall
394
    if ( C4::Context->preference('UseRecalls') ) {
394
    if ( C4::Context->preference('UseRecalls') ne "off" ) {
395
        my $recall = Koha::Recalls->find( { item_id => $itemnumber, status => 'in_transit' } );
395
        my $recall = Koha::Recalls->find( { item_id => $itemnumber, status => 'in_transit' } );
396
        if ( defined $recall ) {
396
        if ( defined $recall ) {
397
397
Lines 1170-1176 sub CanBookBeIssued { Link Here
1170
    # CHECK IF ITEM HAS BEEN RECALLED BY ANOTHER PATRON
1170
    # CHECK IF ITEM HAS BEEN RECALLED BY ANOTHER PATRON
1171
    # Only bother doing this if UseRecalls is enabled and the item is recallable
1171
    # Only bother doing this if UseRecalls is enabled and the item is recallable
1172
    # Don't look at recalls that are in transit
1172
    # Don't look at recalls that are in transit
1173
    if ( C4::Context->preference('UseRecalls') and $item_object->can_be_waiting_recall ) {
1173
    if ( C4::Context->preference('UseRecalls') ne "off" and $item_object->can_be_waiting_recall ) {
1174
        my @recalls = $biblio->recalls( {}, { order_by => { -asc => 'created_date' } } )->filter_by_current->as_list;
1174
        my @recalls = $biblio->recalls( {}, { order_by => { -asc => 'created_date' } } )->filter_by_current->as_list;
1175
1175
1176
        foreach my $r (@recalls) {
1176
        foreach my $r (@recalls) {
Lines 1697-1703 sub AddIssue { Link Here
1697
                $item_object->discard_changes;
1697
                $item_object->discard_changes;
1698
            }
1698
            }
1699
1699
1700
            if ( C4::Context->preference('UseRecalls') ) {
1700
            if ( C4::Context->preference('UseRecalls') ne "off" ) {
1701
                Koha::Recalls->move_recall(
1701
                Koha::Recalls->move_recall(
1702
                    {
1702
                    {
1703
                        action         => $cancel_recall,
1703
                        action         => $cancel_recall,
Lines 2518-2524 sub AddReturn { Link Here
2518
    }
2518
    }
2519
2519
2520
    # find recalls...
2520
    # find recalls...
2521
    if ( C4::Context->preference('UseRecalls') ) {
2521
    if ( C4::Context->preference('UseRecalls') ne "off" ) {
2522
2522
2523
        # check if this item is recallable first, which includes checking if UseRecalls syspref is enabled
2523
        # check if this item is recallable first, which includes checking if UseRecalls syspref is enabled
2524
        my $recall = undef;
2524
        my $recall = undef;
Lines 2605-2611 sub AddReturn { Link Here
2605
        $request->status('RET') if $request;
2605
        $request->status('RET') if $request;
2606
    }
2606
    }
2607
2607
2608
    if ( C4::Context->preference('UseRecalls') ) {
2608
    if ( C4::Context->preference('UseRecalls') ne "off" ) {
2609
2609
2610
        # all recalls that have triggered a transfer will have an allocated itemnumber
2610
        # all recalls that have triggered a transfer will have an allocated itemnumber
2611
        my $transfer_recall = Koha::Recalls->find( { item_id => $item->itemnumber, status => 'in_transit' } );
2611
        my $transfer_recall = Koha::Recalls->find( { item_id => $item->itemnumber, status => 'in_transit' } );
Lines 3188-3194 sub CanBookBeRenewed { Link Here
3188
3188
3189
    }
3189
    }
3190
3190
3191
    if ( C4::Context->preference('UseRecalls') ) {
3191
    if ( C4::Context->preference('UseRecalls') ne "off" ) {
3192
        my $recall = undef;
3192
        my $recall = undef;
3193
        $recall = $item->check_recalls if $item->can_be_waiting_recall;
3193
        $recall = $item->check_recalls if $item->can_be_waiting_recall;
3194
        if ( defined $recall ) {
3194
        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 321-327 sub buildKohaItemsNamespace { Link Here
321
        my $substatus = '';
321
        my $substatus = '';
322
        my $recalls_count;
322
        my $recalls_count;
323
323
324
        if ( C4::Context->preference('UseRecalls') ) {
324
        if ( C4::Context->preference('UseRecalls') ne "off" ) {
325
            $recalls_count = Koha::Recalls->search( { item_id => $item->itemnumber, status => 'waiting' } )->count;
325
            $recalls_count = Koha::Recalls->search( { item_id => $item->itemnumber, status => 'waiting' } )->count;
326
        }
326
        }
327
327
(-)a/Koha/Biblio.pm (-1 / +1 lines)
Lines 2172-2178 if hold_convert $param is included, this is to say that this a check to convert Link Here
2172
sub can_be_recalled {
2172
sub can_be_recalled {
2173
    my ( $self, $params ) = @_;
2173
    my ( $self, $params ) = @_;
2174
2174
2175
    return 0 if !( C4::Context->preference('UseRecalls') );
2175
    return 0 if ( C4::Context->preference('UseRecalls') eq "off" );
2176
2176
2177
    my $patron = $params->{patron};
2177
    my $patron = $params->{patron};
2178
2178
(-)a/Koha/Item.pm (-2 / +2 lines)
Lines 2446-2452 if hold_convert $param is included, this is to say that this a check to convert Link Here
2446
sub can_be_recalled {
2446
sub can_be_recalled {
2447
    my ( $self, $params ) = @_;
2447
    my ( $self, $params ) = @_;
2448
2448
2449
    return 0 if !( C4::Context->preference('UseRecalls') );
2449
    return 0 if ( C4::Context->preference('UseRecalls') eq "off" );
2450
2450
2451
    # check if this item is not for loan, withdrawn or lost
2451
    # check if this item is not for loan, withdrawn or lost
2452
    return 0 if ( $self->notforloan != 0 );
2452
    return 0 if ( $self->notforloan != 0 );
Lines 2546-2552 At this point the item has already been recalled. We are now at the checkin and Link Here
2546
sub can_be_waiting_recall {
2546
sub can_be_waiting_recall {
2547
    my ($self) = @_;
2547
    my ($self) = @_;
2548
2548
2549
    return 0 if !( C4::Context->preference('UseRecalls') );
2549
    return 0 if ( C4::Context->preference('UseRecalls') eq "off" );
2550
2550
2551
    # check if this item is not for loan, withdrawn or lost
2551
    # check if this item is not for loan, withdrawn or lost
2552
    return 0 if ( $self->notforloan != 0 );
2552
    return 0 if ( $self->notforloan != 0 );
(-)a/circ/circulation.pl (-2 / +2 lines)
Lines 523-529 if ( @$barcodes && $op eq 'cud-checkout' ) { Link Here
523
            }
523
            }
524
            unless ($confirm_required) {
524
            unless ($confirm_required) {
525
                my $switch_onsite_checkout = exists $messages->{ONSITE_CHECKOUT_WILL_BE_SWITCHED};
525
                my $switch_onsite_checkout = exists $messages->{ONSITE_CHECKOUT_WILL_BE_SWITCHED};
526
                if ( C4::Context->preference('UseRecalls') && !$recall_id ) {
526
                if ( C4::Context->preference('UseRecalls') ne "off" && !$recall_id ) {
527
                    my $recall = Koha::Recalls->find(
527
                    my $recall = Koha::Recalls->find(
528
                        {
528
                        {
529
                            biblio_id => $item->biblionumber,
529
                            biblio_id => $item->biblionumber,
Lines 602-608 if ($patron) { Link Here
602
        WaitingHolds => $waiting_holds,
602
        WaitingHolds => $waiting_holds,
603
    );
603
    );
604
604
605
    if ( C4::Context->preference('UseRecalls') ) {
605
    if ( C4::Context->preference('UseRecalls') ne "off" ) {
606
        my $waiting_recalls = $patron->recalls->search( { status => 'waiting' } );
606
        my $waiting_recalls = $patron->recalls->search( { status => 'waiting' } );
607
        $template->param(
607
        $template->param(
608
            recalls => $patron->recalls->filter_by_current->search( {}, { order_by => { -asc => 'created_date' } } ),
608
            recalls => $patron->recalls->filter_by_current->search( {}, { order_by => { -asc => 'created_date' } } ),
(-)a/circ/returns.pl (-2 / +2 lines)
Lines 233-239 if ( $transit && $op eq 'cud-transfer' ) { Link Here
233
    my $transfer = Koha::Item::Transfers->find($transit);
233
    my $transfer = Koha::Item::Transfers->find($transit);
234
    if ($canceltransfer) {
234
    if ($canceltransfer) {
235
        $transfer->cancel( { reason => 'Manual', force => 1 } );
235
        $transfer->cancel( { reason => 'Manual', force => 1 } );
236
        if ( C4::Context->preference('UseRecalls') ) {
236
        if ( C4::Context->preference('UseRecalls') ne "off" ) {
237
            my $recall_transfer_deleted = Koha::Recalls->find( { item_id => $itemnumber, status => 'in_transit' } );
237
            my $recall_transfer_deleted = Koha::Recalls->find( { item_id => $itemnumber, status => 'in_transit' } );
238
            if ( defined $recall_transfer_deleted ) {
238
            if ( defined $recall_transfer_deleted ) {
239
                $recall_transfer_deleted->revert_transfer;
239
                $recall_transfer_deleted->revert_transfer;
Lines 247-253 if ( $transit && $op eq 'cud-transfer' ) { Link Here
247
    my $item     = Koha::Items->find($itemnumber);
247
    my $item     = Koha::Items->find($itemnumber);
248
    my $transfer = $item->get_transfer;
248
    my $transfer = $item->get_transfer;
249
    $transfer->cancel( { reason => 'Manual', force => 1 } );
249
    $transfer->cancel( { reason => 'Manual', force => 1 } );
250
    if ( C4::Context->preference('UseRecalls') ) {
250
    if ( C4::Context->preference('UseRecalls') ne "off" ) {
251
        my $recall_transfer_deleted = Koha::Recalls->find( { item_id => $itemnumber, status => 'in_transit' } );
251
        my $recall_transfer_deleted = Koha::Recalls->find( { item_id => $itemnumber, status => 'in_transit' } );
252
        if ( defined $recall_transfer_deleted ) {
252
        if ( defined $recall_transfer_deleted ) {
253
            $recall_transfer_deleted->revert_transfer;
253
            $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 666-672 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
666
('QuoteOfTheDay','','intranet,opac','Enable or disable display of Quote of the Day on the OPAC and staff interface home page','multiple'),
666
('QuoteOfTheDay','','intranet,opac','Enable or disable display of Quote of the Day on the OPAC and staff interface home page','multiple'),
667
('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'),
667
('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'),
668
('RealTimeHoldsQueue', '0', NULL, 'Enable updating the holds queue in real time', 'YesNo'),
668
('RealTimeHoldsQueue', '0', NULL, 'Enable updating the holds queue in real time', 'YesNo'),
669
('RecallsInterface','opac','opac|staff|both','The interface that recalls can be placed through','Choice'),
670
('RecallsLog','1',NULL,'If ON, log create/cancel/expire/fulfill actions on recalls','YesNo'),
669
('RecallsLog','1',NULL,'If ON, log create/cancel/expire/fulfill actions on recalls','YesNo'),
671
('RecallsMaxPickUpDelay','7',NULL,'Define the maximum time a recall can be awaiting pickup','Integer'),
670
('RecallsMaxPickUpDelay','7',NULL,'Define the maximum time a recall can be awaiting pickup','Integer'),
672
('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'),
Lines 872-878 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
872
('UseICUStyleQuotes','0','1','Tell Koha whether to use ICU style quotes ({) or default (") when tracing subjects .','YesNo'),
871
('UseICUStyleQuotes','0','1','Tell Koha whether to use ICU style quotes ({) or default (") when tracing subjects .','YesNo'),
873
('UseLocationAsAQInSIP', '0', '', 'Use permanent_location instead of homebranch for AQ in SIP response', 'YesNo'),
872
('UseLocationAsAQInSIP', '0', '', 'Use permanent_location instead of homebranch for AQ in SIP response', 'YesNo'),
874
('UseOCLCEncodingLevels','0',NULL,'If enabled, include OCLC encoding levels in leader value builder dropdown for position 17.','YesNo'),
873
('UseOCLCEncodingLevels','0',NULL,'If enabled, include OCLC encoding levels in leader value builder dropdown for position 17.','YesNo'),
875
('UseRecalls','0',NULL,'Enable or disable recalls','YesNo'),
874
('UseRecalls','off','off|opac|staff|opac_and_staff','Enable or disable recalls','Choice'),
876
('UseTransportCostMatrix','0','','Use Transport Cost Matrix when filling holds','YesNo'),
875
('UseTransportCostMatrix','0','','Use Transport Cost Matrix when filling holds','YesNo'),
877
('UseWYSIWYGinSystemPreferences','0','','Show WYSIWYG editor when editing certain HTML system preferences.','YesNo'),
876
('UseWYSIWYGinSystemPreferences','0','','Show WYSIWYG editor when editing certain HTML system preferences.','YesNo'),
878
('viewISBD','1','','Allow display of ISBD view of bibiographic records','YesNo'),
877
('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 245-251 Link Here
245
                    <a href="/cgi-bin/koha/members/ill-requests.pl?borrowernumber=[% patron.borrowernumber | uri %]">ILL requests history</a>
245
                    <a href="/cgi-bin/koha/members/ill-requests.pl?borrowernumber=[% patron.borrowernumber | uri %]">ILL requests history</a>
246
                </li>
246
                </li>
247
            [% END %]
247
            [% END %]
248
            [% IF Koha.Preference('UseRecalls') && CAN_user_recalls %]
248
            [% IF Koha.Preference('UseRecalls') != "off" && CAN_user_recalls %]
249
                <li [% IF recallsview %]class="active"[% END %]>
249
                <li [% IF recallsview %]class="active"[% END %]>
250
                    <a href="/cgi-bin/koha/members/recallshistory.pl?borrowernumber=[% patron.borrowernumber | uri %]">Recalls history</a>
250
                    <a href="/cgi-bin/koha/members/recallshistory.pl?borrowernumber=[% patron.borrowernumber | uri %]">Recalls history</a>
251
                </li>
251
                </li>
Lines 283-290 Link Here
283
                                        <div class="hint">
283
                                        <div class="hint">
284
                                            [% patron.title | html %] [% patron.firstname | html %] [% patron.surname | html %] does not currently have an image available. To import an image for [% patron.title | html %]
284
                                            [% patron.title | html %] [% patron.firstname | html %] [% patron.surname | html %] does not currently have an image available. To import an image for [% patron.title | html %]
285
                                            [% patron.firstname | html %]
285
                                            [% patron.firstname | html %]
286
                                            [% patron.surname | html %],
286
                                            [% patron.surname | html %], enter the name of an image file to upload.
287
                                            enter the name of an image file to upload.
288
                                        </div>
287
                                        </div>
289
                                    [% END # /IF patron.image %]
288
                                    [% END # /IF patron.image %]
290
                                    <p>Only PNG, GIF, JPEG, XPM formats are supported.</p>
289
                                    <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 67-73 Link Here
67
                                    <option value="[% hold.priority | html %]" selected="selected">[% this_priority | html %]</option>
67
                                    <option value="[% hold.priority | html %]" selected="selected">[% this_priority | html %]</option>
68
                                [% END %]
68
                                [% END %]
69
                                <option value="del">del</option>
69
                                <option value="del">del</option>
70
                                [% IF Koha.Preference('UseRecalls') AND Koha.Preference('RecallsInterface') != 'opac' %]
70
                                [% IF ( Koha.Preference('UseRecalls').match('staff') ) %]
71
                                    <option value="recall">recall</option>
71
                                    <option value="recall">recall</option>
72
                                [% END %]
72
                                [% END %]
73
                            </select>
73
                            </select>
Lines 85-91 Link Here
85
                                [% ELSE %]
85
                                [% ELSE %]
86
                                    <option value="[% hold.priority | html %]" selected="selected">[% this_priority | html %]</option>
86
                                    <option value="[% hold.priority | html %]" selected="selected">[% this_priority | html %]</option>
87
                                [% END %]
87
                                [% END %]
88
                                [% IF Koha.Preference('UseRecalls') AND Koha.Preference('RecallsInterface') != 'opac' %]
88
                                [% IF ( Koha.Preference('UseRecalls').match('staff') ) %]
89
                                    <option value="recall">recall</option>
89
                                    <option value="recall">recall</option>
90
                                [% END %]
90
                                [% END %]
91
                            </select>
91
                            </select>
Lines 363-369 Link Here
363
                    <td></td>
363
                    <td></td>
364
                [% END %]
364
                [% END %]
365
                <td>
365
                <td>
366
                    [% IF Koha.Preference('UseRecalls') AND Koha.Preference('RecallsInterface') != 'opac' %]
366
                    [% IF ( Koha.Preference('UseRecalls').match('staff') ) %]
367
                        <a class="convert-to-recall btn" title="Convert hold to recall" data-id="[% hold.reserve_id | html %]">Mark for conversion to recall</a>
367
                        <a class="convert-to-recall btn" title="Convert hold to recall" data-id="[% hold.reserve_id | html %]">Mark for conversion to recall</a>
368
                    [% END %]
368
                    [% END %]
369
                </td>
369
                </td>
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc (-2 / +2 lines)
Lines 260-266 Link Here
260
        [% IF biblio.serial %]
260
        [% IF biblio.serial %]
261
            embed.push('serial_item.serial');
261
            embed.push('serial_item.serial');
262
        [% END %]
262
        [% END %]
263
        [% IF Koha.Preference('UseRecalls') %]
263
        [% IF Koha.Preference('UseRecalls') != "off" %]
264
            embed.push('recall', 'recall+strings', 'recall.patron')
264
            embed.push('recall', 'recall+strings', 'recall.patron')
265
        [% END %]
265
        [% END %]
266
        embed.push('in_bundle', 'bundle_host', 'bundle_host.biblio', 'bundle_items_lost+count', 'bundle_items_not_lost+count');
266
        embed.push('in_bundle', 'bundle_host', 'bundle_host.biblio', 'bundle_items_lost+count', 'bundle_items_not_lost+count');
Lines 584-590 Link Here
584
                                }
584
                                }
585
                            }
585
                            }
586
586
587
                        [% IF Koha.Preference('UseRecalls') %]
587
                        [% IF Koha.Preference('UseRecalls') != "off" %]
588
                            if ( row.recall && ( row.item_id === row.recall.item_id ) ) {
588
                            if ( row.recall && ( row.item_id === row.recall.item_id ) ) {
589
                                if ( row.recall.waiting_date ) {
589
                                if ( row.recall.waiting_date ) {
590
                                    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)));
590
                                    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 30-36 Link Here
30
            [% END %]
30
            [% END %]
31
        [% END %]
31
        [% END %]
32
32
33
        [% IF Koha.Preference('UseRecalls') %]
33
        [% IF Koha.Preference('UseRecalls') != "off" %]
34
            [% WRAPPER tab_item tabname= "recalls" %]
34
            [% WRAPPER tab_item tabname= "recalls" %]
35
                <span>Recalls</span> ([% recalls.count || 0 | html %])
35
                <span>Recalls</span> ([% recalls.count || 0 | html %])
36
            [% END %]
36
            [% END %]
Lines 231-237 Link Here
231
            [% END %]
231
            [% END %]
232
        [% END %]
232
        [% END %]
233
233
234
        [% IF Koha.Preference('UseRecalls') %]
234
        [% IF Koha.Preference('UseRecalls') != "off" %]
235
            [% WRAPPER tab_panel tabname="recalls" %]
235
            [% WRAPPER tab_panel tabname="recalls" %]
236
                [% INCLUDE 'recalls.inc' %]
236
                [% INCLUDE 'recalls.inc' %]
237
            [% END # /tab_panel# %]
237
            [% END # /tab_panel# %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (-13 / +7 lines)
Lines 1488-1508 Circulation: Link Here
1488
            - class: integer
1488
            - class: integer
1489
            - days.
1489
            - days.
1490
        -
1490
        -
1491
            - Recalls
1491
            - pref: UseRecalls
1492
            - pref: UseRecalls
1492
              type: boolean
1493
              default: off
1493
              choices:
1494
              choices:
1494
                  1: Use
1495
                  off: are disabled
1495
                  0: "Don't use"
1496
                  opac: can be placed through the OPAC only
1496
            - recalls. Make sure you configure <a href="/cgi-bin/koha/admin/smart-rules.pl">circulation and fine rules</a> for recalls once enabled.
1497
                  staff: can be placed through the staff interface only
1497
        -
1498
                  opac_and_staff: can be placed through both the OPAC and staff interface
1498
            - Recalls can be placed through
1499
            - . Make sure you configure <a href="/cgi-bin/koha/admin/smart-rules.pl">circulation and fine rules</a> for recalls when enabled.
1499
            - pref: RecallsInterface
1500
              default: opac
1501
              choices:
1502
                  opac: the OPAC only
1503
                  staff: the staff interface only
1504
                  both: both the OPAC and the staff interface
1505
            - . (Requires <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=UseRecalls">UseRecalls</a>.)
1506
1500
1507
    SIP2:
1501
    SIP2:
1508
        -
1502
        -
(-)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 696-702 Link Here
696
                                                    <span>Holds ([% SEARCH_RESULT.biblio_object.holds.count | html %])</span>
696
                                                    <span>Holds ([% SEARCH_RESULT.biblio_object.holds.count | html %])</span>
697
                                                [% END %]
697
                                                [% END %]
698
                                            [% END # /IF SEARCH_RESULT.norequests %]
698
                                            [% END # /IF SEARCH_RESULT.norequests %]
699
                                            [% IF Koha.Preference('UseRecalls') and CAN_user_recalls %]
699
                                            [% IF Koha.Preference('UseRecalls') != "off" and CAN_user_recalls %]
700
                                                |
700
                                                |
701
                                                <a id="recall_[% SEARCH_RESULT.biblionumber | html %]" href="/cgi-bin/koha/recalls/request.pl?biblionumber=[% SEARCH_RESULT.biblionumber | html %]"
701
                                                <a id="recall_[% SEARCH_RESULT.biblionumber | html %]" href="/cgi-bin/koha/recalls/request.pl?biblionumber=[% SEARCH_RESULT.biblionumber | html %]"
702
                                                    >Recalls ([% SEARCH_RESULT.biblio_object.recalls.search( completed => 0 ).count | html %])</a
702
                                                    >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 102-108 Link Here
102
                </ul>
102
                </ul>
103
            </div>
103
            </div>
104
104
105
            [% IF Koha.Preference('UseRecalls') and CAN_user_recalls %]
105
            [% IF Koha.Preference('UseRecalls') != off and CAN_user_recalls %]
106
                <div class="recalls">
106
                <div class="recalls">
107
                    <h3>Recalls</h3>
107
                    <h3>Recalls</h3>
108
108
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/recallshistory.tt (-1 / +1 lines)
Lines 38-44 Link Here
38
[% WRAPPER 'main-container.inc' aside='circ-menu' %]
38
[% WRAPPER 'main-container.inc' aside='circ-menu' %]
39
    [% INCLUDE 'members-toolbar.inc' %]
39
    [% INCLUDE 'members-toolbar.inc' %]
40
    <h1>Recalls history</h1>
40
    <h1>Recalls history</h1>
41
    [% IF Koha.Preference('UseRecalls') %]
41
    [% IF Koha.Preference('UseRecalls') != "off" %]
42
        <input type="checkbox" id="hide_old" name="hide_old" checked="checked" />
42
        <input type="checkbox" id="hide_old" name="hide_old" checked="checked" />
43
        <label for="hide_old">Show old recalls</label>
43
        <label for="hide_old">Show old recalls</label>
44
        [% INCLUDE 'recalls.inc' %]
44
        [% 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 70-76 Link Here
70
                                            [% NEXT IF !Koha.Preference('MembershipExpiryDaysNotice') && messaging_preference.Patron_Expiry %]
70
                                            [% NEXT IF !Koha.Preference('MembershipExpiryDaysNotice') && messaging_preference.Patron_Expiry %]
71
                                            [% NEXT IF messaging_preference.Patron_Expiry && enforce_expiry_notice %]
71
                                            [% NEXT IF messaging_preference.Patron_Expiry && enforce_expiry_notice %]
72
                                            [% NEXT IF messaging_preference.Auto_Renewals && Koha.Preference('AutoRenewalNotices') != 'preferences' %]
72
                                            [% NEXT IF messaging_preference.Auto_Renewals && Koha.Preference('AutoRenewalNotices') != 'preferences' %]
73
                                            [% NEXT IF !Koha.Preference('UseRecalls') && messaging_preference.message_name.match('^Recall_') %]
73
                                            [% NEXT IF Koha.Preference('UseRecalls') != "off" && messaging_preference.message_name.match('^Recall_') %]
74
                                            <tr id="[% messaging_preference.message_name _ "_message" | lower | html %]">
74
                                            <tr id="[% messaging_preference.message_name _ "_message" | lower | html %]">
75
                                                <td
75
                                                <td
76
                                                    >[% IF ( messaging_preference.Item_Due ) %]
76
                                                    >[% IF ( messaging_preference.Item_Due ) %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-recalls.tt (-1 / +1 lines)
Lines 27-33 Link Here
27
            <div class="col-md-12 col-lg-10 order-1 order-lg-2">
27
            <div class="col-md-12 col-lg-10 order-1 order-lg-2">
28
                <div id="recalls" class="maincontent">
28
                <div id="recalls" class="maincontent">
29
                    <h1>Recalls history</h1>
29
                    <h1>Recalls history</h1>
30
                    [% IF Koha.Preference('UseRecalls') %]
30
                    [% IF Koha.Preference('UseRecalls') != "off" %]
31
                        [% IF RECALLS.count %]
31
                        [% IF RECALLS.count %]
32
                            <div id="opac-user-recalls">
32
                            <div id="opac-user-recalls">
33
                                <table id="recalls-table" class="table table-bordered table-striped">
33
                                <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 11-17 Link Here
11
[% SET CartEnabled = ( Koha.Preference('opacbookbag') == 1 ) %]
11
[% SET CartEnabled = ( Koha.Preference('opacbookbag') == 1 ) %]
12
[% SET ListsEnabled = ( Koha.Preference('virtualshelves') == 1 ) && LoginEnabled %]
12
[% SET ListsEnabled = ( Koha.Preference('virtualshelves') == 1 ) && LoginEnabled %]
13
[% SET HoldsEnabled = ( Koha.Preference('OPACHoldRequests') == 1 ) && LoginEnabled %]
13
[% SET HoldsEnabled = ( Koha.Preference('OPACHoldRequests') == 1 ) && LoginEnabled %]
14
[% SET RecallsEnabled = ( Koha.Preference('UseRecalls') == 1 ) && LoginEnabled && ( Koha.Preference('RecallsInterface') != 'staff' ) %]
14
[% SET RecallsEnabled = ( Koha.Preference('UseRecalls').match('opac') ) && LoginEnabled %]
15
[% SET ArticleRequestsEnabled = ( Koha.Preference('ArticleRequests') == 1 ) && LoginEnabled %]
15
[% SET ArticleRequestsEnabled = ( Koha.Preference('ArticleRequests') == 1 ) && LoginEnabled %]
16
[% SET MultiHolds = ( Koha.Preference('DisplayMultiPlaceHold') == 1 ) && HoldsEnabled %]
16
[% SET MultiHolds = ( Koha.Preference('DisplayMultiPlaceHold') == 1 ) && HoldsEnabled %]
17
[% SET CoverImagePlugins = KohaPlugins.get_plugins_opac_cover_images %]
17
[% 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 825-831 Link Here
825
                                [% END # /tab_panel#opac-user-holds %]
825
                                [% END # /tab_panel#opac-user-holds %]
826
                            [% END # / #RESERVES.count %]
826
                            [% END # / #RESERVES.count %]
827
827
828
                            [% IF Koha.Preference('UseRecalls') && RECALLS.count %]
828
                            [% IF Koha.Preference('UseRecalls') != "off" && RECALLS.count %]
829
                                [% WRAPPER tab_panel tabname="opac-user-recalls" %]
829
                                [% WRAPPER tab_panel tabname="opac-user-recalls" %]
830
                                    <table id="recalls-table" class="table table-bordered table-striped">
830
                                    <table id="recalls-table" class="table table-bordered table-striped">
831
                                        <caption>Recalls <span class="count">([% RECALLS.count | html %])</span></caption>
831
                                        <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 351-357 $template->param( Link Here
351
    showpriority => $show_priority,
351
    showpriority => $show_priority,
352
);
352
);
353
353
354
if ( C4::Context->preference('UseRecalls') ) {
354
if ( C4::Context->preference('UseRecalls') ne "off" ) {
355
    my $recalls = Koha::Recalls->search( { patron_id => $borrowernumber, completed => 0 } );
355
    my $recalls = Koha::Recalls->search( { patron_id => $borrowernumber, completed => 0 } );
356
    $template->param( RECALLS => $recalls );
356
    $template->param( RECALLS => $recalls );
357
}
357
}
(-)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 1819-1825 subtest "CanBookBeRenewed tests" => sub { Link Here
1819
    );
1819
    );
1820
1820
1821
    # Recalls
1821
    # Recalls
1822
    t::lib::Mocks::mock_preference( 'UseRecalls', 1 );
1822
    t::lib::Mocks::mock_preference( 'UseRecalls', 'opac' );
1823
    Koha::CirculationRules->set_rules(
1823
    Koha::CirculationRules->set_rules(
1824
        {
1824
        {
1825
            categorycode => undef,
1825
            categorycode => undef,
Lines 2659-2665 subtest 'AddIssue & AllowReturnToBranch' => sub { Link Here
2659
subtest 'AddIssue | recalls' => sub {
2659
subtest 'AddIssue | recalls' => sub {
2660
    plan tests => 3;
2660
    plan tests => 3;
2661
2661
2662
    t::lib::Mocks::mock_preference( "UseRecalls",        1 );
2662
    t::lib::Mocks::mock_preference( "UseRecalls",        'opac' );
2663
    t::lib::Mocks::mock_preference( "item-level_itypes", 1 );
2663
    t::lib::Mocks::mock_preference( "item-level_itypes", 1 );
2664
    my $patron1 = $builder->build_object( { class => 'Koha::Patrons' } );
2664
    my $patron1 = $builder->build_object( { class => 'Koha::Patrons' } );
2665
    my $patron2 = $builder->build_object( { class => 'Koha::Patrons' } );
2665
    my $patron2 = $builder->build_object( { class => 'Koha::Patrons' } );
Lines 5246-5252 subtest 'CanBookBeIssued | notforloan' => sub { Link Here
5246
subtest 'CanBookBeIssued | recalls' => sub {
5246
subtest 'CanBookBeIssued | recalls' => sub {
5247
    plan tests => 3;
5247
    plan tests => 3;
5248
5248
5249
    t::lib::Mocks::mock_preference( "UseRecalls",        1 );
5249
    t::lib::Mocks::mock_preference( "UseRecalls",        'opac' );
5250
    t::lib::Mocks::mock_preference( "item-level_itypes", 1 );
5250
    t::lib::Mocks::mock_preference( "item-level_itypes", 1 );
5251
    my $patron1 = $builder->build_object( { class => 'Koha::Patrons' } );
5251
    my $patron1 = $builder->build_object( { class => 'Koha::Patrons' } );
5252
    my $patron2 = $builder->build_object( { class => 'Koha::Patrons' } );
5252
    my $patron2 = $builder->build_object( { class => 'Koha::Patrons' } );
Lines 5411-5417 subtest 'AddReturn should clear items.onloan for unissued items' => sub { Link Here
5411
subtest 'AddReturn | recalls' => sub {
5411
subtest 'AddReturn | recalls' => sub {
5412
    plan tests => 3;
5412
    plan tests => 3;
5413
5413
5414
    t::lib::Mocks::mock_preference( "UseRecalls",        1 );
5414
    t::lib::Mocks::mock_preference( "UseRecalls",        'opac' );
5415
    t::lib::Mocks::mock_preference( "item-level_itypes", 1 );
5415
    t::lib::Mocks::mock_preference( "item-level_itypes", 1 );
5416
    my $patron1 = $builder->build_object( { class => 'Koha::Patrons' } );
5416
    my $patron1 = $builder->build_object( { class => 'Koha::Patrons' } );
5417
    my $patron2 = $builder->build_object( { class => 'Koha::Patrons' } );
5417
    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 2144-2150 subtest 'ModReserve to convert a hold to a recall' => sub { Link Here
2144
        }
2144
        }
2145
    )->store;
2145
    )->store;
2146
2146
2147
    t::lib::Mocks::mock_preference( "UseRecalls", 1 );
2147
    t::lib::Mocks::mock_preference( "UseRecalls", 'opac' );
2148
    t::lib::Mocks::mock_userenv( { branchcode => $branch } );
2148
    t::lib::Mocks::mock_userenv( { branchcode => $branch } );
2149
2149
2150
    C4::Circulation::AddIssue( $patron2, $item->barcode );
2150
    C4::Circulation::AddIssue( $patron2, $item->barcode );
(-)a/t/db_dependent/Koha/Biblio.t (-2 / +2 lines)
Lines 1821-1830 subtest 'Recalls tests' => sub { Link Here
1821
    is( $recalls->count,                    3, 'Correctly get number of recalls for biblio' );
1821
    is( $recalls->count,                    3, 'Correctly get number of recalls for biblio' );
1822
    is( $recalls->filter_by_current->count, 1, 'Correctly get number of active recalls for biblio' );
1822
    is( $recalls->filter_by_current->count, 1, 'Correctly get number of active recalls for biblio' );
1823
1823
1824
    t::lib::Mocks::mock_preference( 'UseRecalls', 0 );
1824
    t::lib::Mocks::mock_preference( 'UseRecalls', 'off' );
1825
    is( $biblio->can_be_recalled( { patron => $patron1 } ), 0, "Can't recall with UseRecalls disabled" );
1825
    is( $biblio->can_be_recalled( { patron => $patron1 } ), 0, "Can't recall with UseRecalls disabled" );
1826
1826
1827
    t::lib::Mocks::mock_preference( "UseRecalls", 1 );
1827
    t::lib::Mocks::mock_preference( "UseRecalls", 'opac' );
1828
    $item1->update( { notforloan => 1 } );
1828
    $item1->update( { notforloan => 1 } );
1829
    is( $biblio->can_be_recalled( { patron => $patron1 } ), 0, "Can't recall with no available items" );
1829
    is( $biblio->can_be_recalled( { patron => $patron1 } ), 0, "Can't recall with no available items" );
1830
1830
(-)a/t/db_dependent/Koha/Item.t (-4 / +4 lines)
Lines 2946-2952 subtest 'Recalls tests' => sub { Link Here
2946
    );
2946
    );
2947
2947
2948
    t::lib::Mocks::mock_userenv( { patron => $patron1 } );
2948
    t::lib::Mocks::mock_userenv( { patron => $patron1 } );
2949
    t::lib::Mocks::mock_preference( 'UseRecalls', 1 );
2949
    t::lib::Mocks::mock_preference( 'UseRecalls', 'opac' );
2950
2950
2951
    my $recall1 = Koha::Recall->new(
2951
    my $recall1 = Koha::Recall->new(
2952
        {
2952
        {
Lines 2976-2985 subtest 'Recalls tests' => sub { Link Here
2976
2976
2977
    $recall2->set_cancelled;
2977
    $recall2->set_cancelled;
2978
2978
2979
    t::lib::Mocks::mock_preference( 'UseRecalls', 0 );
2979
    t::lib::Mocks::mock_preference( 'UseRecalls', 'off' );
2980
    is( $item1->can_be_recalled( { patron => $patron1 } ), 0, "Can't recall with UseRecalls disabled" );
2980
    is( $item1->can_be_recalled( { patron => $patron1 } ), 0, "Can't recall with UseRecalls disabled" );
2981
2981
2982
    t::lib::Mocks::mock_preference( "UseRecalls", 1 );
2982
    t::lib::Mocks::mock_preference( "UseRecalls", 'opac' );
2983
2983
2984
    $item1->update( { notforloan => 1 } );
2984
    $item1->update( { notforloan => 1 } );
2985
    is( $item1->can_be_recalled( { patron => $patron1 } ), 0, "Can't recall that is not for loan" );
2985
    is( $item1->can_be_recalled( { patron => $patron1 } ), 0, "Can't recall that is not for loan" );
Lines 3199-3205 subtest 'has_pending_recall() tests' => sub { Link Here
3199
    my $patron  = $builder->build_object( { class => 'Koha::Patrons' } );
3199
    my $patron  = $builder->build_object( { class => 'Koha::Patrons' } );
3200
3200
3201
    t::lib::Mocks::mock_userenv( { branchcode => $library->branchcode } );
3201
    t::lib::Mocks::mock_userenv( { branchcode => $library->branchcode } );
3202
    t::lib::Mocks::mock_preference( 'UseRecalls', 1 );
3202
    t::lib::Mocks::mock_preference( 'UseRecalls', 'opac' );
3203
3203
3204
    C4::Circulation::AddIssue( $patron, $item->barcode );
3204
    C4::Circulation::AddIssue( $patron, $item->barcode );
3205
3205
(-)a/t/db_dependent/SIP/Transaction.t (-1 / +1 lines)
Lines 1437-1443 subtest do_checkout_with_recalls => sub { Link Here
1437
        }
1437
        }
1438
    );
1438
    );
1439
1439
1440
    t::lib::Mocks::mock_preference( 'UseRecalls', 1 );
1440
    t::lib::Mocks::mock_preference( 'UseRecalls', 'opac' );
1441
    Koha::CirculationRules->set_rule(
1441
    Koha::CirculationRules->set_rule(
1442
        {
1442
        {
1443
            branchcode   => undef,
1443
            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