Lines 196-201
sub add_form {
Link Here
|
196 |
); |
196 |
); |
197 |
my $first_flag_name = 1; |
197 |
my $first_flag_name = 1; |
198 |
my $lang; |
198 |
my $lang; |
|
|
199 |
|
200 |
# Get available includes |
201 |
my $htdocs = C4::Context->config('intrahtdocs'); |
202 |
my ($theme, $availablethemes); |
203 |
($theme, $lang, $availablethemes)= C4::Templates::availablethemes( $htdocs, 'about.tt', 'intranet', $lang); |
204 |
my @includes; |
205 |
foreach (@$availablethemes) { |
206 |
push @includes, "$htdocs/$_/$lang/includes"; |
207 |
push @includes, "$htdocs/$_/en/includes" unless $lang eq 'en'; |
208 |
} |
209 |
|
199 |
# The letter name is contained into each mtt row. |
210 |
# The letter name is contained into each mtt row. |
200 |
# So we can only sent the first one to the template. |
211 |
# So we can only sent the first one to the template. |
201 |
my $tt = Template->new( |
212 |
my $tt = Template->new( |
Lines 203-208
sub add_form {
Link Here
|
203 |
EVAL_PERL => 1, |
214 |
EVAL_PERL => 1, |
204 |
ABSOLUTE => 1, |
215 |
ABSOLUTE => 1, |
205 |
PLUGIN_BASE => 'Koha::Template::Plugin', |
216 |
PLUGIN_BASE => 'Koha::Template::Plugin', |
|
|
217 |
INCLUDE_PATH => \@includes, |
206 |
FILTERS => {}, |
218 |
FILTERS => {}, |
207 |
ENCODING => 'UTF-8', |
219 |
ENCODING => 'UTF-8', |
208 |
} |
220 |
} |
Lines 219-224
sub add_form {
Link Here
|
219 |
|
231 |
|
220 |
my $output; |
232 |
my $output; |
221 |
my $template = $letter->{content}; |
233 |
my $template = $letter->{content}; |
|
|
234 |
$template = qq|[% USE KohaDates %][% USE Remove_MARC_punctuation %][% PROCESS 'html_helpers.inc' %]$template|; |
222 |
unless ( $tt->process( \$template, {}, \$output ) ) { |
235 |
unless ( $tt->process( \$template, {}, \$output ) ) { |
223 |
$letter->{tt_error} = $tt->error(); |
236 |
$letter->{tt_error} = $tt->error(); |
224 |
} |
237 |
} |
225 |
- |
|
|