mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-30 01:05:39 +02:00
Fixed the group count for to show delete icon in the list
This commit is contained in:
parent
fd06798936
commit
14fa3116f0
@ -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 />';
|
||||
|
@ -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] .= ' ' .
|
||||
ui_print_help_tip(
|
||||
__('You can not delete the last group in Pandora. A common installation must has almost one group.'), true);
|
||||
}
|
||||
}
|
||||
|
||||
return $data;
|
||||
|
Loading…
x
Reference in New Issue
Block a user