35 |
} |
} |
36 |
|
|
37 |
sub template : Local { |
sub template : Local { |
38 |
my ( $self, $c ) = @_; |
my ( $self, $c ) = @_; |
39 |
|
|
40 |
$c->stash->{template} = 'editor/template.tt'; |
my $template_file = $c->config->{webpac}->{default_template} || die("need default_template"); |
41 |
|
|
42 |
|
my $webpac = $c->comp('Model::WebPAC'); |
43 |
|
|
44 |
|
my $template_full_path = $webpac->{template_path} . "/$template_file"; |
45 |
|
|
46 |
|
$c->stash->{'template_content'} = |
47 |
|
$webpac->load_html( $template_full_path ); |
48 |
|
|
49 |
|
$c->stash->{template} = 'editor/template.tt'; |
50 |
} |
} |
51 |
|
|
52 |
sub css : Local { |
sub css : Local { |
53 |
my ( $self, $c ) = @_; |
my ( $self, $c ) = @_; |
54 |
|
|
55 |
$c->stash->{template} = 'editor/css.tt'; |
my $css_file = $c->config->{webpac}->{default_css} || die("need default_css"); |
56 |
|
my $css_path = $c->config->{webpac}->{css_path} || die("need css_path"); |
57 |
|
my $webpac = $c->comp('Model::WebPAC'); |
58 |
|
$c->stash->{'css_content'} = $webpac->load_html( "$css_path/$css_file" ); |
59 |
|
$c->stash->{template} = 'editor/css.tt'; |
60 |
} |
} |
61 |
|
|
62 |
=back |
=back |