[vhffs-dev] [622] Added menu for project navigation (use vhffs-ng theme, vhffs one is outdated). |
[ Thread Index |
Date Index
| More vhffs.org/vhffs-dev Archives
]
Revision: 622
Author: beuss
Date: 2007-05-22 11:38:50 +0000 (Tue, 22 May 2007)
Log Message:
-----------
Added menu for project navigation (use vhffs-ng theme, vhffs one is outdated).
Cosmetic fixes (who said "it still sucks" ?).
Removed some unused code.
Modified Paths:
--------------
branches/vhffs-design/vhffs-api/src/Vhffs/Panel/Cvs.pm
branches/vhffs-design/vhffs-api/src/Vhffs/Panel/DNS.pm
branches/vhffs-design/vhffs-api/src/Vhffs/Panel/Mail.pm
branches/vhffs-design/vhffs-api/src/Vhffs/Panel/Mailinglist.pm
branches/vhffs-design/vhffs-api/src/Vhffs/Panel/Main.pm
branches/vhffs-design/vhffs-api/src/Vhffs/Panel/Mysql.pm
branches/vhffs-design/vhffs-api/src/Vhffs/Panel/Pgsql.pm
branches/vhffs-design/vhffs-api/src/Vhffs/Panel/Repository.pm
branches/vhffs-design/vhffs-api/src/Vhffs/Panel/Svn.pm
branches/vhffs-design/vhffs-api/src/Vhffs/Panel/Web.pm
branches/vhffs-design/vhffs-panel/Makefile.am
branches/vhffs-design/vhffs-panel/panel.pl
branches/vhffs-design/vhffs-panel/templates/Makefile.am
branches/vhffs-design/vhffs-panel/templates/group/info.tmpl
branches/vhffs-design/vhffs-panel/templates/menu/group.tmpl
branches/vhffs-design/vhffs-panel/templates/menu/main.tmpl
branches/vhffs-design/vhffs-panel/themes/vhffs-ng/images/cvsentry.png
branches/vhffs-design/vhffs-panel/themes/vhffs-ng/images/dbentry.png
branches/vhffs-design/vhffs-panel/themes/vhffs-ng/images/dnsentry.png
branches/vhffs-design/vhffs-panel/themes/vhffs-ng/images/mailentry.png
branches/vhffs-design/vhffs-panel/themes/vhffs-ng/images/mailingentry.png
branches/vhffs-design/vhffs-panel/themes/vhffs-ng/images/repositoryentry.png
branches/vhffs-design/vhffs-panel/themes/vhffs-ng/images/webentry.png
branches/vhffs-design/vhffs-panel/themes/vhffs-ng/main.css
Added Paths:
-----------
branches/vhffs-design/vhffs-panel/cvs/index.pl
branches/vhffs-design/vhffs-panel/dns/index.pl
branches/vhffs-design/vhffs-panel/mail/index.pl
branches/vhffs-design/vhffs-panel/mailinglist/index.pl
branches/vhffs-design/vhffs-panel/mysql/index.pl
branches/vhffs-design/vhffs-panel/pgsql/index.pl
branches/vhffs-design/vhffs-panel/repository/index.pl
branches/vhffs-design/vhffs-panel/svn/index.pl
branches/vhffs-design/vhffs-panel/templates/misc/service_index.tmpl
branches/vhffs-design/vhffs-panel/themes/vhffs-ng/images/black.png
branches/vhffs-design/vhffs-panel/themes/vhffs-ng/images/help_bg.png
branches/vhffs-design/vhffs-panel/themes/vhffs-ng/images/mysqlentry.png
branches/vhffs-design/vhffs-panel/themes/vhffs-ng/images/quota_progress.png
branches/vhffs-design/vhffs-panel/themes/vhffs-ng/images/svnentry.png
branches/vhffs-design/vhffs-panel/themes/vhffs-ng/images/tab.png
branches/vhffs-design/vhffs-panel/web/index.pl
Modified: branches/vhffs-design/vhffs-api/src/Vhffs/Panel/Cvs.pm
===================================================================
--- branches/vhffs-design/vhffs-api/src/Vhffs/Panel/Cvs.pm 2007-05-22 08:44:05 UTC (rev 621)
+++ branches/vhffs-design/vhffs-api/src/Vhffs/Panel/Cvs.pm 2007-05-22 11:38:50 UTC (rev 622)
@@ -102,6 +102,35 @@
return $cvs;
}
+=pod
+
+=head2 getall_per_group
+
+ $cvs = Vhffs::Panel::Cvs::getall_per_group($vhffs, $gid);
+
+Returns an array of hashrefs (oid, displayname, active, state (localized string)) of all CVS repos owned by
+a given group.
+
+=cut
+
+
+sub getall_per_group
+{
+ my ( $main, $gid ) = @_;
+
+ my $dbh = $main->get_db_object;
+ my $sql = 'SELECT c.object_id AS oid, c.cvsroot AS displayname, o.state FROM vhffs_cvs c INNER JOIN vhffs_object o ON c.object_id = o.object_id WHERE c.owner_gid = ?';
+ my $sth = $dbh->prepare($sql) or return -1;
+ $sth->execute($gid) or return -2;
+ my $cvs = [];
+ while(my $c = $sth->fetchrow_hashref) {
+ $c->{active} = ($c->{state} == Vhffs::Constants::ACTIVATED);
+ $c->{state} = Vhffs::Functions::status_string_from_status_id($c->{state});
+ push @$cvs, $c;
+ }
+ return $cvs;
+}
+
sub menu
{
my ( $class , $data ) = @_;
Modified: branches/vhffs-design/vhffs-api/src/Vhffs/Panel/DNS.pm
===================================================================
--- branches/vhffs-design/vhffs-api/src/Vhffs/Panel/DNS.pm 2007-05-22 08:44:05 UTC (rev 621)
+++ branches/vhffs-design/vhffs-api/src/Vhffs/Panel/DNS.pm 2007-05-22 11:38:50 UTC (rev 622)
@@ -120,22 +120,35 @@
return( $request->fetchrow_arrayref() );
}
+=pod
-sub getall_dns_per_group
-{
- my ( $group , $main ) =@_ ;
+=head2 getall_per_group
- return undef unless( defined $group );
+ $dns = Vhffs::Panel::Dns::getall_per_group($vhffs, $gid);
- my $query = "SELECT ns.domain, ns.object_id , o.object_id, o.state FROM vhffs_dns ns , vhffs_object o WHERE o.object_id=ns.object_id AND ns.owner_gid='".$group->get_gid."'";
- my $request = $main->{'db'}->prepare( $query ) or return -1;
+Returns an array of hashrefs (oid, displayname, active, state (localized string)) of all DNS owned by
+a given group.
- return undef if ( $request->execute() <= 0);
+=cut
- return( $request->fetchall_hashref('domain') );
+
+sub getall_per_group
+{
+ my ( $main, $gid ) = @_;
+
+ my $dbh = $main->get_db_object;
+ my $sql = 'SELECT ns.object_id AS oid, ns.domain AS displayname, o.state FROM vhffs_dns ns INNER JOIN vhffs_object o ON ns.object_id = o.object_id WHERE ns.owner_gid = ?';
+ my $sth = $dbh->prepare($sql) or return -1;
+ $sth->execute($gid) or return -2;
+ my $dns = [];
+ while(my $d = $sth->fetchrow_hashref) {
+ $d->{active} = ($d->{state} == Vhffs::Constants::ACTIVATED);
+ $d->{state} = Vhffs::Functions::status_string_from_status_id($d->{state});
+ push @$dns, $d;
+ }
+ return $dns;
}
-
sub menu
{
my ( $class , $data ) = @_;
Modified: branches/vhffs-design/vhffs-api/src/Vhffs/Panel/Mail.pm
===================================================================
--- branches/vhffs-design/vhffs-api/src/Vhffs/Panel/Mail.pm 2007-05-22 08:44:05 UTC (rev 621)
+++ branches/vhffs-design/vhffs-api/src/Vhffs/Panel/Mail.pm 2007-05-22 11:38:50 UTC (rev 622)
@@ -85,6 +85,35 @@
}
+=pod
+
+=head2 getall_per_group
+
+ $dns = Vhffs::Panel::Mail::getall_per_group($vhffs, $gid);
+
+Returns an array of hashrefs (oid, displayname, active, state (localized string)) of all mail domains by
+a given group.
+
+=cut
+
+
+sub getall_per_group
+{
+ my ( $main, $gid ) = @_;
+
+ my $dbh = $main->get_db_object;
+ my $sql = 'SELECT m.object_id AS oid, m.domain AS displayname, o.state FROM vhffs_mxdomain m INNER JOIN vhffs_object o ON m.object_id = o.object_id WHERE m.owner_gid = ?';
+ my $sth = $dbh->prepare($sql) or return -1;
+ $sth->execute($gid) or return -2;
+ my $mails = [];
+ while(my $m = $sth->fetchrow_hashref) {
+ $m->{active} = ($m->{state} == Vhffs::Constants::ACTIVATED);
+ $m->{state} = Vhffs::Functions::status_string_from_status_id($m->{state});
+ push @$mails, $m;
+ }
+ return $mails;
+}
+
sub getall_mail_per_group
{
my $group = shift;
Modified: branches/vhffs-design/vhffs-api/src/Vhffs/Panel/Mailinglist.pm
===================================================================
--- branches/vhffs-design/vhffs-api/src/Vhffs/Panel/Mailinglist.pm 2007-05-22 08:44:05 UTC (rev 621)
+++ branches/vhffs-design/vhffs-api/src/Vhffs/Panel/Mailinglist.pm 2007-05-22 11:38:50 UTC (rev 622)
@@ -84,35 +84,35 @@
return $mls;
}
+=pod
+=head2 getall_per_group
-sub getall_list_per_group
-{
- my $group = shift;
- my $main = shift ;
- my $state = shift;
+ $dns = Vhffs::Panel::Mail::getall_per_group($vhffs, $gid);
- return undef unless( defined $group );
+Returns an array of hashrefs (oid, displayname, active, state (localized string)) of all mail domains by
+a given group.
- my $query;
+=cut
- if( defined $state )
- {
- $query = "SELECT l.ml_id, l.local_part, l.domain, l.object_id, o.state FROM vhffs_ml l, vhffs_object o WHERE o.object_id=l.object_id AND o.state='".$state."' AND l.owner_gid='".$group->get_gid."'";
- }
- else
- {
- $query = "SELECT l.ml_id, l.local_part , l.domain, l.object_id, o.state FROM vhffs_ml l, vhffs_object o WHERE o.object_id=l.object_id AND l.owner_gid='".$group->get_gid."'";
- }
- my $request = $main->{'db'}->prepare( $query ) or return -1;
+sub getall_per_group
+{
+ my ( $main, $gid ) = @_;
- return undef if ( $request->execute() <= 0);
-
- return( $request->fetchall_hashref('ml_id') );
+ my $dbh = $main->get_db_object;
+ my $sql = 'SELECT l.object_id AS oid, l.local_part || \'@\' || l.domain AS displayname, o.state FROM vhffs_ml l INNER JOIN vhffs_object o ON l.object_id = o.object_id WHERE l.owner_gid = ?';
+ my $sth = $dbh->prepare($sql) or return -1;
+ $sth->execute($gid) or return -2;
+ my $mls = [];
+ while(my $l = $sth->fetchrow_hashref) {
+ $l->{active} = ($l->{state} == Vhffs::Constants::ACTIVATED);
+ $l->{state} = Vhffs::Functions::status_string_from_status_id($l->{state});
+ push @$mls, $l;
+ }
+ return $mls;
}
-
sub create_list
{
my ($main, $lpart, $domain, $description, $user, $group) = @_;
Modified: branches/vhffs-design/vhffs-api/src/Vhffs/Panel/Main.pm
===================================================================
--- branches/vhffs-design/vhffs-api/src/Vhffs/Panel/Main.pm 2007-05-22 08:44:05 UTC (rev 621)
+++ branches/vhffs-design/vhffs-api/src/Vhffs/Panel/Main.pm 2007-05-22 11:38:50 UTC (rev 622)
@@ -340,7 +340,7 @@
my $groupname = $self->{groupname};
my $vhffs = $self->{vhffs};
- my $menutemplate = new HTML::Template( filename => $templatedir."/menu/main.tmpl" );
+ my $menutemplate = new HTML::Template( filename => $templatedir.'/menu/main.tmpl' );
$menutemplate->param( THEME => $theme );
$menutemplate->param( USERNAME => $user->get_username() );
@@ -367,9 +367,26 @@
# Current project stuff (TODO stop handle it in session)
if($groupname) {
+ my $context_tmpl = new HTML::Template( filename => $templatedir.'/menu/group.tmpl' );
+
$menutemplate->param( CURRENT_GROUP_TEXT => gettext('Current group:') );
+ $menutemplate->param( PROJECT_HOME_TEXT => gettext('Project home') );
$menutemplate->param( GROUPNAME => $groupname );
+ my $config = $vhffs->get_config;
+ my $items = [];
+ push @$items, {service => 'web', label => gettext('Web') } if( $config->use_web );
+ push @$items, {service => 'mysql', label => gettext('MySQL') } if( $config->use_mysql );
+ push @$items, {service => 'pgsql', label => gettext('PgSQL') } if( $config->use_postgres );
+ push @$items, {service => 'cvs', label => gettext('CVS') } if( $config->use_cvs );
+ push @$items, {service => 'svn', label => gettext('SVN') } if( $config->use_svn );
+ push @$items, {service => 'dns', label => gettext('DNS') } if( $config->use_dns );
+ push @$items, {service => 'repository', label => gettext('Dl repos') } if( $config->use_repository );
+ push @$items, {service => 'mail', label => gettext('Mail') } if( $config->use_mail );
+ push @$items, {service => 'mailinglist', label => gettext('ML') } if( $config->use_mailing );
+ $context_tmpl->param( MENU_ITEMS => $items );
+ $menutemplate->param( CONTEXTUAL_MENU => $context_tmpl->output());
}
+
return $menutemplate->output();
}
@@ -419,8 +436,10 @@
sub project_info
{
- my ( $class , $vhffs, $group ) = @_;
+ my $self = shift;
+ my $vhffs = $self->{vhffs};
+ my $group = $self->{group};
my $temp;
my $object;
my $objects;
@@ -438,10 +457,14 @@
else
{
$template = new HTML::Template( filename => $templatedir."/group/info.tmpl" );
- $template->param( TEXT_TITLE => sprintf( gettext("Group %s") , $group->get_groupname ));
+ $self->set_title( sprintf( gettext("Group %s") , $group->get_groupname ) );
+ $template->param( THEME => $self->{theme} );
- $template->param( GROUPNAME => $group->get_groupname );
- $template->param( QUOTA_VALUE => sprintf( gettext("Quota (used/total) : %s/%s") , $group->get_quota_used , $group->get_quota ) );
+ # Quota stuff
+ $template->param( QUOTA_TEXT => sprintf( gettext("Quota (used/total) : %s/%s") , $group->get_quota_used , $group->get_quota ) );
+ # Yes, sorry quota progress image has to be 300px width max
+ $template->param( QUOTA_WIDTH => ( ($group->get_quota_used / $group->get_quota) * 300 ) );
+
$template->param( NEW => gettext('New') );
$template->param( TEXT_PREFS => gettext('Preferences') );
@@ -830,4 +853,48 @@
exit(0);
}
+=pod
+
+=head2 create_service_index
+
+ my $webs = Vhffs::Panel::Web::get_per_group($main, $gid);
+ my $output = $panel->create_service_index('web', $webs);
+ print $output;
+
+Generates summary information for a given service using service_index.tmpl.
+
+=cut
+
+sub create_service_index($$$) {
+ my ($self, $service, $services) = @_;
+ my %service_labels = (
+ cvs => 'CVS repositories',
+ dns => 'Domain names',
+ mail => 'Mail Domains',
+ mailing => 'Mailing Lists',
+ mysql => 'MySQL DBs',
+ pgsql => 'PostgreSQL DBs',
+ repo => 'Download repositories',
+ svn => 'SVN repositories',
+ web => 'Webareas',
+ );
+
+ my $vhffs = $self->{vhffs};
+ my $group = $self->{group};
+ my $templatedir = $self->{templatedir};
+
+ my $svclabel = $service_labels{$service};
+ $self->set_title( sprintf(gettext('%s for %s'), gettext($svclabel), $group->get_groupname) );
+
+ my $template = new HTML::Template( filename => $templatedir.'/misc/service_index.tmpl', global_vars => 1 );
+ $template->param( TEXT_TITLE => sprintf(gettext('%s for %s'), gettext($svclabel), $group->get_groupname) );
+ $template->param( SERVICE => $service );
+ $template->param( ADMIN_TEXT => gettext('Go to administration') );
+ $template->param( HISTORY_TEXT => gettext('History') );
+ $template->param( NEW => gettext('New') );
+
+ $template->param( SERVICES => $services);
+ return $template->output;
+}
+
1;
Modified: branches/vhffs-design/vhffs-api/src/Vhffs/Panel/Mysql.pm
===================================================================
--- branches/vhffs-design/vhffs-api/src/Vhffs/Panel/Mysql.pm 2007-05-22 08:44:05 UTC (rev 621)
+++ branches/vhffs-design/vhffs-api/src/Vhffs/Panel/Mysql.pm 2007-05-22 11:38:50 UTC (rev 622)
@@ -45,6 +45,17 @@
use Vhffs::Panel::Main;
use Vhffs::Services::Mysql;
+=pod
+
+=head1 NAME
+
+Vhffs::Panel::Mysql - Lightweight objects for MySQL DBs handling in VHFFS panel.
+
+=head1 METHODS
+
+=cut
+
+
sub getall_dbs_to_moderate
{
my( $main , $query , $request);
@@ -107,23 +118,34 @@
return $mysql;
}
+=pod
-sub getall_mysql_per_group
-{
- my ( $group , $main ) = @_;
+=head2 getall_per_group
- return undef unless( defined $group );
+ $mysql = Vhffs::Panel::Mysql::getall_per_group($vhffs, $gid);
- my $query = "SELECT m.dbname , m.object_id , o.state FROM vhffs_mysql m, vhffs_object o WHERE m.object_id=o.object_id AND m.owner_gid='".$group->get_gid."'";
+Returns an array of hashrefs (oid, displayname, active, state (localized string)) of all MySQL DBs owned by
+a given group.
- my $request = $main->{'db'}->prepare( $query ) or return -1;
- my @retour;
+=cut
- return undef if ( $request->execute() <= 0);
- return ( $request->fetchall_hashref( 'dbname' ) );
-}
+sub getall_per_group
+{
+ my ( $main, $gid ) = @_;
+ my $dbh = $main->get_db_object;
+ my $sql = 'SELECT m.object_id AS oid, m.dbname AS displayname, o.state FROM vhffs_mysql m INNER JOIN vhffs_object o ON m.object_id = o.object_id WHERE m.owner_gid = ?';
+ my $sth = $dbh->prepare($sql) or return -1;
+ $sth->execute($gid) or return -2;
+ my $mysql = [];
+ while(my $m = $sth->fetchrow_hashref) {
+ $m->{active} = ($m->{state} == Vhffs::Constants::ACTIVATED);
+ $m->{state} = Vhffs::Functions::status_string_from_status_id($m->{state});
+ push @$mysql, $m;
+ }
+ return $mysql;
+}
sub menu
{
Modified: branches/vhffs-design/vhffs-api/src/Vhffs/Panel/Pgsql.pm
===================================================================
--- branches/vhffs-design/vhffs-api/src/Vhffs/Panel/Pgsql.pm 2007-05-22 08:44:05 UTC (rev 621)
+++ branches/vhffs-design/vhffs-api/src/Vhffs/Panel/Pgsql.pm 2007-05-22 11:38:50 UTC (rev 622)
@@ -85,25 +85,35 @@
return( $request->fetchall_hashref('dbname') );
}
+=pod
+=head2 getall_per_group
-sub getall_pgsql_per_group
-{
- my ( $group , $main ) = @_;
-
- return undef unless( defined $group );
-
- my $query = "SELECT p.dbname , p.object_id , o.state FROM vhffs_pgsql p, vhffs_object o WHERE p.object_id=o.object_id AND p.owner_gid='".$group->get_gid."'";
+ $pgsql = Vhffs::Panel::Postgres::getall_per_group($vhffs, $gid);
- my $request = $main->{'db'}->prepare( $query ) or return -1;
- my @retour;
+Returns an array of hashrefs (oid, displayname, active, state (localized string)) of all PgSQL DBs owned by
+a given group.
- return undef if ( $request->execute() <= 0);
- return ( $request->fetchall_hashref( 'dbname' ) );
-}
+=cut
+sub getall_per_group
+{
+ my ( $main, $gid ) = @_;
+ my $dbh = $main->get_db_object;
+ my $sql = 'SELECT p.object_id AS oid, p.dbname AS displayname, o.state FROM vhffs_pgsql p INNER JOIN vhffs_object o ON p.object_id = o.object_id WHERE p.owner_gid = ?';
+ my $sth = $dbh->prepare($sql) or return -1;
+ $sth->execute($gid) or return -2;
+ my $pgsql = [];
+ while(my $p = $sth->fetchrow_hashref) {
+ $p->{active} = ($p->{state} == Vhffs::Constants::ACTIVATED);
+ $p->{state} = Vhffs::Functions::status_string_from_status_id($p->{state});
+ push @$pgsql, $p;
+ }
+ return $pgsql;
+}
+
sub menu
{
my ( $class , $data ) = @_;
Modified: branches/vhffs-design/vhffs-api/src/Vhffs/Panel/Repository.pm
===================================================================
--- branches/vhffs-design/vhffs-api/src/Vhffs/Panel/Repository.pm 2007-05-22 08:44:05 UTC (rev 621)
+++ branches/vhffs-design/vhffs-api/src/Vhffs/Panel/Repository.pm 2007-05-22 11:38:50 UTC (rev 622)
@@ -58,7 +58,34 @@
return( $request->fetchall_hashref('name') );
}
+=pod
+=head2 getall_per_group
+
+ $repos = Vhffs::Panel::Repository::getall_per_group($vhffs, $gid);
+
+Returns an array of hashrefs (oid, displayname, active, state (localized string)) of all download
+repositories owned by a given group.
+
+=cut
+
+sub getall_per_group
+{
+ my ( $main, $gid ) = @_;
+
+ my $dbh = $main->get_db_object;
+ my $sql = 'SELECT r.object_id AS oid, r.name AS displayname, o.state FROM vhffs_repository r INNER JOIN vhffs_object o ON r.object_id = o.object_id WHERE r.owner_gid = ?';
+ my $sth = $dbh->prepare($sql) or return -1;
+ $sth->execute($gid) or return -2;
+ my $mysql = [];
+ while(my $m = $sth->fetchrow_hashref) {
+ $m->{active} = ($m->{state} == Vhffs::Constants::ACTIVATED);
+ $m->{state} = Vhffs::Functions::status_string_from_status_id($m->{state});
+ push @$mysql, $m;
+ }
+ return $mysql;
+}
+
sub search {
my ($main, $name) = @_;
Modified: branches/vhffs-design/vhffs-api/src/Vhffs/Panel/Svn.pm
===================================================================
--- branches/vhffs-design/vhffs-api/src/Vhffs/Panel/Svn.pm 2007-05-22 08:44:05 UTC (rev 621)
+++ branches/vhffs-design/vhffs-api/src/Vhffs/Panel/Svn.pm 2007-05-22 11:38:50 UTC (rev 622)
@@ -61,25 +61,35 @@
}
-sub getall_svn_per_group
-{
- my ( $group , $main ) = @_;
+=pod
- return undef unless( defined($group) );
+=head2 getall_per_group
- my $query = "SELECT s.reponame , s.object_id, o.state FROM vhffs_svn s, vhffs_object o WHERE o.object_id=s.object_id AND s.owner_gid='".$group->get_gid."'";
+ $svn = Vhffs::Panel::Svn::getall_per_group($vhffs, $gid);
- my $request = $main->{'db'}->prepare( $query ) or return -1;
- my @retour;
+Returns an array of hashrefs (oid, displayname, active, state (localized string)) of all SVN repos owned by
+a given group.
- return undef if ( $request->execute() <= 0);
- return ( $request->fetchall_hashref( 'reponame' ) );
+=cut
-}
+sub getall_per_group
+{
+ my ( $main, $gid ) = @_;
+ my $dbh = $main->get_db_object;
+ my $sql = 'SELECT s.object_id AS oid, s.reponame AS displayname, o.state FROM vhffs_svn s INNER JOIN vhffs_object o ON s.object_id = o.object_id WHERE s.owner_gid = ?';
+ my $sth = $dbh->prepare($sql) or return -1;
+ $sth->execute($gid) or return -2;
+ my $svn = [];
+ while(my $s = $sth->fetchrow_hashref) {
+ $s->{active} = ($s->{state} == Vhffs::Constants::ACTIVATED);
+ $s->{state} = Vhffs::Functions::status_string_from_status_id($s->{state});
+ push @$svn, $s;
+ }
+ return $svn;
+}
-
sub search {
my ($main, $name) = @_;
Modified: branches/vhffs-design/vhffs-api/src/Vhffs/Panel/Web.pm
===================================================================
--- branches/vhffs-design/vhffs-api/src/Vhffs/Panel/Web.pm 2007-05-22 08:44:05 UTC (rev 621)
+++ branches/vhffs-design/vhffs-api/src/Vhffs/Panel/Web.pm 2007-05-22 11:38:50 UTC (rev 622)
@@ -47,6 +47,16 @@
use Vhffs::Constants;
use Vhffs::Functions;
+=pod
+
+=head1 NAME
+
+Vhffs::Panel::Web - Light weight objects to handle webareas in VHFFS panel.
+
+=head2 METHODS
+
+=cut
+
sub getall_web_to_moderate
{
my( $main , $query , $request);
@@ -59,21 +69,33 @@
}
-sub getall_web_per_group
-{
- my ( $group , $main ) =@_ ;
+=pod
- return undef unless( defined $group );
+=head2 get_all_per_group
- my $query = "SELECT w.servername, w.object_id, o.state FROM vhffs_httpd w, vhffs_object o WHERE o.object_id=w.object_id AND w.owner_gid='".$group->get_gid."'";
- my $request = $main->{'db'}->prepare( $query ) or return -1;
+ my $areas = Vhffs::Panel::Web::getall_per_group($vhffs, $main);
- return undef if ( $request->execute() <= 0);
+Returns an array of hashrefs (oid, display, active, state) of all webareas owned by
+a given group.
- return( $request->fetchall_hashref('servername') );
+=cut
+
+sub getall_per_group {
+ my ($main, $gid) = @_;
+
+ my $dbh = $main->get_db_object;
+ my $sql = 'SELECT w.servername AS displayname, w.object_id AS oid, o.state FROM vhffs_httpd w INNER JOIN vhffs_object o ON o.object_id = w.object_id WHERE w.owner_gid = ?';
+ my $sth = $dbh->prepare($sql) or return -1;
+ $sth->execute($gid) or return -2;
+ my $web = [];
+ while(my $w = $sth->fetchrow_hashref) {
+ $w->{active} = ($w->{state} == Vhffs::Constants::ACTIVATED);
+ $w->{state} = Vhffs::Functions::status_string_from_status_id($w->{state});
+ push @$web, $w;
+ }
+ return $web;
}
-
sub search {
my ($main, $name) = @_;
Modified: branches/vhffs-design/vhffs-panel/Makefile.am
===================================================================
--- branches/vhffs-design/vhffs-panel/Makefile.am 2007-05-22 08:44:05 UTC (rev 621)
+++ branches/vhffs-design/vhffs-panel/Makefile.am 2007-05-22 11:38:50 UTC (rev 622)
@@ -84,10 +84,12 @@
admin/su.pl \
cvs/create.pl \
cvs/delete.pl \
+ cvs/index.pl \
cvs/prefs_save.pl \
cvs/prefs.pl \
dns/create.pl \
dns/delete.pl \
+ dns/index.pl \
dns/prefs.pl \
group/create.pl \
group/delete.pl \
@@ -109,6 +111,7 @@
mail/delete_box.pl \
mail/delete_forward.pl \
mail/delete.pl \
+ mail/index.pl \
mail/password_box.pl \
mail/prefs.pl \
mail/save_catchall.pl \
@@ -120,18 +123,21 @@
mailinglist/create.pl \
mailinglist/del_member.pl \
mailinglist/delete.pl \
+ mailinglist/index.pl \
mailinglist/prefs.pl \
mailinglist/save_options.pl \
mailinglist/save_sig.pl \
mailinglist/submit.pl \
mysql/create.pl \
mysql/delete.pl \
+ mysql/index.pl \
mysql/prefs_save.pl \
mysql/prefs.pl \
mysql/submit.pl \
object/upavatar.pl \
pgsql/create.pl \
pgsql/delete.pl \
+ pgsql/index.pl \
pgsql/pgsql_submit.pl \
pgsql/prefs_save.pl \
pgsql/prefs.pl \
@@ -147,12 +153,14 @@
public/rss/lastusers.pl \
repository/create.pl \
repository/delete.pl \
+ repository/index.pl \
repository/prefs_save.pl \
repository/prefs.pl \
repository/quota_used.pl \
repository/repository_submit.pl \
svn/create.pl \
svn/delete.pl \
+ svn/index.pl \
svn/prefs_save.pl \
svn/prefs.pl \
svn/svn_submit.pl \
@@ -161,6 +169,7 @@
user/projects.pl \
web/create.pl \
web/delete.pl \
+ web/index.pl \
web/prefs_save.pl \
web/prefs.pl \
web/web_submit.pl
@@ -220,6 +229,7 @@
themes/vhffs/js/menu.js \
themes/vhffs/main.css \
themes/vhffs-ng/images/admin.png \
+ themes/vhffs-ng/images/black.png \
themes/vhffs-ng/images/bug.png \
themes/vhffs-ng/images/bug_little.png \
themes/vhffs-ng/images/buttonbg.png \
@@ -240,6 +250,7 @@
themes/vhffs-ng/images/fr_FR.png \
themes/vhffs-ng/images/good.png \
themes/vhffs-ng/images/help.png \
+ themes/vhffs-ng/images/help_bg.png \
themes/vhffs-ng/images/help_little.png \
themes/vhffs-ng/images/home.png \
themes/vhffs-ng/images/inputbg.png \
@@ -270,9 +281,12 @@
themes/vhffs-ng/images/projectparams.png \
themes/vhffs-ng/images/projects.png \
themes/vhffs-ng/images/quota.png \
+ themes/vhffs-ng/images/quota_progress.png \
themes/vhffs-ng/images/repositorycreate.png \
themes/vhffs-ng/images/repositoryentry.png \
themes/vhffs-ng/images/repository.png \
+ themes/vhffs-ng/images/svnentry.png \
+ themes/vhffs-ng/images/tab.png \
themes/vhffs-ng/images/tip.png \
themes/vhffs-ng/images/userentry.png \
themes/vhffs-ng/images/user.png \
Added: branches/vhffs-design/vhffs-panel/cvs/index.pl
===================================================================
--- branches/vhffs-design/vhffs-panel/cvs/index.pl 2007-05-22 08:44:05 UTC (rev 621)
+++ branches/vhffs-design/vhffs-panel/cvs/index.pl 2007-05-22 11:38:50 UTC (rev 622)
@@ -0,0 +1,65 @@
+#!%PERL%
+# Copyright (c) vhffs project and its contributors
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+#3. Neither the name of vhffs nor the names of its contributors
+# may be used to endorse or promote products derived from this
+# software without specific prior written permission.
+#
+#THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+#"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+#LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+#FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+#COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+#INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+#BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+#LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+#CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+
+
+use POSIX qw(locale_h);
+use HTML::Template;
+use locale;
+use Locale::gettext;
+use strict;
+
+use lib '%VHFFS_LIB_DIR%';
+use Vhffs::Panel::Main;
+use Vhffs::Panel::Cvs;
+
+my $panel = new Vhffs::Panel::Main();
+if(!$panel) {
+ exit 0;
+}
+
+my $vhffs = $panel->{vhffs};
+my $group = $panel->{group};
+
+if( ! defined($group) ) {
+ $panel->set_title( gettext('Error') );
+ $panel->add_error( gettext('You have to select a group first') );
+ $panel->display;
+} else {
+ # Group is in session => access is granted for user and group is activated
+ # no need to check
+ my $cvs = Vhffs::Panel::Cvs::getall_per_group( $vhffs, $group->get_gid );
+ if($cvs < 0) {
+ $panel->add_error( gettext('Unable to get CVS repositories') );
+ } else {
+ $panel->display($panel->create_service_index('cvs', $cvs));
+ }
+}
+
Property changes on: branches/vhffs-design/vhffs-panel/cvs/index.pl
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/vhffs-design/vhffs-panel/dns/index.pl
===================================================================
--- branches/vhffs-design/vhffs-panel/dns/index.pl 2007-05-22 08:44:05 UTC (rev 621)
+++ branches/vhffs-design/vhffs-panel/dns/index.pl 2007-05-22 11:38:50 UTC (rev 622)
@@ -0,0 +1,65 @@
+#!%PERL%
+# Copyright (c) vhffs project and its contributors
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+#3. Neither the name of vhffs nor the names of its contributors
+# may be used to endorse or promote products derived from this
+# software without specific prior written permission.
+#
+#THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+#"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+#LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+#FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+#COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+#INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+#BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+#LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+#CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+
+
+use POSIX qw(locale_h);
+use HTML::Template;
+use locale;
+use Locale::gettext;
+use strict;
+
+use lib '%VHFFS_LIB_DIR%';
+use Vhffs::Panel::Main;
+use Vhffs::Panel::DNS;
+
+my $panel = new Vhffs::Panel::Main();
+if(!$panel) {
+ exit 0;
+}
+
+my $vhffs = $panel->{vhffs};
+my $group = $panel->{group};
+
+if( ! defined($group) ) {
+ $panel->set_title( gettext('Error') );
+ $panel->add_error( gettext('You have to select a group first') );
+ $panel->display;
+} else {
+ # Group is in session => access is granted for user and group is activated
+ # no need to check
+ my $dns = Vhffs::Panel::DNS::getall_per_group( $vhffs, $group->get_gid );
+ if($dns < 0) {
+ $panel->add_error( gettext('Unable to get DNS') );
+ } else {
+ $panel->display($panel->create_service_index('dns', $dns));
+ }
+}
+
Property changes on: branches/vhffs-design/vhffs-panel/dns/index.pl
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/vhffs-design/vhffs-panel/mail/index.pl
===================================================================
--- branches/vhffs-design/vhffs-panel/mail/index.pl 2007-05-22 08:44:05 UTC (rev 621)
+++ branches/vhffs-design/vhffs-panel/mail/index.pl 2007-05-22 11:38:50 UTC (rev 622)
@@ -0,0 +1,65 @@
+#!%PERL%
+# Copyright (c) vhffs project and its contributors
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+#3. Neither the name of vhffs nor the names of its contributors
+# may be used to endorse or promote products derived from this
+# software without specific prior written permission.
+#
+#THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+#"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+#LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+#FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+#COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+#INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+#BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+#LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+#CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+
+
+use POSIX qw(locale_h);
+use HTML::Template;
+use locale;
+use Locale::gettext;
+use strict;
+
+use lib '%VHFFS_LIB_DIR%';
+use Vhffs::Panel::Main;
+use Vhffs::Panel::Mail;
+
+my $panel = new Vhffs::Panel::Main();
+if(!$panel) {
+ exit 0;
+}
+
+my $vhffs = $panel->{vhffs};
+my $group = $panel->{group};
+
+if( ! defined($group) ) {
+ $panel->set_title( gettext('Error') );
+ $panel->add_error( gettext('You have to select a group first') );
+ $panel->display;
+} else {
+ # Group is in session => access is granted for user and group is activated
+ # no need to check
+ my $mails = Vhffs::Panel::Mail::getall_per_group( $vhffs, $group->get_gid );
+ if($mails < 0) {
+ $panel->add_error( gettext('Unable to get mail domains') );
+ } else {
+ $panel->display($panel->create_service_index('mail', $mails));
+ }
+}
+
Property changes on: branches/vhffs-design/vhffs-panel/mail/index.pl
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/vhffs-design/vhffs-panel/mailinglist/index.pl
===================================================================
--- branches/vhffs-design/vhffs-panel/mailinglist/index.pl 2007-05-22 08:44:05 UTC (rev 621)
+++ branches/vhffs-design/vhffs-panel/mailinglist/index.pl 2007-05-22 11:38:50 UTC (rev 622)
@@ -0,0 +1,65 @@
+#!%PERL%
+# Copyright (c) vhffs project and its contributors
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+#3. Neither the name of vhffs nor the names of its contributors
+# may be used to endorse or promote products derived from this
+# software without specific prior written permission.
+#
+#THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+#"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+#LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+#FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+#COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+#INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+#BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+#LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+#CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+
+
+use POSIX qw(locale_h);
+use HTML::Template;
+use locale;
+use Locale::gettext;
+use strict;
+
+use lib '%VHFFS_LIB_DIR%';
+use Vhffs::Panel::Main;
+use Vhffs::Panel::Mailinglist;
+
+my $panel = new Vhffs::Panel::Main();
+if(!$panel) {
+ exit 0;
+}
+
+my $vhffs = $panel->{vhffs};
+my $group = $panel->{group};
+
+if( ! defined($group) ) {
+ $panel->set_title( gettext('Error') );
+ $panel->add_error( gettext('You have to select a group first') );
+ $panel->display;
+} else {
+ # Group is in session => access is granted for user and group is activated
+ # no need to check
+ my $mls = Vhffs::Panel::Mailinglist::getall_per_group( $vhffs, $group->get_gid );
+ if($mls < 0) {
+ $panel->add_error( gettext('Unable to get mailing lists') );
+ } else {
+ $panel->display($panel->create_service_index('mailing', $mls));
+ }
+}
+
Property changes on: branches/vhffs-design/vhffs-panel/mailinglist/index.pl
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/vhffs-design/vhffs-panel/mysql/index.pl
===================================================================
--- branches/vhffs-design/vhffs-panel/mysql/index.pl 2007-05-22 08:44:05 UTC (rev 621)
+++ branches/vhffs-design/vhffs-panel/mysql/index.pl 2007-05-22 11:38:50 UTC (rev 622)
@@ -0,0 +1,65 @@
+#!%PERL%
+# Copyright (c) vhffs project and its contributors
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+#3. Neither the name of vhffs nor the names of its contributors
+# may be used to endorse or promote products derived from this
+# software without specific prior written permission.
+#
+#THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+#"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+#LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+#FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+#COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+#INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+#BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+#LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+#CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+
+
+use POSIX qw(locale_h);
+use HTML::Template;
+use locale;
+use Locale::gettext;
+use strict;
+
+use lib '%VHFFS_LIB_DIR%';
+use Vhffs::Panel::Main;
+use Vhffs::Panel::Mysql;
+
+my $panel = new Vhffs::Panel::Main();
+if(!$panel) {
+ exit 0;
+}
+
+my $vhffs = $panel->{vhffs};
+my $group = $panel->{group};
+
+if( ! defined($group) ) {
+ $panel->set_title( gettext('Error') );
+ $panel->add_error( gettext('You have to select a group first') );
+ $panel->display;
+} else {
+ # Group is in session => access is granted for user and group is activated
+ # no need to check
+ my $mysql = Vhffs::Panel::Mysql::getall_per_group( $vhffs, $group->get_gid );
+ if($mysql < 0) {
+ $panel->add_error( gettext('Unable to get MySQL databases.') );
+ } else {
+ $panel->display($panel->create_service_index('mysql', $mysql));
+ }
+}
+
Property changes on: branches/vhffs-design/vhffs-panel/mysql/index.pl
___________________________________________________________________
Name: svn:executable
+ *
Modified: branches/vhffs-design/vhffs-panel/panel.pl
===================================================================
--- branches/vhffs-design/vhffs-panel/panel.pl 2007-05-22 08:44:05 UTC (rev 621)
+++ branches/vhffs-design/vhffs-panel/panel.pl 2007-05-22 11:38:50 UTC (rev 622)
@@ -101,7 +101,7 @@
{
if( defined $projectname )
{
- $template = project_info Vhffs::Panel::Main($vhffs, $panel->{group});
+ $template = $panel->project_info;
$template->param( MESSAGE => $cgi->param('msg') ) if(defined $cgi->param('msg'));
}
else
Added: branches/vhffs-design/vhffs-panel/pgsql/index.pl
===================================================================
--- branches/vhffs-design/vhffs-panel/pgsql/index.pl 2007-05-22 08:44:05 UTC (rev 621)
+++ branches/vhffs-design/vhffs-panel/pgsql/index.pl 2007-05-22 11:38:50 UTC (rev 622)
@@ -0,0 +1,65 @@
+#!%PERL%
+# Copyright (c) vhffs project and its contributors
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+#3. Neither the name of vhffs nor the names of its contributors
+# may be used to endorse or promote products derived from this
+# software without specific prior written permission.
+#
+#THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+#"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+#LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+#FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+#COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+#INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+#BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+#LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+#CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+
+
+use POSIX qw(locale_h);
+use HTML::Template;
+use locale;
+use Locale::gettext;
+use strict;
+
+use lib '%VHFFS_LIB_DIR%';
+use Vhffs::Panel::Main;
+use Vhffs::Panel::Pgsql;
+
+my $panel = new Vhffs::Panel::Main();
+if(!$panel) {
+ exit 0;
+}
+
+my $vhffs = $panel->{vhffs};
+my $group = $panel->{group};
+
+if( ! defined($group) ) {
+ $panel->set_title( gettext('Error') );
+ $panel->add_error( gettext('You have to select a group first') );
+ $panel->display;
+} else {
+ # Group is in session => access is granted for user and group is activated
+ # no need to check
+ my $pgsql = Vhffs::Panel::Pgsql::getall_per_group( $vhffs, $group->get_gid );
+ if($pgsql < 0) {
+ $panel->add_error( gettext('Unable to get PgSQL databases') );
+ } else {
+ $panel->display($panel->create_service_index('pgsql', $pgsql));
+ }
+}
+
Property changes on: branches/vhffs-design/vhffs-panel/pgsql/index.pl
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/vhffs-design/vhffs-panel/repository/index.pl
===================================================================
--- branches/vhffs-design/vhffs-panel/repository/index.pl 2007-05-22 08:44:05 UTC (rev 621)
+++ branches/vhffs-design/vhffs-panel/repository/index.pl 2007-05-22 11:38:50 UTC (rev 622)
@@ -0,0 +1,65 @@
+#!%PERL%
+# Copyright (c) vhffs project and its contributors
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+#3. Neither the name of vhffs nor the names of its contributors
+# may be used to endorse or promote products derived from this
+# software without specific prior written permission.
+#
+#THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+#"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+#LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+#FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+#COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+#INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+#BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+#LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+#CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+
+
+use POSIX qw(locale_h);
+use HTML::Template;
+use locale;
+use Locale::gettext;
+use strict;
+
+use lib '%VHFFS_LIB_DIR%';
+use Vhffs::Panel::Main;
+use Vhffs::Panel::Repository;
+
+my $panel = new Vhffs::Panel::Main();
+if(!$panel) {
+ exit 0;
+}
+
+my $vhffs = $panel->{vhffs};
+my $group = $panel->{group};
+
+if( ! defined($group) ) {
+ $panel->set_title( gettext('Error') );
+ $panel->add_error( gettext('You have to select a group first') );
+ $panel->display;
+} else {
+ # Group is in session => access is granted for user and group is activated
+ # no need to check
+ my $repos = Vhffs::Panel::Repository::getall_per_group( $vhffs, $group->get_gid );
+ if($repos < 0) {
+ $panel->add_error( gettext('Unable to get repositories') );
+ } else {
+ $panel->display($panel->create_service_index('repo', $repos));
+ }
+}
+
Property changes on: branches/vhffs-design/vhffs-panel/repository/index.pl
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/vhffs-design/vhffs-panel/svn/index.pl
===================================================================
--- branches/vhffs-design/vhffs-panel/svn/index.pl 2007-05-22 08:44:05 UTC (rev 621)
+++ branches/vhffs-design/vhffs-panel/svn/index.pl 2007-05-22 11:38:50 UTC (rev 622)
@@ -0,0 +1,65 @@
+#!%PERL%
+# Copyright (c) vhffs project and its contributors
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+#3. Neither the name of vhffs nor the names of its contributors
+# may be used to endorse or promote products derived from this
+# software without specific prior written permission.
+#
+#THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+#"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+#LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+#FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+#COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+#INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+#BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+#LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+#CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+
+
+use POSIX qw(locale_h);
+use HTML::Template;
+use locale;
+use Locale::gettext;
+use strict;
+
+use lib '%VHFFS_LIB_DIR%';
+use Vhffs::Panel::Main;
+use Vhffs::Panel::Svn;
+
+my $panel = new Vhffs::Panel::Main();
+if(!$panel) {
+ exit 0;
+}
+
+my $vhffs = $panel->{vhffs};
+my $group = $panel->{group};
+
+if( ! defined($group) ) {
+ $panel->set_title( gettext('Error') );
+ $panel->add_error( gettext('You have to select a group first') );
+ $panel->display;
+} else {
+ # Group is in session => access is granted for user and group is activated
+ # no need to check
+ my $svn = Vhffs::Panel::Svn::getall_per_group( $vhffs, $group->get_gid );
+ if($svn < 0) {
+ $panel->add_error( gettext('Unable to get SVN repositories') );
+ } else {
+ $panel->display($panel->create_service_index('svn', $svn));
+ }
+}
+
Property changes on: branches/vhffs-design/vhffs-panel/svn/index.pl
___________________________________________________________________
Name: svn:executable
+ *
Modified: branches/vhffs-design/vhffs-panel/templates/Makefile.am
===================================================================
--- branches/vhffs-design/vhffs-panel/templates/Makefile.am 2007-05-22 08:44:05 UTC (rev 621)
+++ branches/vhffs-design/vhffs-panel/templates/Makefile.am 2007-05-22 11:38:50 UTC (rev 622)
@@ -145,6 +145,7 @@
misc/history_part.tmpl \
misc/history.tmpl \
misc/infos.tmpl \
+ misc/service_index.tmpl \
misc/simplemsg.tmpl \
misc/welcome.tmpl \
mysql/create.tmpl \
Modified: branches/vhffs-design/vhffs-panel/templates/group/info.tmpl
===================================================================
--- branches/vhffs-design/vhffs-panel/templates/group/info.tmpl 2007-05-22 08:44:05 UTC (rev 621)
+++ branches/vhffs-design/vhffs-panel/templates/group/info.tmpl 2007-05-22 11:38:50 UTC (rev 622)
@@ -1,8 +1,9 @@
-<h1><tmpl_var name="TEXT_TITLE"></h1>
<div class="info_quota">
- <img src="/group/quota_used.pl?group=<tmpl_var name="GROUPNAME">" alt="quota used for <tmpl_var name="GROUPNAME">"/>
+ <div id="group_quota">
+ <img src="/themes/<tmpl_var name="THEME">/images/quota_progress.png" width="<tmpl_var name="QUOTA_WIDTH">" alt="<tmpl_var name="QUOTA_WIDTH">"/>
+ </div>
<br/>
- <tmpl_var name="QUOTA_VALUE">
+ <tmpl_var name="QUOTA_TEXT">
</div>
<tmpl_if name="MESSAGE">
Modified: branches/vhffs-design/vhffs-panel/templates/menu/group.tmpl
===================================================================
--- branches/vhffs-design/vhffs-panel/templates/menu/group.tmpl 2007-05-22 08:44:05 UTC (rev 621)
+++ branches/vhffs-design/vhffs-panel/templates/menu/group.tmpl 2007-05-22 11:38:50 UTC (rev 622)
@@ -1,19 +1,3 @@
- <a href="#" id="projectConfigurationMenuTitle"><tmpl_var name="TEXT_PROJECT"><tmpl_var name="PROJECTNAME"></a>
-
- <ul id="projectConfigurationMenu">
- <li id="projectConfiguration">
- <a href="/group/prefs.pl" title="<tmpl_var name="TEXT_CONFIG">">
- <tmpl_var name="TEXT_CONFIG">
- </a>
- </li>
-
- <tmpl_var name="WEB_MENU">
- <tmpl_var name="MYSQL_MENU">
- <tmpl_var name="PGSQL_MENU">
- <tmpl_var name="CVS_MENU">
- <tmpl_var name="SVN_MENU">
- <tmpl_var name="DNS_MENU">
- <tmpl_var name="MAIL_MENU">
- <tmpl_var name="MAILINGLIST_MENU">
- <tmpl_var name="REPOSITORY_MENU">
- </ul>
+<tmpl_loop name="MENU_ITEMS">
+<a href="/<tmpl_var name="SERVICE">/index.pl"><tmpl_var name="LABEL"></a>
+</tmpl_loop>
Modified: branches/vhffs-design/vhffs-panel/templates/menu/main.tmpl
===================================================================
--- branches/vhffs-design/vhffs-panel/templates/menu/main.tmpl 2007-05-22 08:44:05 UTC (rev 621)
+++ branches/vhffs-design/vhffs-panel/templates/menu/main.tmpl 2007-05-22 11:38:50 UTC (rev 622)
@@ -1,7 +1,7 @@
<div id="header">
<tmpl_if name="GROUPNAME">
<div id="group_menu">
- <span id="groupname"><a href="/panel.pl?project=<tmpl_var name="GROUPNAME">"><img src="/themes/<tmpl_var name="THEME">/images/projectcurrent.png" title="<tmpl_var name="CURRENT_GROUP_TEXT">" onmouseover="javascript:this.timer=helpTimeout('user_project');" onmouseout="javascript:window.clearTimeout(this.timer);"/></a> <tmpl_var name="CURRENT_GROUP_TEXT"> <tmpl_var name="GROUPNAME"></span>
+ <span id="groupname"><a href="/panel.pl?project=<tmpl_var name="GROUPNAME">"><img src="/themes/<tmpl_var name="THEME">/images/projectcurrent.png" title="<tmpl_var name="PROJECT_HOME_TEXT">" alt="<tmpl_var name="PROJECT_HOME_TEXT">" onmouseover="javascript:this.timer=helpTimeout('user_project');" onmouseout="javascript:window.clearTimeout(this.timer);"/></a> <tmpl_var name="CURRENT_GROUP_TEXT"> <tmpl_var name="GROUPNAME"></span>
</div>
</tmpl_if>
<div id="username_menu">
@@ -31,6 +31,13 @@
<span id="username" title="<tmpl_var name="TEXT_ACCOUNT">"><tmpl_var name="USERNAME"></span>
</div>
</div>
+<tmpl_if name="CONTEXTUAL_MENU">
+<div id="contextual_menu">
+<p>
+<tmpl_var name="CONTEXTUAL_MENU">
+</p>
+</div>
+</tmpl_if>
<div id="logo">
<a class="logomenu" href="/panel.pl">
<img src="/themes/<tmpl_var name="THEME">/images/logo.png" alt="logo"/>
Added: branches/vhffs-design/vhffs-panel/templates/misc/service_index.tmpl
===================================================================
--- branches/vhffs-design/vhffs-panel/templates/misc/service_index.tmpl 2007-05-22 08:44:05 UTC (rev 621)
+++ branches/vhffs-design/vhffs-panel/templates/misc/service_index.tmpl 2007-05-22 11:38:50 UTC (rev 622)
@@ -0,0 +1,15 @@
+<fieldset>
+ <legend><tmpl_var name="TEXT_TITLE"></legend>
+ <ul class="<tmpl_var name="SERVICE">List">
+ <tmpl_loop name="SERVICES">
+ <li><tmpl_var name="DISPLAYNAME">
+<tmpl_if name="active">
+ — <a href="/<tmpl_var name="SERVICE">/prefs.pl?name=<tmpl_var name="SERVERNAME">"><tmpl_var name="ADMIN_TEXT"></a> - <a href="/history.pl?OID=<tmpl_var name="OID">"><tmpl_var name="HISTORY_TEXT"></a>
+<tmpl_else>
+ (<tmpl_var name="state">)
+</tmpl_if>
+</li>
+ </tmpl_loop>
+ <li><a href="/<tmpl_var name="SERVICE">/create.pl"><tmpl_var name="NEW"></a></li>
+ </ul>
+</fieldset>
Added: branches/vhffs-design/vhffs-panel/themes/vhffs-ng/images/black.png
===================================================================
(Binary files differ)
Property changes on: branches/vhffs-design/vhffs-panel/themes/vhffs-ng/images/black.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: branches/vhffs-design/vhffs-panel/themes/vhffs-ng/images/cvsentry.png
===================================================================
(Binary files differ)
Modified: branches/vhffs-design/vhffs-panel/themes/vhffs-ng/images/dbentry.png
===================================================================
(Binary files differ)
Modified: branches/vhffs-design/vhffs-panel/themes/vhffs-ng/images/dnsentry.png
===================================================================
(Binary files differ)
Added: branches/vhffs-design/vhffs-panel/themes/vhffs-ng/images/help_bg.png
===================================================================
(Binary files differ)
Property changes on: branches/vhffs-design/vhffs-panel/themes/vhffs-ng/images/help_bg.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: branches/vhffs-design/vhffs-panel/themes/vhffs-ng/images/mailentry.png
===================================================================
(Binary files differ)
Modified: branches/vhffs-design/vhffs-panel/themes/vhffs-ng/images/mailingentry.png
===================================================================
(Binary files differ)
Added: branches/vhffs-design/vhffs-panel/themes/vhffs-ng/images/mysqlentry.png
===================================================================
(Binary files differ)
Property changes on: branches/vhffs-design/vhffs-panel/themes/vhffs-ng/images/mysqlentry.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: branches/vhffs-design/vhffs-panel/themes/vhffs-ng/images/quota_progress.png
===================================================================
(Binary files differ)
Property changes on: branches/vhffs-design/vhffs-panel/themes/vhffs-ng/images/quota_progress.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: branches/vhffs-design/vhffs-panel/themes/vhffs-ng/images/repositoryentry.png
===================================================================
(Binary files differ)
Added: branches/vhffs-design/vhffs-panel/themes/vhffs-ng/images/svnentry.png
===================================================================
(Binary files differ)
Property changes on: branches/vhffs-design/vhffs-panel/themes/vhffs-ng/images/svnentry.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: branches/vhffs-design/vhffs-panel/themes/vhffs-ng/images/tab.png
===================================================================
(Binary files differ)
Property changes on: branches/vhffs-design/vhffs-panel/themes/vhffs-ng/images/tab.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: branches/vhffs-design/vhffs-panel/themes/vhffs-ng/images/webentry.png
===================================================================
(Binary files differ)
Modified: branches/vhffs-design/vhffs-panel/themes/vhffs-ng/main.css
===================================================================
--- branches/vhffs-design/vhffs-panel/themes/vhffs-ng/main.css 2007-05-22 08:44:05 UTC (rev 621)
+++ branches/vhffs-design/vhffs-panel/themes/vhffs-ng/main.css 2007-05-22 11:38:50 UTC (rev 622)
@@ -10,9 +10,8 @@
h1
{
- padding-right: 2em;
font-size: 3em;
- text-align: right;
+ text-align: center;
}
#chooselang img
@@ -99,105 +98,6 @@
left:0.2em;
}
-/* CSS du menu horizontal, bieler batiste */
-
-#menu{
- position:fixed;
- display:block;
- margin:0;
- padding:0;
- top:1.5em;
- width:100%;
- height:1.5em;
- background-color:#dcdad5;
- border-bottom:2px ridge black;
- border-top:2px ridge black;
-}
-
-#menu ul{
- position:absolute;
- display:block;
- width:14.5em;
- /*margin:0;*/
- padding:0;
- background-color:#dcdad5;
- border-color: black #dcdad5 #dcdad5 black;
- border-style: solid ridge ridge solid;
- border-width: 1px 3px 3px 1px;
- }
-
-#menu li ul{
- visibility:hidden;
- }
-
-#menu li li ul{
- position:absolute;
- margin-left:14.5em;
- margin-top:-23px;
- }
-
-#menu li li li ul {
- margin-left:-14.5em;
-}
-
-#menu li{
- list-style:none;
- width:200px;
- height:auto;
- display:inline;
- display/**/:block;
- float:none;
- float/**/:left;
- margin:0;
- padding:0;
- }
-
-#menu li li{
- display:block;
- float:none;
- }
-
-/* correct a little IE bug */
-html #menu li li{
- display:inline;
-}
-
-#menu a{
- text-align:left;
- color:#000;
- display:block;
- width:14.5em;
- text-decoration:none;
- padding:2px 0;
- margin:1px;
-}
-
-#menu>li>a {
- text-align:center;
-}
-
-#menu a[href="#"]
-{
- cursor:default;
-}
-
-#menu a:hover {
- background-color: #4b6983;
- color: white;
- }
-
-/* for a mozilla better display with key nav */
-#menu a:focus {
- background-color:#4b6983;
- color:white;
-}
-
-#menu a.linkOver{
- background-color:#4b6983;
- color:white;
-}
-
-
body a
{
color: black;
@@ -262,13 +162,34 @@
padding-left: 0;
text-align: center;
height: 3em;
- background-color: black;
+ background-color: white;
+ border-bottom:1px solid black;
padding-top: 0;
- color: white;
z-index:1;
display: block;
}
+#contextual_menu {
+ position:fixed;
+ width:575px;
+ height:2em;
+ top:3em;
+ left:50%;
+ margin-left:-287px;
+ z-index:2;
+ text-align:center;
+ background:url('images/tab.png') no-repeat right bottom;
+}
+
+#contextual_menu p {
+ margin: 0 0 0 0;
+ padding: 0.5em 1em 0 1em;
+}
+
+#contextual_menu p a {
+ margin-right:0.1em;
+}
+
div#username_menu {
width:350px;
text-align:right;
@@ -287,7 +208,6 @@
#groupname {
font-style:italic;
font-size:large;
- color: white;
}
#groupname img {
@@ -694,7 +614,7 @@
width:575px;
margin-left:auto;
margin-right:auto;
- padding-top:3em;
+ padding-top:5em;
padding-left:0px;
padding-right:0px;
}
@@ -708,7 +628,8 @@
height:300px;
overflow:auto;
border: 1px outset black;
- background-color:#e1e1f2;
+ background: url('images/help_bg.png') repeat-x top;
+
}
#help h1 {
@@ -749,6 +670,42 @@
list-style-image: url('images/projectcontribentry.png');
}
+ul.webList {
+ list-style-image: url('images/webentry.png');
+}
+
+ul.mailList {
+ list-style-image: url('images/mailentry.png');
+}
+
+ul.mailingList {
+ list-style-image: url('images/mailingentry.png');
+}
+
+ul.mysqlList {
+ list-style-image: url('images/dbentry.png');
+}
+
+ul.pgsqlList {
+ list-style-image: url('images/dbentry.png');
+}
+
+ul.repoList {
+ list-style-image: url('images/dbentry.png');
+}
+
+ul.svnList {
+ list-style-image: url('images/svnentry.png');
+}
+
+ul.cvsList {
+ list-style-image: url('images/cvsentry.png');
+}
+
+ul.dnsList {
+ list-style-image: url('images/dnsentry.png');
+}
+
div.acltable * {
margin:0;
padding:0;
@@ -802,3 +759,15 @@
overflow:hidden;
}
+div#group_quota {
+ width:300px;
+ margin-left: auto;
+ margin-right:auto;
+ border:1px solid black;
+ height:15px;
+ text-align:left;
+}
+
+div#group_quota>img {
+ height:15px;
+}
Added: branches/vhffs-design/vhffs-panel/web/index.pl
===================================================================
--- branches/vhffs-design/vhffs-panel/web/index.pl 2007-05-22 08:44:05 UTC (rev 621)
+++ branches/vhffs-design/vhffs-panel/web/index.pl 2007-05-22 11:38:50 UTC (rev 622)
@@ -0,0 +1,65 @@
+#!%PERL%
+# Copyright (c) vhffs project and its contributors
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+#3. Neither the name of vhffs nor the names of its contributors
+# may be used to endorse or promote products derived from this
+# software without specific prior written permission.
+#
+#THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+#"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+#LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+#FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+#COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+#INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+#BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+#LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+#CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+
+
+use POSIX qw(locale_h);
+use HTML::Template;
+use locale;
+use Locale::gettext;
+use strict;
+
+use lib '%VHFFS_LIB_DIR%';
+use Vhffs::Panel::Main;
+use Vhffs::Panel::Web;
+
+my $panel = new Vhffs::Panel::Main();
+if(!$panel) {
+ exit 0;
+}
+
+my $vhffs = $panel->{vhffs};
+my $group = $panel->{group};
+
+if( ! defined($group) ) {
+ $panel->set_title( gettext('Error') );
+ $panel->add_error( gettext('You have to select a group first') );
+ $panel->display;
+} else {
+ # Group is in session => access is granted for user and group is activated
+ # no need to check
+ my $web = Vhffs::Panel::Web::getall_per_group( $vhffs, $group->get_gid );
+ if($web < 0) {
+ $panel->add_error( gettext('Unable to get webareas') );
+ } else {
+ $panel->display($panel->create_service_index('web', $web));
+ }
+}
+
Property changes on: branches/vhffs-design/vhffs-panel/web/index.pl
___________________________________________________________________
Name: svn:executable
+ *