/[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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 134 by dpavlin, Thu Nov 24 16:30:16 2005 UTC revision 135 by dpavlin, Thu Nov 24 22:29:29 2005 UTC
# Line 35  sub default : Private { Line 35  sub default : Private {
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

Legend:
Removed from v.134  
changed lines
  Added in v.135

  ViewVC Help
Powered by ViewVC 1.1.26