/[webpac2]/Webpacus/lib/Webpacus/Controller/Editor.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /Webpacus/lib/Webpacus/Controller/Editor.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 135 - (show annotations)
Thu Nov 24 22:29:29 2005 UTC (18 years, 5 months ago) by dpavlin
File size: 1413 byte(s)
 r9109@llin:  dpavlin | 2005-11-24 18:47:17 +0100
 more work on editor. textareas now load content

1 package Webpacus::Controller::Editor;
2
3 use strict;
4 use warnings;
5 use base 'Catalyst::Controller';
6
7 =head1 NAME
8
9 Webpacus::Controller::Editor - Catalyst Controller
10
11 =head1 SYNOPSIS
12
13 See L<Webpacus>
14
15 =head1 DESCRIPTION
16
17 Catalyst Controller.
18
19 =head1 METHODS
20
21 =over 4
22
23 =item default
24
25 =cut
26
27 sub default : Private {
28 my ( $self, $c ) = @_;
29
30 my $webpac = $c->comp('Model::WebPAC');
31 my $params = $c->req->params;
32 my $log = $c->log;
33
34 $c->stash->{template} = 'editor.tt';
35 }
36
37 sub template : Local {
38 my ( $self, $c ) = @_;
39
40 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 {
53 my ( $self, $c ) = @_;
54
55 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
63
64
65 =head1 AUTHOR
66
67 Dobrica Pavlinusic,,,
68
69 =head1 LICENSE
70
71 This library is free software, you can redistribute it and/or modify
72 it under the same terms as Perl itself.
73
74 =cut
75
76 1;

  ViewVC Help
Powered by ViewVC 1.1.26