[vhffs-dev] [svn] commit: r100 - in /trunk: vhffs-api/src/Vhffs/Panel/Mailinglist.pm vhffs-api/src/Vhffs/Panel/Main.pm vhffs-panel/dns/prefs.pl vhffs-panel/mail/prefs.pl vhffs-panel/templates/group/info.tmpl

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


Author: soda
Date: Wed Dec  7 12:35:12 2005
New Revision: 100

Log:
Improve groups configurations
clean code


Modified:
    trunk/vhffs-api/src/Vhffs/Panel/Mailinglist.pm
    trunk/vhffs-api/src/Vhffs/Panel/Main.pm
    trunk/vhffs-panel/dns/prefs.pl
    trunk/vhffs-panel/mail/prefs.pl
    trunk/vhffs-panel/templates/group/info.tmpl

Modified: trunk/vhffs-api/src/Vhffs/Panel/Mailinglist.pm
==============================================================================
--- trunk/vhffs-api/src/Vhffs/Panel/Mailinglist.pm (original)
+++ trunk/vhffs-api/src/Vhffs/Panel/Mailinglist.pm Wed Dec  7 12:35:12 2005
@@ -119,7 +119,7 @@
 			}
 			else
 			{
-				$subtemplate = new HTML::Template( filename => "$templatesdir/mailinglist/menu_sub.tmpl" );
+				$subtemplate = new HTML::Template( filename => "$templatesdir/mailinglist/menu_sub_wait.tmpl" );
 				$subtemplate->param( NAME => $ml->get_localpart . "\@" . $ml->get_domain);
 	            $subtemplate->param( HISTORY => gettext("History"));
 	            $subtemplate->param( REASON => Vhffs::Functions::status_string_from_status_id( $ml->get_status ));

Modified: trunk/vhffs-api/src/Vhffs/Panel/Main.pm
==============================================================================
--- trunk/vhffs-api/src/Vhffs/Panel/Main.pm (original)
+++ trunk/vhffs-api/src/Vhffs/Panel/Main.pm Wed Dec  7 12:35:12 2005
@@ -147,6 +147,7 @@
 	my $group;
 	my $template;
 	my $templatedir;
+	my $subtemplate;
 
 	$templatedir = $vhffs->get_config->get_templatedir;
 		
@@ -169,7 +170,13 @@
 		{	
 			foreach $object ( @{$objects} )
 			{
-				$temp .= $object->get_servername . "<br/>";
+				$subtemplate = new HTML::Template( filename => $templatedir."/misc/group_service.tmpl" );
+				$subtemplate->param( SERVICE  => "web" );
+				$subtemplate->param( VALUE  => $object->get_servername );
+				$subtemplate->param( TEXT  => gettext("Go to admin") );
+				$subtemplate->param( HISTORY  => gettext("View history") );
+				$subtemplate->param( OID  => $object->get_oid );
+				$temp .= $subtemplate->output;
 			}
 		}
 		else
@@ -227,7 +234,13 @@
 		{	
 			foreach $object ( @{$objects} )
 			{
-				$temp .= $object->get_cvsroot ."<br/>";
+				$subtemplate = new HTML::Template( filename => $templatedir."/misc/group_service.tmpl" );
+				$subtemplate->param( SERVICE  => "cvs" );
+				$subtemplate->param( VALUE  => $object->get_cvsroot );
+				$subtemplate->param( TEXT  => gettext("Go to admin") );
+				$subtemplate->param( HISTORY  => gettext("View history") );
+				$subtemplate->param( OID  => $object->get_oid );
+				$temp .= $subtemplate->output;
 			}
 		}
 		else
@@ -247,7 +260,13 @@
 		{	
 			foreach $object ( @{$objects} )
 			{
-				$temp .= $object->get_reponame ."<br/>";
+				$subtemplate = new HTML::Template( filename => $templatedir."/misc/group_service.tmpl" );
+				$subtemplate->param( SERVICE  => "svn" );
+				$subtemplate->param( VALUE  => $object->get_title );
+				$subtemplate->param( TEXT  => gettext("Go to admin") );
+				$subtemplate->param( HISTORY  => gettext("View history") );
+				$subtemplate->param( OID  => $object->get_oid );
+				$temp .= $subtemplate->output;
 			}
 		}
 		else
@@ -268,7 +287,13 @@
 		{	
 			foreach $object ( @{$objects} )
 			{
-				$temp .= $object->get_listname ."<br/>";
+				$subtemplate = new HTML::Template( filename => $templatedir."/misc/group_service.tmpl" );
+				$subtemplate->param( SERVICE  => "mailinglist" );
+				$subtemplate->param( VALUE  => $object->get_listname );
+				$subtemplate->param( TEXT  => gettext("Go to admin") );
+				$subtemplate->param( HISTORY  => gettext("View history") );
+				$subtemplate->param( OID  => $object->get_oid );
+				$temp .= $subtemplate->output;
 			}
 		}
 		else
@@ -288,7 +313,13 @@
 		{	
 			foreach $object ( @{$objects} )
 			{
-				$temp .= $object->get_domain ."<br/>";
+				$subtemplate = new HTML::Template( filename => $templatedir."/misc/group_service.tmpl" );
+				$subtemplate->param( SERVICE  => "mail" );
+				$subtemplate->param( VALUE  => $object->get_domain );
+				$subtemplate->param( TEXT  => gettext("Go to admin") );
+				$subtemplate->param( HISTORY  => gettext("View history") );
+				$subtemplate->param( OID  => $object->get_oid );
+				$temp .= $subtemplate->output;
 			}
 		}
 		else
@@ -309,7 +340,13 @@
 		{	
 			foreach $object ( @{$objects} )
 			{
-				$temp .= $object->get_domain ."<br/>";
+				$subtemplate = new HTML::Template( filename => $templatedir."/misc/group_service.tmpl" );
+				$subtemplate->param( SERVICE  => "dns" );
+				$subtemplate->param( VALUE  => $object->get_domain );
+				$subtemplate->param( TEXT  => gettext("Go to admin") );
+				$subtemplate->param( HISTORY  => gettext("View history") );
+				$subtemplate->param( OID  => $object->get_oid );
+				$temp .= $subtemplate->output;
 			}
 		}
 		else

Modified: trunk/vhffs-panel/dns/prefs.pl
==============================================================================
--- trunk/vhffs-panel/dns/prefs.pl (original)
+++ trunk/vhffs-panel/dns/prefs.pl Wed Dec  7 12:35:12 2005
@@ -59,6 +59,13 @@
 {
     $template = new HTML::Template( filename => $templatedir."/misc/simplemsg.tmpl" );
     $message = gettext("You're not allowed to do this (ACL rights)");
+    $template->param( MESSAGE => $message );
+}
+elsif( ( $dns->get_status != Vhffs::Constants::ACTIVATED ) && ( $user->is_admin != 1 ) )
+{
+    
+    $template = new HTML::Template( filename => $templatedir."/misc/simplemsg.tmpl" );
+    my $message = gettext( "This object is not functionnal yet. Please wait creation or moderation.");
     $template->param( MESSAGE => $message );
 }
 else

Modified: trunk/vhffs-panel/mail/prefs.pl
==============================================================================
--- trunk/vhffs-panel/mail/prefs.pl (original)
+++ trunk/vhffs-panel/mail/prefs.pl Wed Dec  7 12:35:12 2005
@@ -45,7 +45,7 @@
 	$template->param( MESSAGE => $message );
 
 }
-elsif( $mail->get_status != Vhffs::Constants::ACTIVATED )
+elsif( ( $mail->get_status != Vhffs::Constants::ACTIVATED ) && ( $user->is_admin != 1 ) )
 {
 	
 	$template = new HTML::Template( filename => $templatedir."/misc/simplemsg.tmpl" );

Modified: trunk/vhffs-panel/templates/group/info.tmpl
==============================================================================
--- trunk/vhffs-panel/templates/group/info.tmpl (original)
+++ trunk/vhffs-panel/templates/group/info.tmpl Wed Dec  7 12:35:12 2005
@@ -1,17 +1,43 @@
 <h1><tmpl_var name="TEXT_TITLE"></h1>
-<h2><tmpl_var name="WEBAREA"></h2>
-<tmpl_var name="WEBAREA_VALUES">
-<h2><tmpl_var name="MYSQL"></h2>
-<tmpl_var name="MYSQL_VALUES">
-<h2><tmpl_var name="PGSQL"></h2>
-<tmpl_var name="PGSQL_VALUES">
-<h2><tmpl_var name="CVS"></h2>
-<tmpl_var name="CVS_VALUES">
-<h2><tmpl_var name="SVN"></h2>
-<tmpl_var name="SVN_VALUES">
-<h2><tmpl_var name="DNS"></h2>
-<tmpl_var name="DNS_VALUES">
-<h2><tmpl_var name="MAILS"></h2>
-<tmpl_var name="MAILS_VALUES">
-<h2><tmpl_var name="MLS"></h2>
-<tmpl_var name="MLS_VALUES">
+	<h2><tmpl_var name="WEBAREA"></h2>
+		<ul>
+			<tmpl_var name="WEBAREA_VALUES">
+		</ul>
+
+
+	<h2><tmpl_var name="MYSQL"></h2>
+	<ul>
+		<tmpl_var name="MYSQL_VALUES">
+	</ul>
+	
+	<h2><tmpl_var name="PGSQL"></h2>
+	<ul>
+		<tmpl_var name="PGSQL_VALUES">
+	</ul>
+
+
+	<h2><tmpl_var name="CVS"></h2>
+	<ul>
+		<tmpl_var name="CVS_VALUES">
+	</ul>
+	
+	<h2><tmpl_var name="SVN"></h2>
+	<ul>
+		<tmpl_var name="SVN_VALUES">
+	</ul>
+
+	<h2><tmpl_var name="DNS"></h2>
+	<ul>
+		<tmpl_var name="DNS_VALUES">
+	</ul>
+	
+	<h2><tmpl_var name="MAILS"></h2>
+	<ul>
+		<tmpl_var name="MAILS_VALUES">
+	</ul>
+
+
+	<h2><tmpl_var name="MLS"></h2>
+	<ul>
+		<tmpl_var name="MLS_VALUES">
+	</ul>




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