[vhffs-dev] [1813] No more HTML::Template in services search. |
[ Thread Index |
Date Index
| More vhffs.org/vhffs-dev Archives
]
Revision: 1813
Author: beuss
Date: 2011-05-25 13:19:02 +0200 (Wed, 25 May 2011)
Log Message:
-----------
No more HTML::Template in services search.
Modified Paths:
--------------
trunk/vhffs-panel/admin/bazaar/search.pl
trunk/vhffs-panel/admin/cron/search.pl
trunk/vhffs-panel/admin/cvs/search.pl
trunk/vhffs-panel/admin/dns/search.pl
trunk/vhffs-panel/admin/git/search.pl
trunk/vhffs-panel/admin/mail/search.pl
trunk/vhffs-panel/admin/mailinglist/search.pl
trunk/vhffs-panel/admin/mercurial/search.pl
trunk/vhffs-panel/admin/mysql/search.pl
trunk/vhffs-panel/admin/pgsql/search.pl
trunk/vhffs-panel/admin/repository/search.pl
trunk/vhffs-panel/admin/svn/search.pl
trunk/vhffs-panel/admin/web/search.pl
trunk/vhffs-panel/templates/Makefile.am
Added Paths:
-----------
trunk/vhffs-panel/templates/admin/misc/search.tt
Removed Paths:
-------------
trunk/vhffs-panel/templates/admin/bazaar/search.tmpl
trunk/vhffs-panel/templates/admin/cron/search.tmpl
trunk/vhffs-panel/templates/admin/cvs/search.tmpl
trunk/vhffs-panel/templates/admin/dns/search.tmpl
trunk/vhffs-panel/templates/admin/git/search.tmpl
trunk/vhffs-panel/templates/admin/mail/search.tmpl
trunk/vhffs-panel/templates/admin/mailinglist/search.tmpl
trunk/vhffs-panel/templates/admin/mercurial/search.tmpl
trunk/vhffs-panel/templates/admin/mysql/search.tmpl
trunk/vhffs-panel/templates/admin/pgsql/search.tmpl
trunk/vhffs-panel/templates/admin/repository/search.tmpl
trunk/vhffs-panel/templates/admin/svn/search.tmpl
trunk/vhffs-panel/templates/admin/web/search.tmpl
Modified: trunk/vhffs-panel/admin/bazaar/search.pl
===================================================================
--- trunk/vhffs-panel/admin/bazaar/search.pl 2011-05-25 11:18:52 UTC (rev 1812)
+++ trunk/vhffs-panel/admin/bazaar/search.pl 2011-05-25 11:19:02 UTC (rev 1813)
@@ -32,7 +32,6 @@
use utf8;
use POSIX qw(locale_h);
-use HTML::Template;
use locale;
use Locale::gettext;
use CGI;
@@ -41,44 +40,10 @@
use lib '%VHFFS_LIB_DIR%';
-use Vhffs::User;
-use Vhffs::Group;
-use Vhffs::Main;
-use Vhffs::Panel::Main;
-use Vhffs::Panel::Menu;
-use Vhffs::Stats;
-use Vhffs::Constants;
+use Vhffs::Panel::Admin;
-my $panel = new Vhffs::Panel::Main();
-exit 0 unless $panel;
-my $session = $panel->get_session;
-exit 0 unless $session;
+my $panel = new Vhffs::Panel::Admin();
-my $vhffs = $panel->{'vhffs'};
-my $maintemplate = $panel->{'template'};
-my $user = $panel->{'user'};
-my $cgi = $panel->{'cgi'};
-my $servername = $cgi->param("name");
-my $template;
-
-
-my $templatesdir = $vhffs->get_config->get_templatedir;
-
-if( ($user->is_moderator != 1 ) && ( $user->is_admin != 1 ) )
-{
-
- $template = new HTML::Template( filename => $templatesdir."/panel/misc/simplemsg.tmpl" );
- my $message = gettext( "You are not allowed to see it");
- $template->param( MESSAGE => $message );
-}
-else
-{
- $template = new HTML::Template( filename => $templatesdir."/panel/admin/bazaar/search.tmpl" );
-
- $template->param( TITLE => gettext("Search for a Bazaar repository") );
-
-}
-
-$panel->build( $template );
-$panel->display;
-
+$panel->render('admin/misc/search.tt', {
+ search_title => gettext('Bazaar repository search')
+});
Modified: trunk/vhffs-panel/admin/cron/search.pl
===================================================================
--- trunk/vhffs-panel/admin/cron/search.pl 2011-05-25 11:18:52 UTC (rev 1812)
+++ trunk/vhffs-panel/admin/cron/search.pl 2011-05-25 11:19:02 UTC (rev 1813)
@@ -32,7 +32,6 @@
use utf8;
use POSIX qw(locale_h);
-use HTML::Template;
use locale;
use Locale::gettext;
use CGI;
@@ -41,43 +40,10 @@
use lib '%VHFFS_LIB_DIR%';
-use Vhffs::User;
-use Vhffs::Group;
-use Vhffs::Main;
-use Vhffs::Panel::Main;
-use Vhffs::Panel::Menu;
-use Vhffs::Stats;
-use Vhffs::Constants;
+use Vhffs::Panel::Admin;
-my $panel = new Vhffs::Panel::Main();
-exit 0 unless $panel;
-my $session = $panel->get_session;
-exit 0 unless $session;
+my $panel = new Vhffs::Panel::Admin();
-my $vhffs = $panel->{'vhffs'};
-my $maintemplate = $panel->{'template'};
-my $user = $panel->{'user'};
-my $cgi = $panel->{'cgi'};
-my $servername = $cgi->param("name");
-my $template;
-
-my $templatedir = $vhffs->get_config->get_templatedir;
-
-if( ($user->is_moderator != 1 ) && ( $user->is_admin != 1 ) )
-{
-
- $template = new HTML::Template( filename => $templatedir."/panel/misc/simplemsg.tmpl" );
- my $message = gettext( "You are not allowed to see it");
- $template->param( MESSAGE => $message );
-}
-else
-{
- $template = new HTML::Template( filename => $templatedir."/panel/admin/cron/search.tmpl" );
-
- $template->param( TITLE => gettext("Search for a cron job") );
-
-}
-
-$panel->build( $template );
-$panel->display;
-
+$panel->render('admin/misc/search.tt', {
+ search_title => gettext('Cron job search')
+});
Modified: trunk/vhffs-panel/admin/cvs/search.pl
===================================================================
--- trunk/vhffs-panel/admin/cvs/search.pl 2011-05-25 11:18:52 UTC (rev 1812)
+++ trunk/vhffs-panel/admin/cvs/search.pl 2011-05-25 11:19:02 UTC (rev 1813)
@@ -32,7 +32,6 @@
use utf8;
use POSIX qw(locale_h);
-use HTML::Template;
use locale;
use Locale::gettext;
use CGI;
@@ -41,42 +40,10 @@
use lib '%VHFFS_LIB_DIR%';
-use Vhffs::User;
-use Vhffs::Group;
-use Vhffs::Main;
-use Vhffs::Panel::Main;
-use Vhffs::Panel::Menu;
-use Vhffs::Stats;
-use Vhffs::Constants;
+use Vhffs::Panel::Admin;
-my $panel = new Vhffs::Panel::Main();
-exit 0 unless $panel;
-my $session = $panel->get_session;
-exit 0 unless $session;
+my $panel = new Vhffs::Panel::Admin();
-my $vhffs = $panel->{'vhffs'};
-my $maintemplate = $panel->{'template'};
-my $user = $panel->{'user'};
-my $cgi = $panel->{'cgi'};
-my $servername = $cgi->param("name");
-my $template;
-my $templatesdir = $vhffs->get_config->get_templatedir;
-
-if( ($user->is_moderator != 1 ) && ( $user->is_admin != 1 ) )
-{
-
- $template = new HTML::Template( filename => $templatesdir."/panel/misc/simplemsg.tmpl" );
- my $message = gettext( "You are not allowed to see it");
- $template->param( MESSAGE => $message );
-}
-else
-{
- $template = new HTML::Template( filename => $templatesdir."/panel/admin/web/search.tmpl" );
-
- $template->param( TITLE => gettext("Search for a CVS repository") );
-
-}
-
-$panel->build( $template );
-$panel->display;
-
+$panel->render('admin/misc/search.tt', {
+ search_title => gettext('CVS repository search')
+});
Modified: trunk/vhffs-panel/admin/dns/search.pl
===================================================================
--- trunk/vhffs-panel/admin/dns/search.pl 2011-05-25 11:18:52 UTC (rev 1812)
+++ trunk/vhffs-panel/admin/dns/search.pl 2011-05-25 11:19:02 UTC (rev 1813)
@@ -32,7 +32,6 @@
use utf8;
use POSIX qw(locale_h);
-use HTML::Template;
use locale;
use Locale::gettext;
use CGI;
@@ -41,42 +40,10 @@
use lib '%VHFFS_LIB_DIR%';
-use Vhffs::User;
-use Vhffs::Group;
-use Vhffs::Main;
-use Vhffs::Panel::Main;
-use Vhffs::Panel::Menu;
-use Vhffs::Stats;
-use Vhffs::Constants;
+use Vhffs::Panel::Admin;
-my $panel = new Vhffs::Panel::Main();
-exit 0 unless $panel;
-my $session = $panel->get_session;
-exit 0 unless $session;
+my $panel = new Vhffs::Panel::Admin();
-my $vhffs = $panel->{'vhffs'};
-my $maintemplate = $panel->{'template'};
-my $user = $panel->{'user'};
-my $cgi = $panel->{'cgi'};
-my $servername = $cgi->param("name");
-my $template;
-
-my $templatedir = $vhffs->get_config->get_templatedir;
-
-if( ($user->is_moderator != 1 ) && ( $user->is_admin != 1 ) )
-{
-
- $template = new HTML::Template( filename => $templatedir."/panel/misc/simplemsg.tmpl" );
- my $message = gettext( "You are not allowed to see it");
- $template->param( MESSAGE => $message );
-}
-else
-{
- $template = new HTML::Template( filename => $templatedir."/panel/admin/web/search.tmpl" );
-
- $template->param( TITLE => gettext("Search for a domain name") );
-
-}
-
-$panel->build( $template );
-$panel->display;
+$panel->render('admin/misc/search.tt', {
+ search_title => gettext('DNS search')
+});
Modified: trunk/vhffs-panel/admin/git/search.pl
===================================================================
--- trunk/vhffs-panel/admin/git/search.pl 2011-05-25 11:18:52 UTC (rev 1812)
+++ trunk/vhffs-panel/admin/git/search.pl 2011-05-25 11:19:02 UTC (rev 1813)
@@ -32,7 +32,6 @@
use utf8;
use POSIX qw(locale_h);
-use HTML::Template;
use locale;
use Locale::gettext;
use CGI;
@@ -41,44 +40,10 @@
use lib '%VHFFS_LIB_DIR%';
-use Vhffs::User;
-use Vhffs::Group;
-use Vhffs::Main;
-use Vhffs::Panel::Main;
-use Vhffs::Panel::Menu;
-use Vhffs::Stats;
-use Vhffs::Constants;
+use Vhffs::Panel::Admin;
-my $panel = new Vhffs::Panel::Main();
-exit 0 unless $panel;
-my $session = $panel->get_session;
-exit 0 unless $session;
+my $panel = new Vhffs::Panel::Admin();
-my $vhffs = $panel->{'vhffs'};
-my $maintemplate = $panel->{'template'};
-my $user = $panel->{'user'};
-my $cgi = $panel->{'cgi'};
-my $servername = $cgi->param("name");
-my $template;
-
-
-my $templatesdir = $vhffs->get_config->get_templatedir;
-
-if( ($user->is_moderator != 1 ) && ( $user->is_admin != 1 ) )
-{
-
- $template = new HTML::Template( filename => $templatesdir."/panel/misc/simplemsg.tmpl" );
- my $message = gettext( "You are not allowed to see it");
- $template->param( MESSAGE => $message );
-}
-else
-{
- $template = new HTML::Template( filename => $templatesdir."/panel/admin/git/search.tmpl" );
-
- $template->param( TITLE => gettext("Search for a GIT repository") );
-
-}
-
-$panel->build( $template );
-$panel->display;
-
+$panel->render('admin/misc/search.tt', {
+ search_title => gettext('Git repository search')
+});
Modified: trunk/vhffs-panel/admin/mail/search.pl
===================================================================
--- trunk/vhffs-panel/admin/mail/search.pl 2011-05-25 11:18:52 UTC (rev 1812)
+++ trunk/vhffs-panel/admin/mail/search.pl 2011-05-25 11:19:02 UTC (rev 1813)
@@ -32,7 +32,6 @@
use utf8;
use POSIX qw(locale_h);
-use HTML::Template;
use locale;
use Locale::gettext;
use CGI;
@@ -41,43 +40,10 @@
use lib '%VHFFS_LIB_DIR%';
-use Vhffs::User;
-use Vhffs::Group;
-use Vhffs::Main;
-use Vhffs::Panel::Main;
-use Vhffs::Panel::Menu;
-use Vhffs::Stats;
-use Vhffs::Constants;
+use Vhffs::Panel::Admin;
-my $panel = new Vhffs::Panel::Main();
-exit 0 unless $panel;
-my $session = $panel->get_session;
-exit 0 unless $session;
+my $panel = new Vhffs::Panel::Admin();
-my $vhffs = $panel->{'vhffs'};
-my $maintemplate = $panel->{'template'};
-my $user = $panel->{'user'};
-my $cgi = $panel->{'cgi'};
-my $servername = $cgi->param("name");
-my $template;
-
-my $templatedir = $vhffs->get_config->get_templatedir;
-
-if( ($user->is_moderator != 1 ) && ( $user->is_admin != 1 ) )
-{
-
- $template = new HTML::Template( filename => $templatedir."/panel/misc/simplemsg.tmpl" );
- my $message = gettext( "You are not allowed to see it");
- $template->param( MESSAGE => $message );
-}
-else
-{
- $template = new HTML::Template( filename => $templatedir."/panel/admin/mail/search.tmpl" );
-
- $template->param( TITLE => gettext("Search for a mail domain") );
-
-}
-
-
-$panel->build( $template );
-$panel->display;
+$panel->render('admin/misc/search.tt', {
+ search_title => gettext('Mail domain search')
+});
Modified: trunk/vhffs-panel/admin/mailinglist/search.pl
===================================================================
--- trunk/vhffs-panel/admin/mailinglist/search.pl 2011-05-25 11:18:52 UTC (rev 1812)
+++ trunk/vhffs-panel/admin/mailinglist/search.pl 2011-05-25 11:19:02 UTC (rev 1813)
@@ -32,51 +32,18 @@
use utf8;
use POSIX qw(locale_h);
-use HTML::Template;
use locale;
use Locale::gettext;
use CGI;
use CGI::Session;
use strict;
+
use lib '%VHFFS_LIB_DIR%';
-use Vhffs::User;
-use Vhffs::Group;
-use Vhffs::Main;
-use Vhffs::Panel::Main;
-use Vhffs::Panel::Menu;
-use Vhffs::Stats;
-use Vhffs::Constants;
+use Vhffs::Panel::Admin;
-my $panel = new Vhffs::Panel::Main();
-exit 0 unless $panel;
-my $session = $panel->get_session;
-exit 0 unless $session;
+my $panel = new Vhffs::Panel::Admin();
-my $vhffs = $panel->{'vhffs'};
-my $maintemplate = $panel->{'template'};
-my $user = $panel->{'user'};
-my $cgi = $panel->{'cgi'};
-my $servername = $cgi->param("name");
-my $template;
-
-my $templatedir = $vhffs->get_config->get_templatedir;
-
-if( ($user->is_moderator != 1 ) && ( $user->is_admin != 1 ) )
-{
-
- $template = new HTML::Template( filename => $templatedir."/panel/misc/simplemsg.tmpl" );
- my $message = gettext( "You are not allowed to see it");
- $template->param( MESSAGE => $message );
-}
-else
-{
- $template = new HTML::Template( filename => $templatedir."/panel/admin/mailinglist/search.tmpl" );
-
- $template->param( TITLE => gettext("Search for a list") );
-
-}
-
-
-$panel->build( $template );
-$panel->display;
+$panel->render('admin/misc/search.tt', {
+ search_title => gettext('Mailinglist search')
+});
Modified: trunk/vhffs-panel/admin/mercurial/search.pl
===================================================================
--- trunk/vhffs-panel/admin/mercurial/search.pl 2011-05-25 11:18:52 UTC (rev 1812)
+++ trunk/vhffs-panel/admin/mercurial/search.pl 2011-05-25 11:19:02 UTC (rev 1813)
@@ -32,7 +32,6 @@
use utf8;
use POSIX qw(locale_h);
-use HTML::Template;
use locale;
use Locale::gettext;
use CGI;
@@ -41,44 +40,10 @@
use lib '%VHFFS_LIB_DIR%';
-use Vhffs::User;
-use Vhffs::Group;
-use Vhffs::Main;
-use Vhffs::Panel::Main;
-use Vhffs::Panel::Menu;
-use Vhffs::Stats;
-use Vhffs::Constants;
+use Vhffs::Panel::Admin;
-my $panel = new Vhffs::Panel::Main();
-exit 0 unless $panel;
-my $session = $panel->get_session;
-exit 0 unless $session;
+my $panel = new Vhffs::Panel::Admin();
-my $vhffs = $panel->{'vhffs'};
-my $maintemplate = $panel->{'template'};
-my $user = $panel->{'user'};
-my $cgi = $panel->{'cgi'};
-my $servername = $cgi->param("name");
-my $template;
-
-
-my $templatesdir = $vhffs->get_config->get_templatedir;
-
-if( ($user->is_moderator != 1 ) && ( $user->is_admin != 1 ) )
-{
-
- $template = new HTML::Template( filename => $templatesdir."/panel/misc/simplemsg.tmpl" );
- my $message = gettext( "You are not allowed to see it");
- $template->param( MESSAGE => $message );
-}
-else
-{
- $template = new HTML::Template( filename => $templatesdir."/panel/admin/mercurial/search.tmpl" );
-
- $template->param( TITLE => gettext("Search for a Mercurial repository") );
-
-}
-
-$panel->build( $template );
-$panel->display;
-
+$panel->render('admin/misc/search.tt', {
+ search_title => gettext('Mercurial repository search')
+});
Modified: trunk/vhffs-panel/admin/mysql/search.pl
===================================================================
--- trunk/vhffs-panel/admin/mysql/search.pl 2011-05-25 11:18:52 UTC (rev 1812)
+++ trunk/vhffs-panel/admin/mysql/search.pl 2011-05-25 11:19:02 UTC (rev 1813)
@@ -32,7 +32,6 @@
use utf8;
use POSIX qw(locale_h);
-use HTML::Template;
use locale;
use Locale::gettext;
use CGI;
@@ -41,43 +40,10 @@
use lib '%VHFFS_LIB_DIR%';
-use Vhffs::User;
-use Vhffs::Group;
-use Vhffs::Main;
-use Vhffs::Panel::Main;
-use Vhffs::Panel::Menu;
-use Vhffs::Stats;
-use Vhffs::Constants;
+use Vhffs::Panel::Admin;
-my $panel = new Vhffs::Panel::Main();
-exit 0 unless $panel;
-my $session = $panel->get_session;
-exit 0 unless $session;
+my $panel = new Vhffs::Panel::Admin();
-my $vhffs = $panel->{'vhffs'};
-my $maintemplate = $panel->{'template'};
-my $user = $panel->{'user'};
-my $cgi = $panel->{'cgi'};
-my $servername = $cgi->param("name");
-my $template;
-
-my $templatedir = $vhffs->get_config->get_templatedir;
-
-if( ($user->is_moderator != 1 ) && ( $user->is_admin != 1 ) )
-{
-
- $template = new HTML::Template( filename => $templatedir."/panel/misc/simplemsg.tmpl" );
- my $message = gettext( "You are not allowed to see it");
- $template->param( MESSAGE => $message );
-}
-else
-{
- $template = new HTML::Template( filename => $templatedir."/panel/admin/web/search.tmpl" );
-
- $template->param( TITLE => gettext("Search for a database") );
-
-}
-
-$panel->build( $template );
-$panel->display;
-
+$panel->render('admin/misc/search.tt', {
+ search_title => gettext('MySQL database search')
+});
Modified: trunk/vhffs-panel/admin/pgsql/search.pl
===================================================================
--- trunk/vhffs-panel/admin/pgsql/search.pl 2011-05-25 11:18:52 UTC (rev 1812)
+++ trunk/vhffs-panel/admin/pgsql/search.pl 2011-05-25 11:19:02 UTC (rev 1813)
@@ -32,7 +32,6 @@
use utf8;
use POSIX qw(locale_h);
-use HTML::Template;
use locale;
use Locale::gettext;
use CGI;
@@ -41,42 +40,10 @@
use lib '%VHFFS_LIB_DIR%';
-use Vhffs::User;
-use Vhffs::Group;
-use Vhffs::Main;
-use Vhffs::Panel::Main;
-use Vhffs::Panel::Menu;
-use Vhffs::Stats;
-use Vhffs::Constants;
+use Vhffs::Panel::Admin;
-my $panel = new Vhffs::Panel::Main();
-exit 0 unless $panel;
-my $session = $panel->get_session;
-exit 0 unless $session;
+my $panel = new Vhffs::Panel::Admin();
-my $vhffs = $panel->{'vhffs'};
-my $maintemplate = $panel->{'template'};
-my $user = $panel->{'user'};
-my $cgi = $panel->{'cgi'};
-my $servername = $cgi->param("name");
-my $template;
-
-my $templatedir = $vhffs->get_config->get_templatedir;
-
-if( ($user->is_moderator != 1 ) && ( $user->is_admin != 1 ) )
-{
-
- $template = new HTML::Template( filename => $templatedir."/panel/misc/simplemsg.tmpl" );
- my $message = gettext( "You are not allowed to see it");
- $template->param( MESSAGE => $message );
-}
-else
-{
- $template = new HTML::Template( filename => $templatedir."/panel/admin/web/search.tmpl" );
-
- $template->param( TITLE => gettext("Search for a database") );
-
-}
-
-$panel->build( $template );
-$panel->display;
+$panel->render('admin/misc/search.tt', {
+ search_title => gettext('PostgreSQL database search')
+});
Modified: trunk/vhffs-panel/admin/repository/search.pl
===================================================================
--- trunk/vhffs-panel/admin/repository/search.pl 2011-05-25 11:18:52 UTC (rev 1812)
+++ trunk/vhffs-panel/admin/repository/search.pl 2011-05-25 11:19:02 UTC (rev 1813)
@@ -32,7 +32,6 @@
use utf8;
use POSIX qw(locale_h);
-use HTML::Template;
use locale;
use Locale::gettext;
use CGI;
@@ -41,42 +40,10 @@
use lib '%VHFFS_LIB_DIR%';
-use Vhffs::User;
-use Vhffs::Group;
-use Vhffs::Main;
-use Vhffs::Panel::Main;
-use Vhffs::Panel::Menu;
-use Vhffs::Stats;
-use Vhffs::Constants;
+use Vhffs::Panel::Admin;
-my $panel = new Vhffs::Panel::Main();
-exit 0 unless $panel;
-my $session = $panel->get_session;
-exit 0 unless $session;
+my $panel = new Vhffs::Panel::Admin();
-my $vhffs = $panel->{'vhffs'};
-my $maintemplate = $panel->{'template'};
-my $user = $panel->{'user'};
-my $cgi = $panel->{'cgi'};
-my $servername = $cgi->param("name");
-my $template;
-my $templatesdir = $vhffs->get_config->get_templatedir;
-
-if( ($user->is_moderator != 1 ) && ( $user->is_admin != 1 ) )
-{
-
- $template = new HTML::Template( filename => $templatesdir."/panel/misc/simplemsg.tmpl" );
- my $message = gettext( "You are not allowed to see it");
- $template->param( MESSAGE => $message );
-}
-else
-{
- $template = new HTML::Template( filename => $templatesdir."/panel/admin/repository/search.tmpl" );
-
- $template->param( TITLE => gettext("Search for a Download repository") );
-
-}
-
-$panel->build( $template );
-$panel->display;
-
+$panel->render('admin/misc/search.tt', {
+ search_title => gettext('Download repository search')
+});
Modified: trunk/vhffs-panel/admin/svn/search.pl
===================================================================
--- trunk/vhffs-panel/admin/svn/search.pl 2011-05-25 11:18:52 UTC (rev 1812)
+++ trunk/vhffs-panel/admin/svn/search.pl 2011-05-25 11:19:02 UTC (rev 1813)
@@ -32,7 +32,6 @@
use utf8;
use POSIX qw(locale_h);
-use HTML::Template;
use locale;
use Locale::gettext;
use CGI;
@@ -41,44 +40,10 @@
use lib '%VHFFS_LIB_DIR%';
-use Vhffs::User;
-use Vhffs::Group;
-use Vhffs::Main;
-use Vhffs::Panel::Main;
-use Vhffs::Panel::Menu;
-use Vhffs::Stats;
-use Vhffs::Constants;
+use Vhffs::Panel::Admin;
-my $panel = new Vhffs::Panel::Main();
-exit 0 unless $panel;
-my $session = $panel->get_session;
-exit 0 unless $session;
+my $panel = new Vhffs::Panel::Admin();
-my $vhffs = $panel->{'vhffs'};
-my $maintemplate = $panel->{'template'};
-my $user = $panel->{'user'};
-my $cgi = $panel->{'cgi'};
-my $servername = $cgi->param("name");
-my $template;
-
-
-my $templatesdir = $vhffs->get_config->get_templatedir;
-
-if( ($user->is_moderator != 1 ) && ( $user->is_admin != 1 ) )
-{
-
- $template = new HTML::Template( filename => $templatesdir."/panel/misc/simplemsg.tmpl" );
- my $message = gettext( "You are not allowed to see it");
- $template->param( MESSAGE => $message );
-}
-else
-{
- $template = new HTML::Template( filename => $templatesdir."/panel/admin/svn/search.tmpl" );
-
- $template->param( TITLE => gettext("Search for a SVN repository") );
-
-}
-
-$panel->build( $template );
-$panel->display;
-
+$panel->render('admin/misc/search.tt', {
+ search_title => gettext('Subversion repository search')
+});
Modified: trunk/vhffs-panel/admin/web/search.pl
===================================================================
--- trunk/vhffs-panel/admin/web/search.pl 2011-05-25 11:18:52 UTC (rev 1812)
+++ trunk/vhffs-panel/admin/web/search.pl 2011-05-25 11:19:02 UTC (rev 1813)
@@ -32,7 +32,6 @@
use utf8;
use POSIX qw(locale_h);
-use HTML::Template;
use locale;
use Locale::gettext;
use CGI;
@@ -41,43 +40,10 @@
use lib '%VHFFS_LIB_DIR%';
-use Vhffs::User;
-use Vhffs::Group;
-use Vhffs::Main;
-use Vhffs::Panel::Main;
-use Vhffs::Panel::Menu;
-use Vhffs::Stats;
-use Vhffs::Constants;
+use Vhffs::Panel::Admin;
-my $panel = new Vhffs::Panel::Main();
-exit 0 unless $panel;
-my $session = $panel->get_session;
-exit 0 unless $session;
+my $panel = new Vhffs::Panel::Admin();
-my $vhffs = $panel->{'vhffs'};
-my $maintemplate = $panel->{'template'};
-my $user = $panel->{'user'};
-my $cgi = $panel->{'cgi'};
-my $servername = $cgi->param("name");
-my $template;
-
-my $templatedir = $vhffs->get_config->get_templatedir;
-
-if( ($user->is_moderator != 1 ) && ( $user->is_admin != 1 ) )
-{
-
- $template = new HTML::Template( filename => $templatedir."/panel/misc/simplemsg.tmpl" );
- my $message = gettext( "You are not allowed to see it");
- $template->param( MESSAGE => $message );
-}
-else
-{
- $template = new HTML::Template( filename => $templatedir."/panel/admin/web/search.tmpl" );
-
- $template->param( TITLE => gettext("Search for a web area") );
-
-}
-
-
-$panel->build( $template );
-$panel->display;
+$panel->render('admin/misc/search.tt', {
+ search_title => gettext('Webarea search')
+});
Modified: trunk/vhffs-panel/templates/Makefile.am
===================================================================
--- trunk/vhffs-panel/templates/Makefile.am 2011-05-25 11:18:52 UTC (rev 1812)
+++ trunk/vhffs-panel/templates/Makefile.am 2011-05-25 11:19:02 UTC (rev 1813)
@@ -1,12 +1,7 @@
paneltemplatesdir = @TEMPLATESDIR@/panel
nobase_dist_paneltemplates_DATA = \
- admin/bazaar/search.tmpl \
- admin/cvs/search.tmpl \
- admin/dns/search.tmpl \
admin/group/part.tmpl \
admin/group/search.tmpl \
- admin/mail/search.tmpl \
- admin/mailinglist/search.tmpl \
admin/main/general-modo.tmpl \
admin/main/general.tmpl \
admin/main/main.tmpl \
@@ -21,14 +16,10 @@
admin/misc/moderation.tmpl \
admin/misc/stats.tmpl \
admin/misc/su.tmpl \
- admin/mysql/search.tmpl \
admin/object/edit.tmpl \
admin/object/editembedded.tmpl \
admin/object/part.tmpl \
admin/object/search.tmpl \
- admin/pgsql/search.tmpl \
- admin/repository/search.tmpl \
- admin/svn/search.tmpl \
admin/tag/create.tmpl \
admin/tag/edit.tmpl \
admin/tag/list.tmpl \
@@ -37,12 +28,8 @@
admin/tag/category/list.tmpl \
admin/tag/request/details.tmpl \
admin/tag/request/list.tmpl \
- admin/git/search.tmpl \
- admin/mercurial/search.tmpl \
admin/user/part.tmpl \
admin/user/search.tmpl \
- admin/web/search.tmpl \
- admin/cron/search.tmpl \
menu/context.tmpl \
menu/context-group.tmpl \
menu/context-modo.tmpl \
@@ -60,6 +47,7 @@
acl/view.tt \
admin/index.tt \
admin/misc/list.tt \
+ admin/misc/search.tt \
admin/object/edit.tt \
anonymous/account_created.tt \
anonymous/login.tt \
Deleted: trunk/vhffs-panel/templates/admin/bazaar/search.tmpl
===================================================================
--- trunk/vhffs-panel/templates/admin/bazaar/search.tmpl 2011-05-25 11:18:52 UTC (rev 1812)
+++ trunk/vhffs-panel/templates/admin/bazaar/search.tmpl 2011-05-25 11:19:02 UTC (rev 1813)
@@ -1,4 +0,0 @@
- <h1><TMPL_VAR ESCAPE=1 NAME="TITLE"></h1>
- <form method="post" action="list.pl" accept-charset="utf-8">
- <input type="text" name="NAME" value=""/>
- </form>
Deleted: trunk/vhffs-panel/templates/admin/cron/search.tmpl
===================================================================
--- trunk/vhffs-panel/templates/admin/cron/search.tmpl 2011-05-25 11:18:52 UTC (rev 1812)
+++ trunk/vhffs-panel/templates/admin/cron/search.tmpl 2011-05-25 11:19:02 UTC (rev 1813)
@@ -1,4 +0,0 @@
- <h1><TMPL_VAR ESCAPE=1 NAME="TITLE"></h1>
- <form method="post" action="list.pl" accept-charset="utf-8">
- <input type="text" name="NAME" value=""/>
- </form>
Deleted: trunk/vhffs-panel/templates/admin/cvs/search.tmpl
===================================================================
--- trunk/vhffs-panel/templates/admin/cvs/search.tmpl 2011-05-25 11:18:52 UTC (rev 1812)
+++ trunk/vhffs-panel/templates/admin/cvs/search.tmpl 2011-05-25 11:19:02 UTC (rev 1813)
@@ -1,4 +0,0 @@
- <h1><TMPL_VAR ESCAPE=1 NAME="TITLE"></h1>
- <form method="post" action="list.pl" accept-charset="utf-8">
- <input type="text" name="NAME" value="" />
- </form>
Deleted: trunk/vhffs-panel/templates/admin/dns/search.tmpl
===================================================================
--- trunk/vhffs-panel/templates/admin/dns/search.tmpl 2011-05-25 11:18:52 UTC (rev 1812)
+++ trunk/vhffs-panel/templates/admin/dns/search.tmpl 2011-05-25 11:19:02 UTC (rev 1813)
@@ -1,4 +0,0 @@
- <h1><TMPL_VAR ESCAPE=1 NAME="TITLE"></h1>
- <form method="post" action="list.pl" accept-charset="utf-8">
- <input type="text" name="NAME" value="" />
- </form>
Deleted: trunk/vhffs-panel/templates/admin/git/search.tmpl
===================================================================
--- trunk/vhffs-panel/templates/admin/git/search.tmpl 2011-05-25 11:18:52 UTC (rev 1812)
+++ trunk/vhffs-panel/templates/admin/git/search.tmpl 2011-05-25 11:19:02 UTC (rev 1813)
@@ -1,4 +0,0 @@
- <h1><TMPL_VAR ESCAPE=1 NAME="TITLE"></h1>
- <form method="post" action="list.pl" accept-charset="utf-8">
- <input type="text" name="NAME" value=""/>
- </form>
Deleted: trunk/vhffs-panel/templates/admin/mail/search.tmpl
===================================================================
--- trunk/vhffs-panel/templates/admin/mail/search.tmpl 2011-05-25 11:18:52 UTC (rev 1812)
+++ trunk/vhffs-panel/templates/admin/mail/search.tmpl 2011-05-25 11:19:02 UTC (rev 1813)
@@ -1,4 +0,0 @@
- <h1><TMPL_VAR ESCAPE=1 NAME="TITLE"></h1>
- <form method="post" action="list.pl" accept-charset="utf-8">
- <input type="text" name="NAME" value="" />
- </form>
Deleted: trunk/vhffs-panel/templates/admin/mailinglist/search.tmpl
===================================================================
--- trunk/vhffs-panel/templates/admin/mailinglist/search.tmpl 2011-05-25 11:18:52 UTC (rev 1812)
+++ trunk/vhffs-panel/templates/admin/mailinglist/search.tmpl 2011-05-25 11:19:02 UTC (rev 1813)
@@ -1,4 +0,0 @@
- <h1><TMPL_VAR ESCAPE=1 NAME="TITLE"></h1>
- <form method="post" action="list.pl" accept-charset="utf-8">
- <input type="text" name="NAME" value="" />
- </form>
Deleted: trunk/vhffs-panel/templates/admin/mercurial/search.tmpl
===================================================================
--- trunk/vhffs-panel/templates/admin/mercurial/search.tmpl 2011-05-25 11:18:52 UTC (rev 1812)
+++ trunk/vhffs-panel/templates/admin/mercurial/search.tmpl 2011-05-25 11:19:02 UTC (rev 1813)
@@ -1,4 +0,0 @@
- <h1><TMPL_VAR ESCAPE=1 NAME="TITLE"></h1>
- <form method="post" action="list.pl" accept-charset="utf-8">
- <input type="text" name="NAME" value=""/>
- </form>
Added: trunk/vhffs-panel/templates/admin/misc/search.tt
===================================================================
--- trunk/vhffs-panel/templates/admin/misc/search.tt (rev 0)
+++ trunk/vhffs-panel/templates/admin/misc/search.tt 2011-05-25 11:19:02 UTC (rev 1813)
@@ -0,0 +1,4 @@
+<h1>[% search_title | html %]</h1>
+<form method="post" action="list.pl" accept-charset="utf-8">
+ <p><input type="text" name="NAME"/><input type="submit" value="[% 'Search' | i18n | html %]"/></p>
+</form>
Deleted: trunk/vhffs-panel/templates/admin/mysql/search.tmpl
===================================================================
--- trunk/vhffs-panel/templates/admin/mysql/search.tmpl 2011-05-25 11:18:52 UTC (rev 1812)
+++ trunk/vhffs-panel/templates/admin/mysql/search.tmpl 2011-05-25 11:19:02 UTC (rev 1813)
@@ -1,4 +0,0 @@
- <h1><TMPL_VAR ESCAPE=1 NAME="TITLE"></h1>
- <form method="post" action="list.pl" accept-charset="utf-8">
- <input type="text" name="NAME" value=""/>
- </form>
Deleted: trunk/vhffs-panel/templates/admin/pgsql/search.tmpl
===================================================================
--- trunk/vhffs-panel/templates/admin/pgsql/search.tmpl 2011-05-25 11:18:52 UTC (rev 1812)
+++ trunk/vhffs-panel/templates/admin/pgsql/search.tmpl 2011-05-25 11:19:02 UTC (rev 1813)
@@ -1,4 +0,0 @@
- <h1><TMPL_VAR ESCAPE=1 NAME="TITLE"></h1>
- <form method="post" action="list.pl" accept-charset="utf-8">
- <input type="text" name="NAME" value="" />
- </form>
Deleted: trunk/vhffs-panel/templates/admin/repository/search.tmpl
===================================================================
--- trunk/vhffs-panel/templates/admin/repository/search.tmpl 2011-05-25 11:18:52 UTC (rev 1812)
+++ trunk/vhffs-panel/templates/admin/repository/search.tmpl 2011-05-25 11:19:02 UTC (rev 1813)
@@ -1,4 +0,0 @@
- <h1><TMPL_VAR ESCAPE=1 NAME="TITLE"></h1>
- <form method="post" action="list.pl" accept-charset="utf-8">
- <input type="text" name="NAME" value="" />
- </form>
Deleted: trunk/vhffs-panel/templates/admin/svn/search.tmpl
===================================================================
--- trunk/vhffs-panel/templates/admin/svn/search.tmpl 2011-05-25 11:18:52 UTC (rev 1812)
+++ trunk/vhffs-panel/templates/admin/svn/search.tmpl 2011-05-25 11:19:02 UTC (rev 1813)
@@ -1,4 +0,0 @@
- <h1><TMPL_VAR ESCAPE=1 NAME="TITLE"></h1>
- <form method="post" action="list.pl" accept-charset="utf-8">
- <input type="text" name="NAME" value=""/>
- </form>
Deleted: trunk/vhffs-panel/templates/admin/web/search.tmpl
===================================================================
--- trunk/vhffs-panel/templates/admin/web/search.tmpl 2011-05-25 11:18:52 UTC (rev 1812)
+++ trunk/vhffs-panel/templates/admin/web/search.tmpl 2011-05-25 11:19:02 UTC (rev 1813)
@@ -1,4 +0,0 @@
- <h1><TMPL_VAR ESCAPE=1 NAME="TITLE"></h1>
- <form method="post" action="list.pl" accept-charset="utf-8">
- <input type="text" name="NAME" value=""/>
- </form>