[vhffs-dev] [881] moderation page is now based only on Vhffs::Object (so yes, it will work with any new service !) |
[ Thread Index |
Date Index
| More vhffs.org/vhffs-dev Archives
]
- To: vhffs-dev@xxxxxxxxx
- Subject: [vhffs-dev] [881] moderation page is now based only on Vhffs::Object (so yes, it will work with any new service !)
- From: subversion@xxxxxxxxxxxxx
- Date: Sun, 09 Sep 2007 03:46:20 +0200
Revision: 881
Author: gradator
Date: 2007-09-09 01:46:20 +0000 (Sun, 09 Sep 2007)
Log Message:
-----------
moderation page is now based only on Vhffs::Object (so yes, it will work with any new service !)
Modified Paths:
--------------
trunk/vhffs-api/src/Vhffs/Object.pm
trunk/vhffs-panel/admin/moderation.pl
trunk/vhffs-panel/templates/admin/misc/moderation.tmpl
trunk/vhffs-panel/templates/admin/misc/moderation_part.tmpl
Modified: trunk/vhffs-api/src/Vhffs/Object.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Object.pm 2007-09-08 20:06:08 UTC (rev 880)
+++ trunk/vhffs-api/src/Vhffs/Object.pm 2007-09-09 01:46:20 UTC (rev 881)
@@ -275,13 +275,13 @@
=head2 get_label
Returns a label for this object that can be used to display information.
-Should be redefined in every subclasses (for example, Httpd returns the
+Should be redefined in every subclasses (for example, Web returns the
servername).
=cut
sub get_label {
- return "????"
+ return '????';
}
sub set_status
@@ -326,7 +326,6 @@
sub set_default_state
{
- use Vhffs::Debug;
my $self = shift;
my $vhffs = $self->{'main'};
@@ -349,12 +348,6 @@
}
-sub set_to_delete
-{
- my($self , $value ) = @_;
- $self->{'state'} = "D";
-}
-
sub add_history
{
my $self = shift;
@@ -396,26 +389,32 @@
{
my $vhffs = shift;
my $name = shift;
+ my $state = shift;
- my $query;
- my $request;
+ my $query = 'SELECT o.object_id, o.owner_uid, o.owner_gid, o.date_creation , o.description, o.state, o.type FROM vhffs_object o';
+ my @params;
if( defined $name )
{
- $name = '%'.$name.'%';
- $query = 'SELECT o.object_id, o.owner_uid, o.owner_gid, o.date_creation , o.description, o.state, o.type FROM vhffs_object o INNER JOIN vhffs_users u ON o.owner_uid = u.uid INNER JOIN vhffs_groups g ON o.owner_gid = g.gid WHERE ( o.description LIKE ? ) OR ( o.object_id LIKE ? ) OR ( o.owner_uid LIKE ? ) OR ( state LIKE ? ) OR ( u.username LIKE ? ) OR ( g.groupname LIKE ? ) ORDER BY object_id';
- $request = $vhffs->get_db_object->prepare( $query ) or return -1;
-
- return undef if ( !$request->execute( $name, $name, $name, $name, $name , $name ));
+ $query .= ' INNER JOIN vhffs_users u ON o.owner_uid = u.uid INNER JOIN vhffs_groups g ON o.owner_gid = g.gid WHERE ( o.description LIKE ? ) OR ( o.object_id LIKE ? ) OR ( o.owner_uid LIKE ? ) OR ( state LIKE ? ) OR ( u.username LIKE ? ) OR ( g.groupname LIKE ? )';
+ push(@params, '%'.$name.'%');
+ push(@params, '%'.$name.'%');
+ push(@params, '%'.$name.'%');
+ push(@params, '%'.$name.'%');
+ push(@params, '%'.$name.'%');
+ push(@params, '%'.$name.'%');
}
- else
+ if( defined $state )
{
- $query = 'SELECT o.object_id, o.owner_uid, o.owner_gid, o.date_creation , o.description, o.state, o.type FROM vhffs_object o ORDER BY object_id';
- $request = $vhffs->get_db_object->prepare( $query ) or return -1;
-
- return undef if ( !$request->execute() );
+ $query .= ' WHERE o.state = ?';
+ push(@params, $state);
}
-
+
+ $query .= ' ORDER BY object_id';
+
+ my $request = $vhffs->get_db_object->prepare( $query ) or return -1;
+ return undef unless $request->execute(@params);
+
my $result;
my $rows = $request->fetchall_arrayref();
foreach(@$rows) {
Modified: trunk/vhffs-panel/admin/moderation.pl
===================================================================
--- trunk/vhffs-panel/admin/moderation.pl 2007-09-08 20:06:08 UTC (rev 880)
+++ trunk/vhffs-panel/admin/moderation.pl 2007-09-09 01:46:20 UTC (rev 881)
@@ -40,15 +40,13 @@
use lib '%VHFFS_LIB_DIR%';
-use Vhffs::User;
-use Vhffs::Group;
use Vhffs::Main;
use Vhffs::Panel::Main;
use Vhffs::Panel::Menu;
-use Vhffs::Services::Web;
-use Vhffs::Acl;
use Vhffs::Constants;
use Vhffs::Note;
+use Vhffs::Object;
+use Vhffs::ObjectFactory;
my $panel = new Vhffs::Panel::Main();
exit 0 unless $panel;
@@ -64,452 +62,65 @@
my $templatesdir = $vhffs->get_config->get_templatedir;
my $template;
-my $temp;
#Use is not allowed to see this page, only MODERATOR and ADMIN
-if( ($user->is_moderator != 1 ) && ( $user->is_admin ) != 1 )
+unless( $user->is_moderator || $user->is_admin )
{
- $template = new HTML::Template( filename => $templatesdir."/panel/misc/simplemsg.tmpl" );
- my $message = gettext("You're not allowed to do this (ACL rights)");
- $template->param( MESSAGE => $message );
+ $template = new HTML::Template( filename => $templatesdir.'/panel/misc/simplemsg.tmpl' );
+ $template->param( MESSAGE => gettext('You\'re not allowed to do this (ACL rights)') );
}
else
{
- my $output = "";
- $template = new HTML::Template( filename => $templatesdir."/panel/admin/misc/moderation.tmpl" );
+ $panel->set_title( gettext('Moderation') );
- $template->param( TITLE => gettext("Moderation") );
-
- #Treat Groups to moderate
- use Vhffs::Panel::Group;
- $template->param( TEXT_GROUP => gettext("Groups awaiting validation") );
- my $groups = Vhffs::Group::getall( $vhffs , Vhffs::Constants::WAITING_FOR_VALIDATION );
-
- $output = "";
-
- if( defined $groups )
- {
- foreach $temp ( @{$groups} )
- {
- my $subtemplate = new HTML::Template( filename => $templatesdir."/panel/admin/misc/moderation_part.tmpl" );
- $subtemplate->param( NAME => $temp->get_groupname );
-
- if( $vhffs->get_config->get_users->{'use_notation'} eq 'yes' )
- {
- $subtemplate->param( OWNER => $temp->get_user->get_username);
- $subtemplate->param( NOTE => Vhffs::Note::get_note( $vhffs , $temp->get_user ) );
- $subtemplate->param( UID_ASKER => $temp->get_user->get_uid);
- }
- else
- {
- $subtemplate->param( OWNER => $temp->get_user->get_username );
- }
-
-
- $subtemplate->param( GROUP => $temp->get_groupname );
- $subtemplate->param( OID => $temp->get_oid );
- $subtemplate->param( DESCRIPTION => CGI::escapeHTML( $temp->get_description ) );
- $subtemplate->param( ACCEPT => gettext("Accept") );
- $subtemplate->param( REFUSE => gettext("Refuse") );
- $output.= $subtemplate->output;
- }
-
- $template->param( MODERATION_GROUPS => $output );
+ my $objects = Vhffs::Object::getall( $vhffs, undef, Vhffs::Constants::WAITING_FOR_VALIDATION );
+ unless( defined $objects ) {
+ $template = new HTML::Template( filename => $templatesdir.'/panel/misc/simplemsg.tmpl' );
+ $template->param( MESSAGE => gettext('There is nothing to moderate') );
}
- else
- {
- $template->param( MODERATION_GROUPS => gettext("No Group to validate") );
- }
+ else {
- if( $vhffs->get_config->get_service_availability('web') == 1 )
- {
- #Treat Website to moderate
- use Vhffs::Services::Web;
- $template->param( TEXT_WEB => gettext("Web Area awaiting validation") );
- my $webs = Vhffs::Services::Web::getall( $vhffs , Vhffs::Constants::WAITING_FOR_VALIDATION);
- my $web;
- $output = "";
-
- if( defined $webs )
- {
- foreach $temp ( @{$webs} )
- {
- my $subtemplate = new HTML::Template( filename => $templatesdir."/panel/admin/misc/moderation_part.tmpl" );
- $subtemplate->param( NAME => $temp->get_servername );
+ $template = new HTML::Template( filename => $templatesdir.'/panel/admin/misc/moderation.tmpl' );
+ $template->param( HEADER_TYPE => gettext('Type') );
+ $template->param( HEADER_NAME => gettext('Name') );
+ $template->param( HEADER_USER => gettext('User') );
+ $template->param( HEADER_GROUP => gettext('Group') );
+ $template->param( HEADER_DESCRIPTION => gettext('Description') );
+ $template->param( HEADER_ACCEPT => gettext('Accept') );
+ $template->param( HEADER_REFUSE => gettext('Refuse') );
- if( $vhffs->get_config->get_users->{'use_notation'} eq 'yes' )
- {
- $subtemplate->param( OWNER => $temp->get_user->get_username);
- $subtemplate->param( NOTE => Vhffs::Note::get_note( $vhffs , $temp->get_user ) );
- $subtemplate->param( UID_ASKER => $temp->get_user->get_uid);
- }
- else
- {
- $subtemplate->param( OWNER => $temp->get_user->get_username );
- }
+ my $output = '';
- $subtemplate->param( GROUP => $temp->get_group->get_groupname );
- $subtemplate->param( OID => $temp->get_oid );
- $subtemplate->param( DESCRIPTION => CGI::escapeHTML( $temp->get_description ) );
- $subtemplate->param( ACCEPT => gettext("Accept") );
- $subtemplate->param( REFUSE => gettext("Refuse") );
- $output.= $subtemplate->output;
- }
-
- $template->param( MODERATION_WEB => $output );
- }
- else
- {
- $template->param( MODERATION_WEB => gettext("No Web Area to validate") );
- }
- }
+ foreach ( @{$objects} ) {
+ my $subtemplate = new HTML::Template( filename => $templatesdir.'/panel/admin/misc/moderation_part.tmpl' );
- if( $vhffs->get_config->get_service_availability('dns') == 1 )
- {
- #Treat Mail domains to moderate
- use Vhffs::Services::DNS;
- $template->param( TEXT_DNS => gettext("DNS awaiting validation") );
- my $nss = Vhffs::Services::DNS::getall( $vhffs , Vhffs::Constants::WAITING_FOR_VALIDATION );
- $output = "";
-
- if( @$nss > 0 )
- {
- foreach $temp ( @{$nss} )
- {
- my $subtemplate = new HTML::Template( filename => $templatesdir."/panel/admin/misc/moderation_part.tmpl" );
- if( $vhffs->get_config->get_users->{'use_notation'} eq 'yes' )
- {
- $subtemplate->param( OWNER => $temp->get_user->get_username);
- $subtemplate->param( NOTE => Vhffs::Note::get_note( $vhffs , $temp->get_user ) );
- $subtemplate->param( UID_ASKER => $temp->get_user->get_uid);
- }
- else
- {
- $subtemplate->param( OWNER => $temp->get_user->get_username );
- }
- $subtemplate->param( NAME => $temp->get_domain );
- $subtemplate->param( GROUP => $temp->get_group->get_groupname );
- $subtemplate->param( OID => $temp->get_oid );
- $subtemplate->param( DESCRIPTION => CGI::escapeHTML( $temp->get_description ) );
- $subtemplate->param( ACCEPT => gettext("Accept") );
- $subtemplate->param( REFUSE => gettext("Refuse") );
- $output.= $subtemplate->output;
- }
-
- $template->param( MODERATION_DNS => $output );
- }
- else
- {
- $template->param( MODERATION_DNS => gettext("No DNS to validate") );
- }
- }
+ my $user = $_->get_user;
+ my $group = $_->get_group;
+ my $object = Vhffs::ObjectFactory::fetch_object( $vhffs , $_->{object_id} );
+ $subtemplate->param( TYPE => Vhffs::Functions::type_string_from_type_id( $_->{type} ) );
+ $subtemplate->param( NAME => $object->get_title );
+ $subtemplate->param( OWNER => $user->get_username);
- if( $vhffs->get_config->get_service_availability('cvs') == 1 )
- {
- #Treat Mail domains to moderate
- use Vhffs::Services::Cvs;
- $template->param( TEXT_CVS => gettext("CVS repository awaiting validation") );
- my $repos = Vhffs::Services::Cvs::getall( $vhffs , Vhffs::Constants::WAITING_FOR_VALIDATION );
- $output = "";
-
- if( defined $repos )
- {
- foreach $temp ( @{$repos} )
+ if( $vhffs->get_config->get_users->{'use_notation'} eq 'yes' )
{
-
- my $subtemplate = new HTML::Template( filename => $templatesdir."/panel/admin/misc/moderation_part.tmpl" );
-
- if( $vhffs->get_config->get_users->{'use_notation'} eq 'yes' )
- {
- $subtemplate->param( OWNER => $temp->get_user->get_username);
- $subtemplate->param( NOTE => Vhffs::Note::get_note( $vhffs , $temp->get_user ) );
- $subtemplate->param( UID_ASKER => $temp->get_user->get_uid);
- }
- else
- {
- $subtemplate->param( OWNER => $temp->get_user->get_username );
- }
- $subtemplate->param( NAME => $temp->get_cvsroot );
- $subtemplate->param( GROUP => $temp->get_group->get_groupname );
- $subtemplate->param( OID => $temp->get_oid );
- $subtemplate->param( DESCRIPTION => CGI::escapeHTML( $temp->get_description ) );
- $subtemplate->param( ACCEPT => gettext("Accept") );
- $subtemplate->param( REFUSE => gettext("Refuse") );
- $output.= $subtemplate->output;
+ $subtemplate->param( NOTE => Vhffs::Note::get_note( $vhffs , $user ) );
+ $subtemplate->param( UID_ASKER => $user->get_uid);
}
-
- $template->param( MODERATION_CVS => $output );
- }
- else
- {
- $template->param( MODERATION_CVS => gettext("No repository to validate") );
- }
- }
+ $subtemplate->param( GROUP => $group->get_groupname );
-
- if( $vhffs->get_config->get_service_availability('mailinglist') == 1 )
- {
- #Treat Mail domains to moderate
- use Vhffs::Panel::MailingList;
- $template->param( TEXT_MAILING => gettext("List awaiting validation") );
- my $mls = Vhffs::Services::MailingList::getall( $vhffs , Vhffs::Constants::WAITING_FOR_VALIDATION );
- $output = "";
-
- if( defined $mls )
- {
- foreach $temp ( @{$mls} )
- {
- my $subtemplate = new HTML::Template( filename => $templatesdir."/panel/admin/misc/moderation_part.tmpl" );
- $subtemplate->param( NAME => $temp->get_localpart ."\@". $temp->get_domain );
-
- if( $vhffs->get_config->get_users->{'use_notation'} eq 'yes' )
- {
- $subtemplate->param( OWNER => $temp->get_user->get_username);
- $subtemplate->param( NOTE => Vhffs::Note::get_note( $vhffs , $temp->get_user ) );
- $subtemplate->param( UID_ASKER => $temp->get_user->get_uid);
- }
- else
- {
- $subtemplate->param( OWNER => $temp->get_user->get_username );
- }
- $subtemplate->param( GROUP => $temp->get_group->get_groupname );
- $subtemplate->param( OID => $temp->get_oid );
- $subtemplate->param( DESCRIPTION => CGI::escapeHTML( $temp->get_description ) );
- $subtemplate->param( ACCEPT => gettext("Accept") );
- $subtemplate->param( REFUSE => gettext("Refuse") );
- $output.= $subtemplate->output;
- }
-
- $template->param( MODERATION_MAILING => $output );
+ $subtemplate->param( OID => $_->get_oid );
+ $subtemplate->param( DESCRIPTION => CGI::escapeHTML( $_->get_description ) );
+ $subtemplate->param( ACCEPT => gettext('Accept') );
+ $subtemplate->param( REFUSE => gettext('Refuse') );
+ $output .= $subtemplate->output;
}
- else
- {
- $template->param( MODERATION_MAILING => gettext("No list to validate") );
- }
- }
-
-
- if( $vhffs->get_config->get_service_availability('svn') == 1 )
- {
- #Treat Mail domains to moderate
- use Vhffs::Services::Svn;
- use Vhffs::Constants;
- $template->param( TEXT_SVN => gettext("Subversion repository awaiting validation") );
- my $repos = Vhffs::Services::Svn::getall( $vhffs , Vhffs::Constants::WAITING_FOR_VALIDATION );
- $output = "";
- my $svn;
- if( defined $repos )
- {
- foreach $svn ( @{$repos} )
- {
- my $subtemplate = new HTML::Template( filename => $templatesdir."/panel/admin/misc/moderation_part.tmpl" );
- $subtemplate->param( NAME => $svn->get_reponame);
-
- if( $vhffs->get_config->get_users->{'use_notation'} eq 'yes' )
- {
- $subtemplate->param( OWNER => $svn->get_user->get_username);
- $subtemplate->param( NOTE => Vhffs::Note::get_note( $vhffs , $svn->get_user ) );
- $subtemplate->param( UID_ASKER => $svn->get_user->get_uid);
- }
- else
- {
- $subtemplate->param( OWNER => $svn->get_user->get_username );
- }
-
- $subtemplate->param( GROUP => $svn->get_group->get_groupname );
- $subtemplate->param( OID => $svn->get_oid );
- $subtemplate->param( DESCRIPTION => CGI::escapeHTML( $svn->get_description ) );
- $subtemplate->param( ACCEPT => gettext("Accept") );
- $subtemplate->param( REFUSE => gettext("Refuse") );
- $output.= $subtemplate->output;
- }
-
- $template->param( MODERATION_SVN => $output );
- }
- else
- {
- $template->param( MODERATION_SVN => gettext("No repository to validate") );
- }
+ $template->param( MODERATION => $output );
}
-
-
-
-
- if( $vhffs->get_config->get_service_availability('mail') == 1 )
- {
- #Treat Mail domains to moderate
- use Vhffs::Panel::Mail;
- $template->param( TEXT_MAIL => gettext("Mail Area awaiting validation") );
- my $mails = Vhffs::Services::Mail::getall( $vhffs , Vhffs::Constants::WAITING_FOR_VALIDATION );
- $output = "";
-
- if( defined $mails )
- {
- foreach $temp ( @{$mails} )
- {
- my $subtemplate = new HTML::Template( filename => $templatesdir."/panel/admin/misc/moderation_part.tmpl" );
- $subtemplate->param( NAME => $temp->get_domain );
-
- if( $vhffs->get_config->get_users->{'use_notation'} eq 'yes' )
- {
- $subtemplate->param( OWNER => $temp->get_user->get_username);
- $subtemplate->param( NOTE => Vhffs::Note::get_note( $vhffs , $temp->get_user ) );
- $subtemplate->param( UID_ASKER => $temp->get_user->get_uid);
- }
- else
- {
- $subtemplate->param( OWNER => $temp->get_user->get_username );
- }
-
- $subtemplate->param( GROUP => $temp->get_group->get_groupname );
- $subtemplate->param( OID => $temp->get_oid );
- $subtemplate->param( DESCRIPTION => CGI::escapeHTML( $temp->get_description) );
- $subtemplate->param( ACCEPT => gettext("Accept") );
- $subtemplate->param( REFUSE => gettext("Refuse") );
- $output.= $subtemplate->output;
- }
-
- $template->param( MODERATION_MAIL => $output );
- }
- else
- {
- $template->param( MODERATION_MAIL => gettext("No Mail Area to validate") );
- }
- }
-
-
-
- if( $vhffs->get_config->get_service_availability('mysql') == 1 )
- {
- use Vhffs::Services::Mysql;
- $template->param( TEXT_MYSQL => gettext("MySQL database awaiting validation") );
- my $dbs = Vhffs::Services::Mysql::getall( $vhffs , Vhffs::Constants::WAITING_FOR_VALIDATION );
- $output = "";
-
- if( defined $dbs )
- {
- foreach $temp ( @{$dbs} )
- {
- my $subtemplate = new HTML::Template( filename => $templatesdir."/panel/admin/misc/moderation_part.tmpl" );
-
- if( $vhffs->get_config->get_users->{'use_notation'} eq 'yes' )
- {
- $subtemplate->param( OWNER => $temp->get_user->get_username);
- $subtemplate->param( NOTE => Vhffs::Note::get_note( $vhffs , $temp->get_user ) );
- $subtemplate->param( UID_ASKER => $temp->get_user->get_uid);
- }
- else
- {
- $subtemplate->param( OWNER => $temp->get_user->get_username );
- }
-
- $subtemplate->param( NAME => $temp->get_dbname );
- $subtemplate->param( GROUP => $temp->get_group->get_groupname );
- $subtemplate->param( OID => $temp->get_oid );
- $subtemplate->param( DESCRIPTION => CGI::escapeHTML( $temp->get_description ) );
- $subtemplate->param( ACCEPT => gettext("Accept") );
- $subtemplate->param( REFUSE => gettext("Refuse") );
- $output.= $subtemplate->output;
- }
-
- $template->param( MODERATION_MYSQL => $output );
- }
- else
- {
- $template->param( MODERATION_MYSQL => gettext("No database to validate") );
- }
- }
-
- if( $vhffs->get_config->get_service_availability('pgsql') == 1 )
- {
- #Treat Mail domains to moderate
- use Vhffs::Services::Pgsql;
- $template->param( TEXT_POSTGRES => gettext("Postgres database awaiting validation") );
- my $dbs = Vhffs::Services::Pgsql::getall( $vhffs , Vhffs::Constants::WAITING_FOR_VALIDATION );
- $output = "";
-
- if( defined @{$dbs} )
- {
- foreach $temp ( @{$dbs} )
- {
- my $subtemplate = new HTML::Template( filename => $templatesdir."/panel/admin/misc/moderation_part.tmpl" );
-
- if( $vhffs->get_config->get_users->{'use_notation'} eq 'yes' )
- {
- $subtemplate->param( OWNER => $temp->get_user->get_username);
- $subtemplate->param( NOTE => Vhffs::Note::get_note( $vhffs , $temp->get_user ) );
- $subtemplate->param( UID_ASKER => $temp->get_user->get_uid);
- }
- else
- {
- $subtemplate->param( OWNER => $temp->get_user->get_username );
- }
-
- $subtemplate->param( NAME => $temp->get_dbname );
- $subtemplate->param( GROUP => $temp->get_group->get_groupname );
- $subtemplate->param( OID => $temp->get_oid );
- $subtemplate->param( DESCRIPTION => CGI::escapeHTML( $temp->get_description ) );
- $subtemplate->param( ACCEPT => gettext("Accept") );
- $subtemplate->param( REFUSE => gettext("Refuse") );
- $output.= $subtemplate->output;
- }
-
- $template->param( MODERATION_POSTGRES => $output );
- }
- else
- {
- $template->param( MODERATION_POSTGRES => gettext("No database to validate") );
- }
- }
-
-
- if( $vhffs->get_config->get_service_availability('repository') == 1 )
- {
- use Vhffs::Services::Repository;
- $template->param( TEXT_REPOSITORY => gettext( "Download repository awaiting validation" ) );
- my $repos = Vhffs::Services::Repository::getall( $vhffs , Vhffs::Constants::WAITING_FOR_VALIDATION );
- $output = "";
-
- if( defined @{$repos} )
- {
- foreach $temp ( @{$repos} )
- {
- my $subtemplate = new HTML::Template( filename => $templatesdir."/panel/admin/misc/moderation_part.tmpl" );
-
- if( $vhffs->get_config->get_users->{'use_notation'} eq 'yes' )
- {
- $subtemplate->param( OWNER => $temp->get_user->get_username);
- $subtemplate->param( NOTE => Vhffs::Note::get_note( $vhffs , $temp->get_user ) );
- $subtemplate->param( UID_ASKER => $temp->get_user->get_uid);
- }
- else
- {
- $subtemplate->param( OWNER => $temp->get_user->get_username );
- }
-
- $subtemplate->param( NAME => $temp->get_name );
- $subtemplate->param( GROUP => $temp->get_group->get_groupname );
- $subtemplate->param( OID => $temp->get_oid );
- $subtemplate->param( DESCRIPTION => CGI::escapeHTML( $temp->get_description ) );
- $subtemplate->param( ACCEPT => gettext("Accept") );
- $subtemplate->param( REFUSE => gettext("Refuse") );
- $output.= $subtemplate->output;
- }
-
- $template->param( MODERATION_REPOSITORY => $output );
- }
- else
- {
- $template->param( MODERATION_REPOSITORY => gettext("No repository to validate") );
- }
- }
-
-
}
$panel->build( $template );
Modified: trunk/vhffs-panel/templates/admin/misc/moderation.tmpl
===================================================================
--- trunk/vhffs-panel/templates/admin/misc/moderation.tmpl 2007-09-08 20:06:08 UTC (rev 880)
+++ trunk/vhffs-panel/templates/admin/misc/moderation.tmpl 2007-09-09 01:46:20 UTC (rev 881)
@@ -1,73 +1,26 @@
- <h1><TMPL_VAR NAME="TITLE"></h1>
- <h2>
- <TMPL_VAR NAME="TEXT_GROUP">
- </h2>
- <table>
- <TMPL_VAR NAME="MODERATION_GROUPS">
- </table>
-
- <h2>
- <TMPL_VAR NAME="TEXT_WEB">
- </h2>
-
- <table>
- <TMPL_VAR NAME="MODERATION_WEB">
- </table>
-
- <h2>
- <TMPL_VAR NAME="TEXT_MAIL">
- </h2>
- <table>
- <TMPL_VAR NAME="MODERATION_MAIL">
- </table>
-
- <h2>
- <TMPL_VAR NAME="TEXT_DNS">
- </h2>
- <table>
- <TMPL_VAR NAME="MODERATION_DNS">
- </table>
-
- <h2>
- <TMPL_VAR NAME="TEXT_MYSQL">
- </h2>
- <table>
- <TMPL_VAR NAME="MODERATION_MYSQL">
- </table>
-
- <h2>
- <TMPL_VAR NAME="TEXT_POSTGRES">
- </h2>
- <table>
- <TMPL_VAR NAME="MODERATION_POSTGRES">
- </table>
-
- <h2>
- <TMPL_VAR NAME="TEXT_CVS">
- </h2>
- <table>
- <TMPL_VAR NAME="MODERATION_CVS">
- </table>
-
- <h2>
- <TMPL_VAR NAME="TEXT_SVN">
- </h2>
- <table>
- <TMPL_VAR NAME="MODERATION_SVN">
- </table>
-
- <h2>
- <TMPL_VAR NAME="TEXT_MAILING">
- </h2>
- <table>
- <TMPL_VAR NAME="MODERATION_MAILING">
- </table>
-
- <h2>
- <TMPL_VAR NAME="TEXT_REPOSITORY">
- </h2>
- <table>
- <TMPL_VAR NAME="MODERATION_REPOSITORY">
- </table>
-
-
+<table>
+<tr>
+ <th>
+ <TMPL_VAR NAME="HEADER_TYPE">
+ </th>
+ <th>
+ <TMPL_VAR NAME="HEADER_NAME">
+ </th>
+ <th>
+ <TMPL_VAR NAME="HEADER_USER">
+ </th>
+ <th>
+ <TMPL_VAR NAME="HEADER_GROUP">
+ </th>
+ <th class="mainColumn">
+ <TMPL_VAR NAME="HEADER_DESCRIPTION">
+ </th>
+ <th>
+ <TMPL_VAR NAME="HEADER_ACCEPT">
+ </th>
+ <th>
+ <TMPL_VAR NAME="HEADER_REFUSE">
+ </th>
+</tr>
+<TMPL_VAR NAME="MODERATION">
+</table>
Modified: trunk/vhffs-panel/templates/admin/misc/moderation_part.tmpl
===================================================================
--- trunk/vhffs-panel/templates/admin/misc/moderation_part.tmpl 2007-09-08 20:06:08 UTC (rev 880)
+++ trunk/vhffs-panel/templates/admin/misc/moderation_part.tmpl 2007-09-09 01:46:20 UTC (rev 881)
@@ -1,5 +1,8 @@
<tr>
<td>
+ <TMPL_VAR NAME="TYPE">
+ </td>
+ <td>
<TMPL_VAR NAME="NAME">
</td>
<td>