[vhffs-dev] [1855] Removed template related funcs from Panel::Main

[ Thread Index | Date Index | More vhffs.org/vhffs-dev Archives ]


Revision: 1855
Author:   beuss
Date:     2011-06-03 00:05:31 +0200 (Fri, 03 Jun 2011)
Log Message:
-----------
Removed template related funcs from Panel::Main

Modified Paths:
--------------
    trunk/vhffs-api/src/Vhffs/Panel/Main.pm

Modified: trunk/vhffs-api/src/Vhffs/Panel/Main.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Panel/Main.pm	2011-06-02 22:05:23 UTC (rev 1854)
+++ trunk/vhffs-api/src/Vhffs/Panel/Main.pm	2011-06-02 22:05:31 UTC (rev 1855)
@@ -52,7 +52,6 @@
 sub check_public {
     my $self = shift;
     my $vhffs = $self->{vhffs};
-    my $templatedir = $vhffs->get_config->get_templatedir;
     if( $vhffs->get_config->get_panel->{'use_public'} ne 'yes' ) {
         $self->render('misc/closed.tt', undef);
         exit( 0 );
@@ -287,9 +286,6 @@
 	$theme = 'vhffs' unless( defined $theme  &&  -f $config->get_panel->{'themesdir'}.'/'.$theme.'/main.css' );
 	$self->{theme} = 'vhffs';
 
-	my $template = new HTML::Template( filename => $templatedir.'/panel/main/main.tmpl' );
-	$self->{template} = $template;
-
 	unless( $vhffs->is_valid() and $vhffs->get_config->get_panel->{'open'} eq 'yes' )
 	{
         $self->render('misc/closed.tt', undef, 'anonymous.tt');
@@ -392,60 +388,6 @@
     $panel->{infos} = [];
 }
 
-sub set_refresh_url
-{
-	my ( $panel , $url , $time ) = @_;
-
-	if( defined $url )  {
-		my $template = $panel->{template};
-		$template->param( REFRESH_URL => $url );
-		$template->param( REFRESH_TIME => $time || 3 );
-	}
-	return;
-}
-
-
-=head2 $panel->display
-
-B<DEPRECATED> Render HTML::Template based template.
-
-Please use $panel->render() which uses new Template::Toolkit rendering.
-
-=cut
-
-sub display
-{
-	my $panel = shift;
-	my $template = $panel->{'template'};
-	my $cgi = $panel->{cgi};
-	my $theme = $panel->{theme};
-	my $config = $panel->{config};
-
-	$template->param( TITLE => sprintf( gettext( '%s\'s Panel' ), $config->get_host_name ) );
-	$template->param( THEME => $theme );
-
-	# Allow each theme to have its own Jscripts
-	my $jsglob = File::Spec->catfile($config->get_panel->{'themesdir'}, $theme, '/js/*.js');
-	my $jswebpath = '/themes/'.$theme.'/js/';
-	my @jscripts;
-	# Common scripts
-	push @jscripts, {SCRIPT => '/js/prototype.js'};
-	push @jscripts, {SCRIPT => '/js/commons.js'};
-	push @jscripts, {SCRIPT => '/js/tooltip.js'};
-	while( glob($jsglob) ) {
-		use File::Basename;
-		push @jscripts, {SCRIPT => $jswebpath.basename( $_ )};
-	}
-	$template->param( JSCRIPTS => \@jscripts );
-
-	$template->param( CONTENT => $panel->{content} );
-
-	binmode STDOUT , ':utf8';
-	print CGI->header( -cookie=>[ @{$panel->{cookies}} ], -type=>'text/html', -charset=>'utf-8' );
-	print $template->output;
-	return;
-}
-
 =head2 $panel->render($file, $vars, $layout)
 
 Renders given template with substitution variables C<$vars>.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/