|
Lines 66-79
my ( $template, $patronnumber, $cookie ) = get_template_and_user(
Link Here
|
| 66 |
); |
66 |
); |
| 67 |
|
67 |
|
| 68 |
# Are we able to actually work? |
68 |
# Are we able to actually work? |
| 69 |
my $cfg = Koha::ILL::Request::Config->new; |
69 |
my $cfg = Koha::ILL::Request::Config->new; |
| 70 |
my $backends = $cfg->available_backends; |
70 |
my $backends = $cfg->available_backends; |
| 71 |
my $has_branch = $cfg->has_branch; |
71 |
my $has_branch = $cfg->has_branch; |
| 72 |
my $backends_available = ( scalar @{$backends} > 0 ); |
72 |
my $backends_available = ( scalar @{$backends} > 0 ); |
|
|
73 |
my $have_batch_backends = have_batch_backends($backends); |
| 73 |
$template->param( |
74 |
$template->param( |
| 74 |
backends_available => $backends_available, |
75 |
backends_available => $backends_available, |
| 75 |
has_branch => $has_branch, |
76 |
has_branch => $has_branch, |
| 76 |
have_batch => have_batch_backends($backends) |
77 |
have_batch => $have_batch_backends |
| 77 |
); |
78 |
); |
| 78 |
|
79 |
|
| 79 |
if ( grep( /FreeForm/, @{$backends} ) ) { |
80 |
if ( grep( /FreeForm/, @{$backends} ) ) { |
|
Lines 97-102
if ($backends_available) {
Link Here
|
| 97 |
$template->param( batch_availability_services => encode_json($batch_availability_services) ); |
98 |
$template->param( batch_availability_services => encode_json($batch_availability_services) ); |
| 98 |
} |
99 |
} |
| 99 |
|
100 |
|
|
|
101 |
# Establish what backends are up for batch autoILL, if enabled |
| 102 |
my $confirm_auto = Koha::ILL::Request::Workflow::ConfirmAuto->new( $params, 'staff' ); |
| 103 |
my @auto_backends = $confirm_auto->get_priority_backends('staff'); |
| 104 |
if ( scalar @auto_backends > 0 && scalar @$have_batch_backends > 0 ) { |
| 105 |
my @have_batch_auto_backends = grep { |
| 106 |
my $a = $_; |
| 107 |
grep { $_ eq $a->{name} } @$have_batch_backends |
| 108 |
} @auto_backends; |
| 109 |
$template->param( have_batch_auto_backends_json => scalar encode_json( \@have_batch_auto_backends ) ); |
| 110 |
} |
| 111 |
|
| 100 |
if ( $op eq 'illview' ) { |
112 |
if ( $op eq 'illview' ) { |
| 101 |
|
113 |
|
| 102 |
# View the details of an ILL |
114 |
# View the details of an ILL |
|
Lines 137-143
if ($backends_available) {
Link Here
|
| 137 |
my $history_check = Koha::ILL::Request::Workflow::HistoryCheck->new( $params, 'staff' ); |
149 |
my $history_check = Koha::ILL::Request::Workflow::HistoryCheck->new( $params, 'staff' ); |
| 138 |
my $availability = Koha::ILL::Request::Workflow::Availability->new( $params, 'staff' ); |
150 |
my $availability = Koha::ILL::Request::Workflow::Availability->new( $params, 'staff' ); |
| 139 |
my $type_disclaimer = Koha::ILL::Request::Workflow::TypeDisclaimer->new( $params, 'staff' ); |
151 |
my $type_disclaimer = Koha::ILL::Request::Workflow::TypeDisclaimer->new( $params, 'staff' ); |
| 140 |
my $confirm_auto = Koha::ILL::Request::Workflow::ConfirmAuto->new( $params, 'staff' ); |
|
|
| 141 |
|
152 |
|
| 142 |
# ILLHistoryCheck operation |
153 |
# ILLHistoryCheck operation |
| 143 |
if ( $history_check->show_history_check($request) ) { |
154 |
if ( $history_check->show_history_check($request) ) { |