Lines 25-48
use C4::Letters;
Link Here
|
25 |
use Koha::Patrons; |
25 |
use Koha::Patrons; |
26 |
use Koha::Preservation::Train::Items; |
26 |
use Koha::Preservation::Train::Items; |
27 |
|
27 |
|
28 |
my $input = CGI->new; |
28 |
my $input = CGI->new; |
29 |
my $train_item_id = $input->param('train_item_id'); |
29 |
my $train_item_id = $input->param('train_item_id'); |
30 |
|
30 |
|
31 |
my ( $template, $loggedinuser, $cookie ) = get_template_and_user( |
31 |
my ( $template, $loggedinuser, $cookie ) = get_template_and_user( |
32 |
{ |
32 |
{ |
33 |
template_name => "circ/printslip.tt", |
33 |
template_name => "circ/printslip.tt", |
34 |
query => $input, |
34 |
query => $input, |
35 |
type => "intranet", |
35 |
type => "intranet", |
36 |
flagsrequired => { preservation => '*' }, |
36 |
flagsrequired => { preservation => '*' }, |
37 |
} |
37 |
} |
38 |
); |
38 |
); |
39 |
|
39 |
|
40 |
my $logged_in_user = Koha::Patrons->find($loggedinuser); |
40 |
my $logged_in_user = Koha::Patrons->find($loggedinuser); |
41 |
my $branch = C4::Context->userenv->{'branch'}; |
41 |
my $branch = C4::Context->userenv->{'branch'}; |
42 |
|
42 |
|
43 |
my $train_item = Koha::Preservation::Train::Items->find($train_item_id); |
43 |
my $train_item = Koha::Preservation::Train::Items->find($train_item_id); |
44 |
|
44 |
|
45 |
unless ($train_item){ |
45 |
unless ($train_item) { |
46 |
print $input->redirect("/cgi-bin/koha/errors/404.pl"); |
46 |
print $input->redirect("/cgi-bin/koha/errors/404.pl"); |
47 |
exit; |
47 |
exit; |
48 |
} |
48 |
} |
Lines 64-75
my $slip = $letter->{content};
Link Here
|
64 |
my $is_html = $letter->{is_html}; |
64 |
my $is_html = $letter->{is_html}; |
65 |
|
65 |
|
66 |
$template->param( |
66 |
$template->param( |
67 |
slip => $slip, |
67 |
slip => $slip, |
68 |
plain => !$is_html, |
68 |
plain => !$is_html, |
69 |
caller => 'preservation', |
69 |
caller => 'preservation', |
70 |
stylesheet => C4::Context->preference("SlipCSS"), |
70 |
stylesheet => C4::Context->preference("SlipCSS"), |
71 |
); |
71 |
); |
72 |
|
72 |
|
73 |
$template->param( IntranetSlipPrinterJS => C4::Context->preference('IntranetSlipPrinterJS' ) ); |
73 |
$template->param( IntranetSlipPrinterJS => C4::Context->preference('IntranetSlipPrinterJS') ); |
74 |
|
74 |
|
75 |
output_html_with_http_headers $input, $cookie, $template->output; |
75 |
output_html_with_http_headers $input, $cookie, $template->output; |