[vhffs-dev] [1921] fixed services order in group summary view |
[ Thread Index |
Date Index
| More vhffs.org/vhffs-dev Archives
]
Revision: 1921
Author: gradator
Date: 2012-01-22 02:09:23 +0100 (Sun, 22 Jan 2012)
Log Message:
-----------
fixed services order in group summary view
Modified Paths:
--------------
trunk/TODO
trunk/vhffs-api/src/Vhffs/Panel/Group.pm
trunk/vhffs-panel/templates/group/info.tt
Modified: trunk/TODO
===================================================================
--- trunk/TODO 2012-01-22 00:37:37 UTC (rev 1920)
+++ trunk/TODO 2012-01-22 01:09:23 UTC (rev 1921)
@@ -14,8 +14,6 @@
tester les tags
-ordre des objets dans le menu view du groupe
-
clean description new object (\r)
corriger tableau ACL
Modified: trunk/vhffs-api/src/Vhffs/Panel/Group.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Panel/Group.pm 2012-01-22 00:37:37 UTC (rev 1920)
+++ trunk/vhffs-api/src/Vhffs/Panel/Group.pm 2012-01-22 01:09:23 UTC (rev 1921)
@@ -364,8 +364,7 @@
my $vars = { group => $group };
my $config = $vhffs->get_config;
my $groups_config = $config->get_groups;
- my $services = {};
- my $services_help = {};
+ my @services;
my $services_labels = {
cvs => 'CVS repositories',
dns => 'Domain names',
@@ -391,12 +390,14 @@
eval("require $module;");
{
no strict 'refs';
- $services->{$s} = &{"$module\::getall_per_group"}($vhffs, $group->get_gid);
- $services_help->{$s} = $config->get_service($s)->{url_doc} if defined $config->get_service($s)->{url_doc};
+ my $ss = {};
+ $ss->{name} = $s;
+ $ss->{help} = $config->get_service($s)->{url_doc};
+ $ss->{items} = &{"$module\::getall_per_group"}($vhffs, $group->get_gid);
+ push @services, $ss;
}
}
- $vars->{services} = $services;
- $vars->{services_help} = $services_help;
+ $vars->{services} = \@services;
$vars->{services_labels} = $services_labels;
$panel->render('group/info.tt', $vars);
Modified: trunk/vhffs-panel/templates/group/info.tt
===================================================================
--- trunk/vhffs-panel/templates/group/info.tt 2012-01-22 00:37:37 UTC (rev 1920)
+++ trunk/vhffs-panel/templates/group/info.tt 2012-01-22 01:09:23 UTC (rev 1921)
@@ -16,10 +16,10 @@
</ul>
</fieldset>
-[% FOREACH service_name IN services.keys %]
+[% FOREACH service IN services %]
[% INCLUDE 'misc/service-index.tt'
- type = service_name
- label = services_labels.item(service_name)
- help_url = services_help.item(service_name)
- list = services.item(service_name) %]
+ type = service.name
+ label = services_labels.item(service.name)
+ help_url = service.help
+ list = service.items %]
[% END %]