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

(-)a/C4/Circulation.pm (-6 / +6 lines)
Lines 390-396 sub transferbook { Link Here
390
    }
390
    }
391
391
392
    # find recall
392
    # find recall
393
    if ( C4::Context->preference('UseRecalls') ) {
393
    if ( C4::Context->preference('UseRecalls') ne "off" ) {
394
        my $recall = Koha::Recalls->find( { item_id => $itemnumber, status => 'in_transit' } );
394
        my $recall = Koha::Recalls->find( { item_id => $itemnumber, status => 'in_transit' } );
395
        if ( defined $recall ) {
395
        if ( defined $recall ) {
396
396
Lines 1155-1161 sub CanBookBeIssued { Link Here
1155
    # CHECK IF ITEM HAS BEEN RECALLED BY ANOTHER PATRON
1155
    # CHECK IF ITEM HAS BEEN RECALLED BY ANOTHER PATRON
1156
    # Only bother doing this if UseRecalls is enabled and the item is recallable
1156
    # Only bother doing this if UseRecalls is enabled and the item is recallable
1157
    # Don't look at recalls that are in transit
1157
    # Don't look at recalls that are in transit
1158
    if ( C4::Context->preference('UseRecalls') and $item_object->can_be_waiting_recall ) {
1158
    if ( C4::Context->preference('UseRecalls') ne "off" and $item_object->can_be_waiting_recall ) {
1159
        my @recalls = $biblio->recalls( {}, { order_by => { -asc => 'created_date' } } )->filter_by_current->as_list;
1159
        my @recalls = $biblio->recalls( {}, { order_by => { -asc => 'created_date' } } )->filter_by_current->as_list;
1160
1160
1161
        foreach my $r (@recalls) {
1161
        foreach my $r (@recalls) {
Lines 1676-1682 sub AddIssue { Link Here
1676
                $item_object->discard_changes;
1676
                $item_object->discard_changes;
1677
            }
1677
            }
1678
1678
1679
            if ( C4::Context->preference('UseRecalls') ) {
1679
            if ( C4::Context->preference('UseRecalls') ne "off" ) {
1680
                Koha::Recalls->move_recall(
1680
                Koha::Recalls->move_recall(
1681
                    {
1681
                    {
1682
                        action         => $cancel_recall,
1682
                        action         => $cancel_recall,
Lines 2485-2491 sub AddReturn { Link Here
2485
    }
2485
    }
2486
2486
2487
    # find recalls...
2487
    # find recalls...
2488
    if ( C4::Context->preference('UseRecalls') ) {
2488
    if ( C4::Context->preference('UseRecalls') ne "off" ) {
2489
2489
2490
        # check if this item is recallable first, which includes checking if UseRecalls syspref is enabled
2490
        # check if this item is recallable first, which includes checking if UseRecalls syspref is enabled
2491
        my $recall = undef;
2491
        my $recall = undef;
Lines 2566-2572 sub AddReturn { Link Here
2566
        $request->status('RET') if $request;
2566
        $request->status('RET') if $request;
2567
    }
2567
    }
2568
2568
2569
    if ( C4::Context->preference('UseRecalls') ) {
2569
    if ( C4::Context->preference('UseRecalls') ne "off" ) {
2570
2570
2571
        # all recalls that have triggered a transfer will have an allocated itemnumber
2571
        # all recalls that have triggered a transfer will have an allocated itemnumber
2572
        my $transfer_recall = Koha::Recalls->find( { item_id => $item->itemnumber, status => 'in_transit' } );
2572
        my $transfer_recall = Koha::Recalls->find( { item_id => $item->itemnumber, status => 'in_transit' } );
Lines 3149-3155 sub CanBookBeRenewed { Link Here
3149
3149
3150
    }
3150
    }
3151
3151
3152
    if ( C4::Context->preference('UseRecalls') ) {
3152
    if ( C4::Context->preference('UseRecalls') ne "off" ) {
3153
        my $recall = undef;
3153
        my $recall = undef;
3154
        $recall = $item->check_recalls if $item->can_be_waiting_recall;
3154
        $recall = $item->check_recalls if $item->can_be_waiting_recall;
3155
        if ( defined $recall ) {
3155
        if ( defined $recall ) {
(-)a/C4/Search.pm (-1 / +1 lines)
Lines 1936-1942 sub searchResults { Link Here
1936
                        )
1936
                        )
1937
                        : ( '', '', '' );
1937
                        : ( '', '', '' );
1938
                    $reservestatus = C4::Reserves::GetReserveStatus( $item->{itemnumber} );
1938
                    $reservestatus = C4::Reserves::GetReserveStatus( $item->{itemnumber} );
1939
                    if ( C4::Context->preference('UseRecalls') ) {
1939
                    if ( C4::Context->preference('UseRecalls') ne "off" ) {
1940
                        if ( Koha::Recalls->search( { item_id => $item->{itemnumber}, status => 'waiting' } )->count ) {
1940
                        if ( Koha::Recalls->search( { item_id => $item->{itemnumber}, status => 'waiting' } )->count ) {
1941
                            $recallstatus = 'Waiting';
1941
                            $recallstatus = 'Waiting';
1942
                        }
1942
                        }
(-)a/C4/XSLT.pm (-1 / +1 lines)
Lines 309-315 sub buildKohaItemsNamespace { Link Here
309
        my $substatus = '';
309
        my $substatus = '';
310
        my $recalls_count;
310
        my $recalls_count;
311
311
312
        if ( C4::Context->preference('UseRecalls') ) {
312
        if ( C4::Context->preference('UseRecalls') ne "off" ) {
313
            $recalls_count = Koha::Recalls->search( { item_id => $item->itemnumber, status => 'waiting' } )->count;
313
            $recalls_count = Koha::Recalls->search( { item_id => $item->itemnumber, status => 'waiting' } )->count;
314
        }
314
        }
315
315
(-)a/Koha/Biblio.pm (-1 / +1 lines)
Lines 2107-2113 if hold_convert $param is included, this is to say that this a check to convert Link Here
2107
sub can_be_recalled {
2107
sub can_be_recalled {
2108
    my ( $self, $params ) = @_;
2108
    my ( $self, $params ) = @_;
2109
2109
2110
    return 0 if !( C4::Context->preference('UseRecalls') );
2110
    return 0 if ( C4::Context->preference('UseRecalls') eq "off" );
2111
2111
2112
    my $patron = $params->{patron};
2112
    my $patron = $params->{patron};
2113
2113
(-)a/Koha/Item.pm (-2 / +2 lines)
Lines 2319-2325 if hold_convert $param is included, this is to say that this a check to convert Link Here
2319
sub can_be_recalled {
2319
sub can_be_recalled {
2320
    my ( $self, $params ) = @_;
2320
    my ( $self, $params ) = @_;
2321
2321
2322
    return 0 if !( C4::Context->preference('UseRecalls') );
2322
    return 0 if ( C4::Context->preference('UseRecalls') eq "off" );
2323
2323
2324
    # check if this item is not for loan, withdrawn or lost
2324
    # check if this item is not for loan, withdrawn or lost
2325
    return 0 if ( $self->notforloan != 0 );
2325
    return 0 if ( $self->notforloan != 0 );
Lines 2419-2425 At this point the item has already been recalled. We are now at the checkin and Link Here
2419
sub can_be_waiting_recall {
2419
sub can_be_waiting_recall {
2420
    my ($self) = @_;
2420
    my ($self) = @_;
2421
2421
2422
    return 0 if !( C4::Context->preference('UseRecalls') );
2422
    return 0 if ( C4::Context->preference('UseRecalls') eq "off" );
2423
2423
2424
    # check if this item is not for loan, withdrawn or lost
2424
    # check if this item is not for loan, withdrawn or lost
2425
    return 0 if ( $self->notforloan != 0 );
2425
    return 0 if ( $self->notforloan != 0 );
(-)a/circ/circulation.pl (-2 / +2 lines)
Lines 519-525 if ( @$barcodes && $op eq 'cud-checkout' ) { Link Here
519
            }
519
            }
520
            unless ($confirm_required) {
520
            unless ($confirm_required) {
521
                my $switch_onsite_checkout = exists $messages->{ONSITE_CHECKOUT_WILL_BE_SWITCHED};
521
                my $switch_onsite_checkout = exists $messages->{ONSITE_CHECKOUT_WILL_BE_SWITCHED};
522
                if ( C4::Context->preference('UseRecalls') && !$recall_id ) {
522
                if ( C4::Context->preference('UseRecalls') ne "off" && !$recall_id ) {
523
                    my $recall = Koha::Recalls->find(
523
                    my $recall = Koha::Recalls->find(
524
                        {
524
                        {
525
                            biblio_id => $item->biblionumber,
525
                            biblio_id => $item->biblionumber,
Lines 598-604 if ($patron) { Link Here
598
        WaitingHolds => $waiting_holds,
598
        WaitingHolds => $waiting_holds,
599
    );
599
    );
600
600
601
    if ( C4::Context->preference('UseRecalls') ) {
601
    if ( C4::Context->preference('UseRecalls') ne "off" ) {
602
        my $waiting_recalls = $patron->recalls->search( { status => 'waiting' } );
602
        my $waiting_recalls = $patron->recalls->search( { status => 'waiting' } );
603
        $template->param(
603
        $template->param(
604
            recalls => $patron->recalls->filter_by_current->search( {}, { order_by => { -asc => 'created_date' } } ),
604
            recalls => $patron->recalls->filter_by_current->search( {}, { order_by => { -asc => 'created_date' } } ),
(-)a/circ/returns.pl (-2 / +2 lines)
Lines 267-273 if ( $transit && $op eq 'cud-transfer' ) { Link Here
267
    my $transfer = Koha::Item::Transfers->find($transit);
267
    my $transfer = Koha::Item::Transfers->find($transit);
268
    if ($canceltransfer) {
268
    if ($canceltransfer) {
269
        $transfer->cancel( { reason => 'Manual', force => 1 } );
269
        $transfer->cancel( { reason => 'Manual', force => 1 } );
270
        if ( C4::Context->preference('UseRecalls') ) {
270
        if ( C4::Context->preference('UseRecalls') ne "off" ) {
271
            my $recall_transfer_deleted = Koha::Recalls->find( { item_id => $itemnumber, status => 'in_transit' } );
271
            my $recall_transfer_deleted = Koha::Recalls->find( { item_id => $itemnumber, status => 'in_transit' } );
272
            if ( defined $recall_transfer_deleted ) {
272
            if ( defined $recall_transfer_deleted ) {
273
                $recall_transfer_deleted->revert_transfer;
273
                $recall_transfer_deleted->revert_transfer;
Lines 281-287 if ( $transit && $op eq 'cud-transfer' ) { Link Here
281
    my $item     = Koha::Items->find($itemnumber);
281
    my $item     = Koha::Items->find($itemnumber);
282
    my $transfer = $item->get_transfer;
282
    my $transfer = $item->get_transfer;
283
    $transfer->cancel( { reason => 'Manual', force => 1 } );
283
    $transfer->cancel( { reason => 'Manual', force => 1 } );
284
    if ( C4::Context->preference('UseRecalls') ) {
284
    if ( C4::Context->preference('UseRecalls') ne "off" ) {
285
        my $recall_transfer_deleted = Koha::Recalls->find( { item_id => $itemnumber, status => 'in_transit' } );
285
        my $recall_transfer_deleted = Koha::Recalls->find( { item_id => $itemnumber, status => 'in_transit' } );
286
        if ( defined $recall_transfer_deleted ) {
286
        if ( defined $recall_transfer_deleted ) {
287
            $recall_transfer_deleted->revert_transfer;
287
            $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 650-656 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
650
('QuoteOfTheDay','','intranet,opac','Enable or disable display of Quote of the Day on the OPAC and staff interface home page','multiple'),
650
('QuoteOfTheDay','','intranet,opac','Enable or disable display of Quote of the Day on the OPAC and staff interface home page','multiple'),
651
('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'),
651
('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'),
652
('RealTimeHoldsQueue', '0', NULL, 'Enable updating the holds queue in real time', 'YesNo'),
652
('RealTimeHoldsQueue', '0', NULL, 'Enable updating the holds queue in real time', 'YesNo'),
653
('RecallsInterface','opac','opac|staff|both','The interface that recalls can be placed through','Choice'),
654
('RecallsLog','1',NULL,'If ON, log create/cancel/expire/fulfill actions on recalls','YesNo'),
653
('RecallsLog','1',NULL,'If ON, log create/cancel/expire/fulfill actions on recalls','YesNo'),
655
('RecallsMaxPickUpDelay','7',NULL,'Define the maximum time a recall can be awaiting pickup','Integer'),
654
('RecallsMaxPickUpDelay','7',NULL,'Define the maximum time a recall can be awaiting pickup','Integer'),
656
('RecordLocalUseOnReturn','0',NULL,'If ON, statistically record returns of unissued items as local use, instead of return','YesNo'),
655
('RecordLocalUseOnReturn','0',NULL,'If ON, statistically record returns of unissued items as local use, instead of return','YesNo'),
Lines 856-862 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
856
('UseICUStyleQuotes','0','1','Tell Koha whether to use ICU style quotes ({) or default (") when tracing subjects .','YesNo'),
855
('UseICUStyleQuotes','0','1','Tell Koha whether to use ICU style quotes ({) or default (") when tracing subjects .','YesNo'),
857
('UseLocationAsAQInSIP', '0', '', 'Use permanent_location instead of homebranch for AQ in SIP response', 'YesNo'),
856
('UseLocationAsAQInSIP', '0', '', 'Use permanent_location instead of homebranch for AQ in SIP response', 'YesNo'),
858
('UseOCLCEncodingLevels','0',NULL,'If enabled, include OCLC encoding levels in leader value builder dropdown for position 17.','YesNo'),
857
('UseOCLCEncodingLevels','0',NULL,'If enabled, include OCLC encoding levels in leader value builder dropdown for position 17.','YesNo'),
859
('UseRecalls','0',NULL,'Enable or disable recalls','YesNo'),
858
('UseRecalls','off','off|opac|staff|opac_and_staff','Enable or disable recalls','Choice'),
860
('UseTransportCostMatrix','0','','Use Transport Cost Matrix when filling holds','YesNo'),
859
('UseTransportCostMatrix','0','','Use Transport Cost Matrix when filling holds','YesNo'),
861
('UseWYSIWYGinSystemPreferences','0','','Show WYSIWYG editor when editing certain HTML system preferences.','YesNo'),
860
('UseWYSIWYGinSystemPreferences','0','','Show WYSIWYG editor when editing certain HTML system preferences.','YesNo'),
862
('viewISBD','1','','Allow display of ISBD view of bibiographic records','YesNo'),
861
('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 78-84 Link Here
78
            </li>
78
            </li>
79
        [%- END -%]
79
        [%- END -%]
80
80
81
        [%- IF ( Koha.Preference('UseRecalls') && CAN_user_recalls ) -%]
81
        [%- IF ( Koha.Preference('UseRecalls') != "off" && CAN_user_recalls ) -%]
82
            <li [% IF recallsview %]class="active"[% END %]>
82
            <li [% IF recallsview %]class="active"[% END %]>
83
                <a href="/cgi-bin/koha/recalls/request.pl?biblionumber=[% biblio_object_id | url %]">Recalls ([% biblio.recalls.search( completed => 0 ).count | html %])</a>
83
                <a href="/cgi-bin/koha/recalls/request.pl?biblionumber=[% biblio_object_id | url %]">Recalls ([% biblio.recalls.search( completed => 0 ).count | html %])</a>
84
            </li>
84
            </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 282-289 Link Here
282
                                        <div class="hint">
282
                                        <div class="hint">
283
                                            [% patron.title | html %] [% patron.firstname | html %] [% patron.surname | html %] does not currently have an image available. To import an image for [% patron.title | html %]
283
                                            [% 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.firstname | html %]
284
                                            [% patron.firstname | html %]
285
                                            [% patron.surname | html %],
285
                                            [% patron.surname | html %], enter the name of an image file to upload.
286
                                            enter the name of an image file to upload.
287
                                        </div>
286
                                        </div>
288
                                    [% END # /IF patron.image %]
287
                                    [% END # /IF patron.image %]
289
                                    <p>Only PNG, GIF, JPEG, XPM formats are supported.</p>
288
                                    <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 69-75 Link Here
69
            </div>
69
            </div>
70
70
71
            <div class="col-sm-6 col-md-12">
71
            <div class="col-sm-6 col-md-12">
72
                [% IF Koha.Preference('UseRecalls') and CAN_user_recalls %]
72
                [% IF Koha.Preference('UseRecalls') != "off" and CAN_user_recalls %]
73
                    <h5>Recalls</h5>
73
                    <h5>Recalls</h5>
74
                    <ul>
74
                    <ul>
75
                        <li>
75
                        <li>
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc (-3 / +3 lines)
Lines 70-76 Link Here
70
                                    <option value="[% hold.priority | html %]" selected="selected">[% this_priority | html %]</option>
70
                                    <option value="[% hold.priority | html %]" selected="selected">[% this_priority | html %]</option>
71
                                [% END %]
71
                                [% END %]
72
                                <option value="del">del</option>
72
                                <option value="del">del</option>
73
                                [% IF Koha.Preference('UseRecalls') AND Koha.Preference('RecallsInterface') != 'opac' %]
73
                                [% IF ( Koha.Preference('UseRecalls').match('staff') ) %]
74
                                    <option value="recall">recall</option>
74
                                    <option value="recall">recall</option>
75
                                [% END %]
75
                                [% END %]
76
                            </select>
76
                            </select>
Lines 88-94 Link Here
88
                                [% ELSE %]
88
                                [% ELSE %]
89
                                    <option value="[% hold.priority | html %]" selected="selected">[% this_priority | html %]</option>
89
                                    <option value="[% hold.priority | html %]" selected="selected">[% this_priority | html %]</option>
90
                                [% END %]
90
                                [% END %]
91
                                [% IF Koha.Preference('UseRecalls') AND Koha.Preference('RecallsInterface') != 'opac' %]
91
                                [% IF ( Koha.Preference('UseRecalls').match('staff') ) %]
92
                                    <option value="recall">recall</option>
92
                                    <option value="recall">recall</option>
93
                                [% END %]
93
                                [% END %]
94
                            </select>
94
                            </select>
Lines 367-373 Link Here
367
                    <td></td>
367
                    <td></td>
368
                [% END %]
368
                [% END %]
369
                <td>
369
                <td>
370
                    [% IF Koha.Preference('UseRecalls') AND Koha.Preference('RecallsInterface') != 'opac' %]
370
                    [% IF ( Koha.Preference('UseRecalls').match('staff') ) %]
371
                        <a class="convert-to-recall btn" title="Convert hold to recall" data-id="[% hold.reserve_id | html %]">Mark for conversion to recall</a>
371
                        <a class="convert-to-recall btn" title="Convert hold to recall" data-id="[% hold.reserve_id | html %]">Mark for conversion to recall</a>
372
                    [% END %]
372
                    [% END %]
373
                </td>
373
                </td>
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc (-2 / +2 lines)
Lines 244-250 Link Here
244
        [% IF biblio.serial %]
244
        [% IF biblio.serial %]
245
            embed.push('serial_item.serial');
245
            embed.push('serial_item.serial');
246
        [% END %]
246
        [% END %]
247
        [% IF Koha.Preference('UseRecalls') %]
247
        [% IF Koha.Preference('UseRecalls') != "off" %]
248
            embed.push('recall', 'recall+strings', 'recall.patron')
248
            embed.push('recall', 'recall+strings', 'recall.patron')
249
        [% END %]
249
        [% END %]
250
        embed.push('in_bundle', 'bundle_host', 'bundle_host.biblio', 'bundle_items_lost+count', 'bundle_items_not_lost+count');
250
        embed.push('in_bundle', 'bundle_host', 'bundle_host.biblio', 'bundle_items_lost+count', 'bundle_items_not_lost+count');
Lines 549-555 Link Here
549
                            }
549
                            }
550
                        }
550
                        }
551
551
552
                        [% IF Koha.Preference('UseRecalls') %]
552
                        [% IF Koha.Preference('UseRecalls') != "off" %]
553
                            if ( row.recall && ( row.item_id === row.recall.item_id ) ) {
553
                            if ( row.recall && ( row.item_id === row.recall.item_id ) ) {
554
                                if ( row.recall.waiting_date ) {
554
                                if ( row.recall.waiting_date ) {
555
                                    nodes += '<span>%s</span>'.format(_("Waiting recall at %s since %s").format(escape_str(row.recall._strings.pickup_library_id.str), $date(row.recall.waiting_date)));
555
                                    nodes += '<span>%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 23-29 Link Here
23
            [% NEXT IF !Koha.Preference( 'ILLModule' ) && messaging_preference.message_name.match('^Ill_') %]
23
            [% NEXT IF !Koha.Preference( 'ILLModule' ) && messaging_preference.message_name.match('^Ill_') %]
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.Auto_Renewals && Koha.Preference('AutoRenewalNotices') != 'preferences' %]
25
            [% NEXT IF messaging_preference.Auto_Renewals && Koha.Preference('AutoRenewalNotices') != 'preferences' %]
26
            [% NEXT IF !Koha.Preference('UseRecalls') && messaging_preference.message_name.match('^Recall_') %]
26
            [% NEXT IF Koha.Preference('UseRecalls') != "off" && messaging_preference.message_name.match('^Recall_') %]
27
            <tr id="[% messaging_preference.message_name _ "_message" | lower | html %]">
27
            <tr id="[% messaging_preference.message_name _ "_message" | lower | html %]">
28
                <td
28
                <td
29
                    >[% IF ( messaging_preference.Item_Due ) %]
29
                    >[% 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 1468-1488 Circulation: Link Here
1468
            - class: integer
1468
            - class: integer
1469
            - days.
1469
            - days.
1470
        -
1470
        -
1471
            - Recalls
1471
            - pref: UseRecalls
1472
            - pref: UseRecalls
1472
              type: boolean
1473
              default: off
1473
              choices:
1474
              choices:
1474
                  1: Use
1475
                  off: are disabled
1475
                  0: "Don't use"
1476
                  opac: can be placed through the OPAC only
1476
            - recalls. Make sure you configure <a href="/cgi-bin/koha/admin/smart-rules.pl">circulation and fine rules</a> for recalls once enabled.
1477
                  staff: can be placed through the staff interface only
1477
        -
1478
                  opac_and_staff: can be placed through both the OPAC and staff interface
1478
            - Recalls can be placed through
1479
            - . Make sure you configure <a href="/cgi-bin/koha/admin/smart-rules.pl">circulation and fine rules</a> for recalls when enabled.
1479
            - pref: RecallsInterface
1480
              default: opac
1481
              choices:
1482
                  opac: the OPAC only
1483
                  staff: the staff interface only
1484
                  both: both the OPAC and the staff interface
1485
            - . (Requires <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=UseRecalls">UseRecalls</a>.)
1486
1480
1487
    SIP2:
1481
    SIP2:
1488
        -
1482
        -
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt (-4 / +4 lines)
Lines 150-156 Link Here
150
                            <th>Article requests</th>
150
                            <th>Article requests</th>
151
                        [% END %]
151
                        [% END %]
152
                        <th>Rental discount (%)</th>
152
                        <th>Rental discount (%)</th>
153
                        [% IF Koha.Preference('UseRecalls') %]
153
                        [% IF Koha.Preference('UseRecalls') != "off" %]
154
                            <th>Recalls allowed (total)</th>
154
                            <th>Recalls allowed (total)</th>
155
                            <th>Recalls per record (count)</th>
155
                            <th>Recalls per record (count)</th>
156
                            <th>On shelf recalls allowed</th>
156
                            <th>On shelf recalls allowed</th>
Lines 416-422 Link Here
416
                                        </td>
416
                                        </td>
417
                                    [% END %]
417
                                    [% END %]
418
                                    <td>[% rentaldiscount | html %]</td>
418
                                    <td>[% rentaldiscount | html %]</td>
419
                                    [% IF Koha.Preference('UseRecalls') %]
419
                                    [% IF Koha.Preference('UseRecalls') != "off" %]
420
                                        <td>[% recalls_allowed | html %]</td>
420
                                        <td>[% recalls_allowed | html %]</td>
421
                                        <td>[% recalls_per_record | html %]</td>
421
                                        <td>[% recalls_per_record | html %]</td>
422
                                        <td data-code="[% on_shelf_recalls | html %]">
422
                                        <td data-code="[% on_shelf_recalls | html %]">
Lines 566-572 Link Here
566
                            </td>
566
                            </td>
567
                        [% END %]
567
                        [% END %]
568
                        <td><input type="text" name="rentaldiscount" id="rentaldiscount" size="3" inputmode="decimal" pattern="^\d+(\.\d{2})?$" /></td>
568
                        <td><input type="text" name="rentaldiscount" id="rentaldiscount" size="3" inputmode="decimal" pattern="^\d+(\.\d{2})?$" /></td>
569
                        [% IF Koha.Preference('UseRecalls') %]
569
                        [% IF Koha.Preference('UseRecalls') != "off" %]
570
                            <td><input type="text" name="recalls_allowed" id="recalls_allowed" size="3" /></td>
570
                            <td><input type="text" name="recalls_allowed" id="recalls_allowed" size="3" /></td>
571
                            <td><input type="text" name="recalls_per_record" id="recalls_per_record" size="3" /></td>
571
                            <td><input type="text" name="recalls_per_record" id="recalls_per_record" size="3" /></td>
572
                            <td>
572
                            <td>
Lines 631-637 Link Here
631
                            <th>Article requests</th>
631
                            <th>Article requests</th>
632
                        [% END %]
632
                        [% END %]
633
                        <th>Rental discount (%)</th>
633
                        <th>Rental discount (%)</th>
634
                        [% IF Koha.Preference('UseRecalls') %]
634
                        [% IF Koha.Preference('UseRecalls') != "off" %]
635
                            <th>Recalls allowed (total)</th>
635
                            <th>Recalls allowed (total)</th>
636
                            <th>Recalls per record (count)</th>
636
                            <th>Recalls per record (count)</th>
637
                            <th>On shelf recalls allowed</th>
637
                            <th>On shelf recalls allowed</th>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt (-1 / +1 lines)
Lines 694-700 Link Here
694
                                                    <span>Holds ([% SEARCH_RESULT.biblio_object.holds.count | html %])</span>
694
                                                    <span>Holds ([% SEARCH_RESULT.biblio_object.holds.count | html %])</span>
695
                                                [% END %]
695
                                                [% END %]
696
                                            [% END # /IF SEARCH_RESULT.norequests %]
696
                                            [% END # /IF SEARCH_RESULT.norequests %]
697
                                            [% IF Koha.Preference('UseRecalls') and CAN_user_recalls %]
697
                                            [% IF Koha.Preference('UseRecalls') != "off" and CAN_user_recalls %]
698
                                                |
698
                                                |
699
                                                <a id="recall_[% SEARCH_RESULT.biblionumber | html %]" href="/cgi-bin/koha/recalls/request.pl?biblionumber=[% SEARCH_RESULT.biblionumber | html %]"
699
                                                <a id="recall_[% SEARCH_RESULT.biblionumber | html %]" href="/cgi-bin/koha/recalls/request.pl?biblionumber=[% SEARCH_RESULT.biblionumber | html %]"
700
                                                    >Recalls ([% SEARCH_RESULT.biblio_object.recalls.search( completed => 0 ).count | html %])</a
700
                                                    >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 100-106 Link Here
100
                </li>
100
                </li>
101
            </ul>
101
            </ul>
102
102
103
            [% IF Koha.Preference('UseRecalls') and CAN_user_recalls %]
103
            [% IF Koha.Preference('UseRecalls') != "off" and CAN_user_recalls %]
104
                <h3>Recalls</h3>
104
                <h3>Recalls</h3>
105
105
106
                <ul class="buttons-list">
106
                <ul class="buttons-list">
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/recallshistory.tt (-1 / +1 lines)
Lines 25-31 Link Here
25
[% WRAPPER 'main-container.inc' aside='circ-menu' %]
25
[% WRAPPER 'main-container.inc' aside='circ-menu' %]
26
    [% INCLUDE 'members-toolbar.inc' %]
26
    [% INCLUDE 'members-toolbar.inc' %]
27
    <h1>Recalls history</h1>
27
    <h1>Recalls history</h1>
28
    [% IF Koha.Preference('UseRecalls') %]
28
    [% IF Koha.Preference('UseRecalls') != "off" %]
29
        <input type="checkbox" id="hide_old" name="hide_old" checked="checked" />
29
        <input type="checkbox" id="hide_old" name="hide_old" checked="checked" />
30
        <label for="hide_old">Show old recalls</label>
30
        <label for="hide_old">Show old recalls</label>
31
        [% INCLUDE 'recalls.inc' %]
31
        [% 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 39-45 Link Here
39
                <li [% IF holdshistoryview %]class="active"[% END %]> <a href="/cgi-bin/koha/opac-holdshistory.pl">Holds history</a></li>
39
                <li [% IF holdshistoryview %]class="active"[% END %]> <a href="/cgi-bin/koha/opac-holdshistory.pl">Holds history</a></li>
40
            [% END %]
40
            [% END %]
41
41
42
            [% IF Koha.Preference('UseRecalls') %]
42
            [% IF Koha.Preference('UseRecalls') != "off" %]
43
                <li [% IF recallsview %]class="active"[% END %]> <a href="/cgi-bin/koha/opac-recalls.pl">Recalls history</a> </li>
43
                <li [% IF recallsview %]class="active"[% END %]> <a href="/cgi-bin/koha/opac-recalls.pl">Recalls history</a> </li>
44
            [% END %]
44
            [% END %]
45
45
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt (-1 / +1 lines)
Lines 69-75 Link Here
69
                                            [% NEXT IF !Koha.Preference( 'ILLModule' ) && messaging_preference.message_name.match('^Ill_') %]
69
                                            [% NEXT IF !Koha.Preference( 'ILLModule' ) && messaging_preference.message_name.match('^Ill_') %]
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.Auto_Renewals && Koha.Preference('AutoRenewalNotices') != 'preferences' %]
71
                                            [% NEXT IF messaging_preference.Auto_Renewals && Koha.Preference('AutoRenewalNotices') != 'preferences' %]
72
                                            [% NEXT IF !Koha.Preference('UseRecalls') && messaging_preference.message_name.match('^Recall_') %]
72
                                            [% NEXT IF Koha.Preference('UseRecalls') == "off" && messaging_preference.message_name.match('^Recall_') %]
73
                                            <tr id="[% messaging_preference.message_name _ "_message" | lower | html %]">
73
                                            <tr id="[% messaging_preference.message_name _ "_message" | lower | html %]">
74
                                                <td
74
                                                <td
75
                                                    >[% IF ( messaging_preference.Item_Due ) %]
75
                                                    >[% 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
                    <h2>Recalls history</h2>
29
                    <h2>Recalls history</h2>
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 304-310 Link Here
304
                                    <span>Holds ([% RESERVES.count | html %])</span>
304
                                    <span>Holds ([% RESERVES.count | html %])</span>
305
                                [% END %]
305
                                [% END %]
306
                            [% END %]
306
                            [% END %]
307
                            [% IF Koha.Preference('UseRecalls') && RECALLS.count %]
307
                            [% IF Koha.Preference('UseRecalls') != "off" && RECALLS.count %]
308
                                [% WRAPPER tab_item tabname= "opac-user-recalls" %]
308
                                [% WRAPPER tab_item tabname= "opac-user-recalls" %]
309
                                    <span>Recalls ([% RECALLS.count | html %])</span>
309
                                    <span>Recalls ([% RECALLS.count | html %])</span>
310
                                [% END %]
310
                                [% END %]
Lines 851-857 Link Here
851
                                [% END # /tab_panel#opac-user-holds %]
851
                                [% END # /tab_panel#opac-user-holds %]
852
                            [% END # / #RESERVES.count %]
852
                            [% END # / #RESERVES.count %]
853
853
854
                            [% IF Koha.Preference('UseRecalls') && RECALLS.count %]
854
                            [% IF Koha.Preference('UseRecalls') != "off" && RECALLS.count %]
855
                                [% WRAPPER tab_panel tabname="opac-user-recalls" %]
855
                                [% WRAPPER tab_panel tabname="opac-user-recalls" %]
856
                                    <table id="recalls-table" class="table table-bordered table-striped">
856
                                    <table id="recalls-table" class="table table-bordered table-striped">
857
                                        <caption>Recalls <span class="count">([% RECALLS.count | html %])</span></caption>
857
                                        <caption>Recalls <span class="count">([% RECALLS.count | html %])</span></caption>
(-)a/members/moremember.pl (-2 / +2 lines)
Lines 209-215 $template->param( Link Here
209
    WaitingHolds => $waiting_holds,
209
    WaitingHolds => $waiting_holds,
210
);
210
);
211
211
212
if ( C4::Context->preference('UseRecalls') ) {
212
if ( C4::Context->preference('UseRecalls') ne "off" ) {
213
    my $waiting_recalls = $patron->recalls->search( { status => 'waiting' } );
213
    my $waiting_recalls = $patron->recalls->search( { status => 'waiting' } );
214
    $template->param( waiting_recalls => $waiting_recalls );
214
    $template->param( waiting_recalls => $waiting_recalls );
215
}
215
}
Lines 304-310 $template->param( Link Here
304
    patron_lists_count        => $patron_lists_count,
304
    patron_lists_count        => $patron_lists_count,
305
);
305
);
306
306
307
if ( C4::Context->preference('UseRecalls') ) {
307
if ( C4::Context->preference('UseRecalls') ne "off" ) {
308
    $template->param(
308
    $template->param(
309
        recalls         => $patron->recalls( {}, { order_by => { -asc => 'recalldate' } } )->filter_by_current,
309
        recalls         => $patron->recalls( {}, { order_by => { -asc => 'recalldate' } } )->filter_by_current,
310
        specific_patron => 1,
310
        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 1818-1824 subtest "CanBookBeRenewed tests" => sub { Link Here
1818
    );
1818
    );
1819
1819
1820
    # Recalls
1820
    # Recalls
1821
    t::lib::Mocks::mock_preference( 'UseRecalls', 1 );
1821
    t::lib::Mocks::mock_preference( 'UseRecalls', 'opac' );
1822
    Koha::CirculationRules->set_rules(
1822
    Koha::CirculationRules->set_rules(
1823
        {
1823
        {
1824
            categorycode => undef,
1824
            categorycode => undef,
Lines 2651-2657 subtest 'AddIssue & AllowReturnToBranch' => sub { Link Here
2651
subtest 'AddIssue | recalls' => sub {
2651
subtest 'AddIssue | recalls' => sub {
2652
    plan tests => 3;
2652
    plan tests => 3;
2653
2653
2654
    t::lib::Mocks::mock_preference( "UseRecalls",        1 );
2654
    t::lib::Mocks::mock_preference( "UseRecalls",        'opac' );
2655
    t::lib::Mocks::mock_preference( "item-level_itypes", 1 );
2655
    t::lib::Mocks::mock_preference( "item-level_itypes", 1 );
2656
    my $patron1 = $builder->build_object( { class => 'Koha::Patrons' } );
2656
    my $patron1 = $builder->build_object( { class => 'Koha::Patrons' } );
2657
    my $patron2 = $builder->build_object( { class => 'Koha::Patrons' } );
2657
    my $patron2 = $builder->build_object( { class => 'Koha::Patrons' } );
Lines 5200-5206 subtest 'CanBookBeIssued | notforloan' => sub { Link Here
5200
subtest 'CanBookBeIssued | recalls' => sub {
5200
subtest 'CanBookBeIssued | recalls' => sub {
5201
    plan tests => 3;
5201
    plan tests => 3;
5202
5202
5203
    t::lib::Mocks::mock_preference( "UseRecalls",        1 );
5203
    t::lib::Mocks::mock_preference( "UseRecalls",        'opac' );
5204
    t::lib::Mocks::mock_preference( "item-level_itypes", 1 );
5204
    t::lib::Mocks::mock_preference( "item-level_itypes", 1 );
5205
    my $patron1 = $builder->build_object( { class => 'Koha::Patrons' } );
5205
    my $patron1 = $builder->build_object( { class => 'Koha::Patrons' } );
5206
    my $patron2 = $builder->build_object( { class => 'Koha::Patrons' } );
5206
    my $patron2 = $builder->build_object( { class => 'Koha::Patrons' } );
Lines 5365-5371 subtest 'AddReturn should clear items.onloan for unissued items' => sub { Link Here
5365
subtest 'AddReturn | recalls' => sub {
5365
subtest 'AddReturn | recalls' => sub {
5366
    plan tests => 3;
5366
    plan tests => 3;
5367
5367
5368
    t::lib::Mocks::mock_preference( "UseRecalls",        1 );
5368
    t::lib::Mocks::mock_preference( "UseRecalls",        'opac' );
5369
    t::lib::Mocks::mock_preference( "item-level_itypes", 1 );
5369
    t::lib::Mocks::mock_preference( "item-level_itypes", 1 );
5370
    my $patron1 = $builder->build_object( { class => 'Koha::Patrons' } );
5370
    my $patron1 = $builder->build_object( { class => 'Koha::Patrons' } );
5371
    my $patron2 = $builder->build_object( { class => 'Koha::Patrons' } );
5371
    my $patron2 = $builder->build_object( { class => 'Koha::Patrons' } );
(-)a/t/db_dependent/Circulation/transferbook.t (-1 / +1 lines)
Lines 167-173 subtest 'transfer already at destination' => sub { Link Here
167
    is( $messages->{ResFound}->{itemnumber}, $item->itemnumber, "We got the reserve info" );
167
    is( $messages->{ResFound}->{itemnumber}, $item->itemnumber, "We got the reserve info" );
168
168
169
    # recalls
169
    # recalls
170
    t::lib::Mocks::mock_preference( 'UseRecalls', 1 );
170
    t::lib::Mocks::mock_preference( 'UseRecalls', 'opac' );
171
    my $recall = Koha::Recall->new(
171
    my $recall = Koha::Recall->new(
172
        {
172
        {
173
            biblio_id         => $item->biblionumber,
173
            biblio_id         => $item->biblionumber,
(-)a/t/db_dependent/Holds.t (-1 / +1 lines)
Lines 2143-2149 subtest 'ModReserve to convert a hold to a recall' => sub { Link Here
2143
        }
2143
        }
2144
    )->store;
2144
    )->store;
2145
2145
2146
    t::lib::Mocks::mock_preference( "UseRecalls", 1 );
2146
    t::lib::Mocks::mock_preference( "UseRecalls", 'opac' );
2147
    t::lib::Mocks::mock_userenv( { branchcode => $branch } );
2147
    t::lib::Mocks::mock_userenv( { branchcode => $branch } );
2148
2148
2149
    C4::Circulation::AddIssue( $patron2, $item->barcode );
2149
    C4::Circulation::AddIssue( $patron2, $item->barcode );
(-)a/t/db_dependent/Koha/Biblio.t (-2 / +2 lines)
Lines 1665-1674 subtest 'Recalls tests' => sub { Link Here
1665
    is( $recalls->count,                    3, 'Correctly get number of recalls for biblio' );
1665
    is( $recalls->count,                    3, 'Correctly get number of recalls for biblio' );
1666
    is( $recalls->filter_by_current->count, 1, 'Correctly get number of active recalls for biblio' );
1666
    is( $recalls->filter_by_current->count, 1, 'Correctly get number of active recalls for biblio' );
1667
1667
1668
    t::lib::Mocks::mock_preference( 'UseRecalls', 0 );
1668
    t::lib::Mocks::mock_preference( 'UseRecalls', 'off' );
1669
    is( $biblio->can_be_recalled( { patron => $patron1 } ), 0, "Can't recall with UseRecalls disabled" );
1669
    is( $biblio->can_be_recalled( { patron => $patron1 } ), 0, "Can't recall with UseRecalls disabled" );
1670
1670
1671
    t::lib::Mocks::mock_preference( "UseRecalls", 1 );
1671
    t::lib::Mocks::mock_preference( "UseRecalls", 'opac' );
1672
    $item1->update( { notforloan => 1 } );
1672
    $item1->update( { notforloan => 1 } );
1673
    is( $biblio->can_be_recalled( { patron => $patron1 } ), 0, "Can't recall with no available items" );
1673
    is( $biblio->can_be_recalled( { patron => $patron1 } ), 0, "Can't recall with no available items" );
1674
1674
(-)a/t/db_dependent/Koha/Item.t (-4 / +4 lines)
Lines 2635-2641 subtest 'Recalls tests' => sub { Link Here
2635
    );
2635
    );
2636
2636
2637
    t::lib::Mocks::mock_userenv( { patron => $patron1 } );
2637
    t::lib::Mocks::mock_userenv( { patron => $patron1 } );
2638
    t::lib::Mocks::mock_preference( 'UseRecalls', 1 );
2638
    t::lib::Mocks::mock_preference( 'UseRecalls', 'opac' );
2639
2639
2640
    my $recall1 = Koha::Recall->new(
2640
    my $recall1 = Koha::Recall->new(
2641
        {
2641
        {
Lines 2665-2674 subtest 'Recalls tests' => sub { Link Here
2665
2665
2666
    $recall2->set_cancelled;
2666
    $recall2->set_cancelled;
2667
2667
2668
    t::lib::Mocks::mock_preference( 'UseRecalls', 0 );
2668
    t::lib::Mocks::mock_preference( 'UseRecalls', 'off' );
2669
    is( $item1->can_be_recalled( { patron => $patron1 } ), 0, "Can't recall with UseRecalls disabled" );
2669
    is( $item1->can_be_recalled( { patron => $patron1 } ), 0, "Can't recall with UseRecalls disabled" );
2670
2670
2671
    t::lib::Mocks::mock_preference( "UseRecalls", 1 );
2671
    t::lib::Mocks::mock_preference( "UseRecalls", 'opac' );
2672
2672
2673
    $item1->update( { notforloan => 1 } );
2673
    $item1->update( { notforloan => 1 } );
2674
    is( $item1->can_be_recalled( { patron => $patron1 } ), 0, "Can't recall that is not for loan" );
2674
    is( $item1->can_be_recalled( { patron => $patron1 } ), 0, "Can't recall that is not for loan" );
Lines 2888-2894 subtest 'has_pending_recall() tests' => sub { Link Here
2888
    my $patron  = $builder->build_object( { class => 'Koha::Patrons' } );
2888
    my $patron  = $builder->build_object( { class => 'Koha::Patrons' } );
2889
2889
2890
    t::lib::Mocks::mock_userenv( { branchcode => $library->branchcode } );
2890
    t::lib::Mocks::mock_userenv( { branchcode => $library->branchcode } );
2891
    t::lib::Mocks::mock_preference( 'UseRecalls', 1 );
2891
    t::lib::Mocks::mock_preference( 'UseRecalls', 'opac' );
2892
2892
2893
    C4::Circulation::AddIssue( $patron, $item->barcode );
2893
    C4::Circulation::AddIssue( $patron, $item->barcode );
2894
2894
(-)a/t/db_dependent/SIP/Transaction.t (-1 / +1 lines)
Lines 1294-1300 subtest do_checkout_with_recalls => sub { Link Here
1294
        }
1294
        }
1295
    );
1295
    );
1296
1296
1297
    t::lib::Mocks::mock_preference( 'UseRecalls', 1 );
1297
    t::lib::Mocks::mock_preference( 'UseRecalls', 'opac' );
1298
    Koha::CirculationRules->set_rule(
1298
    Koha::CirculationRules->set_rule(
1299
        {
1299
        {
1300
            branchcode   => undef,
1300
            branchcode   => undef,
(-)a/t/db_dependent/Search.t (-1 / +1 lines)
Lines 160-166 $contextmodule->mock( Link Here
160
        } elsif ( $pref eq 'SearchLimitLibrary' ) {
160
        } elsif ( $pref eq 'SearchLimitLibrary' ) {
161
            return 'both';
161
            return 'both';
162
        } elsif ( $pref eq 'UseRecalls' ) {
162
        } elsif ( $pref eq 'UseRecalls' ) {
163
            return '0';
163
            return 'off';
164
        } elsif ( $pref eq 'ContentWarningField' ) {
164
        } elsif ( $pref eq 'ContentWarningField' ) {
165
            return q{};
165
            return q{};
166
        } elsif ( $pref eq 'AuthorLinkSortBy' ) {
166
        } elsif ( $pref eq 'AuthorLinkSortBy' ) {
(-)a/t/db_dependent/XSLT.t (-3 / +2 lines)
Lines 201-207 subtest 'buildKohaItemsNamespace status tests' => sub { Link Here
201
    my $library_name = $holdinglibrary->branchname;
201
    my $library_name = $holdinglibrary->branchname;
202
    like( $xml, qr{<resultbranch>${library_name}</resultbranch>}, "Found resultbranch / holding branch" );
202
    like( $xml, qr{<resultbranch>${library_name}</resultbranch>}, "Found resultbranch / holding branch" );
203
203
204
    t::lib::Mocks::mock_preference( 'UseRecalls', 1 );
204
    t::lib::Mocks::mock_preference( 'UseRecalls', 'opac' );
205
    my $recall = $builder->build_object(
205
    my $recall = $builder->build_object(
206
        {
206
        {
207
            class => 'Koha::Recalls',
207
            class => 'Koha::Recalls',
Lines 219-225 subtest 'buildKohaItemsNamespace status tests' => sub { Link Here
219
        $xml, qr{<substatus>Recall waiting</substatus>},
219
        $xml, qr{<substatus>Recall waiting</substatus>},
220
        "Waiting status takes precedence over In transit (recalls)"
220
        "Waiting status takes precedence over In transit (recalls)"
221
    );
221
    );
222
    t::lib::Mocks::mock_preference( 'UseRecalls', 0 );
222
    t::lib::Mocks::mock_preference( 'UseRecalls', 'off' );
223
223
224
    $schema->storage->txn_rollback;
224
    $schema->storage->txn_rollback;
225
};
225
};
226
- 

Return to bug 31391