Fixed the group count for to show delete icon in the list

This commit is contained in:
mdtrooper 2014-09-16 15:35:28 +02:00
parent fbb99fbd0c
commit 72257865b5
2 changed files with 21 additions and 13 deletions

View File

@ -294,7 +294,9 @@ $table->width = '98%';
$all_parents = array();
$groups_count = 0;
$sons = array();
$groups_aux = array();
foreach ($groups as $k => $g) {
if ($g['parent'] != 0) {
$all_parents[$g['parent']] = $g['parent'];
@ -310,7 +312,8 @@ foreach ($all_parents as $parent) {
}
}
$groups_count = count($groups_aux);
$groups_count = count($groups);
if (check_acl($config['id_user'], 0, "PM")) {
echo '<br />';

View File

@ -1488,6 +1488,11 @@ function groups_get_group_to_list($group, $groups_count, &$symbolBranchs) {
'id_group=' . $group['id_grupo'] . '&' .
'delete_group=1" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">' . html_print_image("images/cross.png", true, array("alt" => __('Delete'), "border" => '0'));
}
else {
$data[5] .= '&nbsp;&nbsp;' .
ui_print_help_tip(
__('You can not delete the last group in Pandora. A common installation must has almost one group.'), true);
}
}
return $data;