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

(-)a/Koha/Illrequest.pm (+17 lines)
Lines 712-717 sub mark_completed { Link Here
712
    };
712
    };
713
}
713
}
714
714
715
=head2 backend_illview
716
717
View and manage an ILL request
718
719
=cut
720
721
sub backend_illview {
722
    my ( $self, $params ) = @_;
723
724
    my $response = $self->_backend_capability('illview',{
725
            request    => $self,
726
            other      => $params,
727
        });
728
    return $self->expandTemplate($response) if $response;
729
    return $response;
730
}
731
715
=head2 backend_migrate
732
=head2 backend_migrate
716
733
717
Migrate a request from one backend to another.
734
Migrate a request from one backend to another.
(-)a/ill/ill-requests.pl (+6 lines)
Lines 97-102 if ( $backends_available ) { Link Here
97
                ( tran_success => $params->{tran_success} ) : () ),
97
                ( tran_success => $params->{tran_success} ) : () ),
98
        );
98
        );
99
99
100
        my $backend_result = $request->backend_illview($params);
101
        $template->param(
102
            whole      => $backend_result,
103
        ) if $backend_result;
104
105
100
    } elsif ( $op eq 'create' ) {
106
    } elsif ( $op eq 'create' ) {
101
        # We're in the process of creating a request
107
        # We're in the process of creating a request
102
        my $request = Koha::Illrequest->new->load_backend( $params->{backend} );
108
        my $request = Koha::Illrequest->new->load_backend( $params->{backend} );
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt (+1 lines)
Lines 484-489 Link Here
484
                    </div>
484
                    </div>
485
485
486
                [% ELSIF query_type == 'illview' %]
486
                [% ELSIF query_type == 'illview' %]
487
                    [% PROCESS $whole.template %]
487
                    [% req_status = request.status %]
488
                    [% req_status = request.status %]
488
489
489
                    [% IF error %]
490
                    [% IF error %]
(-)a/t/db_dependent/Illrequests.t (-2 / +6 lines)
Lines 636-642 subtest 'Backend testing (mocks)' => sub { Link Here
636
636
637
subtest 'Backend core methods' => sub {
637
subtest 'Backend core methods' => sub {
638
638
639
    plan tests => 18;
639
    plan tests => 19;
640
640
641
    $schema->storage->txn_begin;
641
    $schema->storage->txn_begin;
642
642
Lines 774-779 subtest 'Backend core methods' => sub { Link Here
774
              },
774
              },
775
              "Backend cancel: arbitrary stage.");
775
              "Backend cancel: arbitrary stage.");
776
776
777
    # backend_illview
778
    $backend->set_series('illview', { stage => '', method => 'illview' });
779
    is_deeply($illrq->backend_illview({test => 1}), 0,
780
              "Backend illview optional method.");
781
777
    # backend_update_status
782
    # backend_update_status
778
    $backend->set_series('update_status', { stage => 'bar', method => 'update_status' });
783
    $backend->set_series('update_status', { stage => 'bar', method => 'update_status' });
779
    is_deeply($illrq->backend_update_status({test => 1}),
784
    is_deeply($illrq->backend_update_status({test => 1}),
780
- 

Return to bug 28909