mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 08:45:12 +02:00
[Secondary groups] Added secondary groups to agent view
This commit is contained in:
parent
f6e03c0faa
commit
5dec329941
@ -327,6 +327,22 @@ if (enterprise_installed()) {
|
||||
}
|
||||
|
||||
$table_data->data[] = $data;
|
||||
|
||||
$data = array();
|
||||
$data[0] = '<b>' . __('Secondary groups') . '</b>';
|
||||
$secondary_groups = enterprise_hook('agents_get_secondary_groups', array($id_agente));
|
||||
if (!$secondary_groups) {
|
||||
$data[1] = '<em>' . __('N/A') . '</em>';
|
||||
}
|
||||
else {
|
||||
$secondary_links = array();
|
||||
foreach ($secondary_groups['for_select'] as $id => $name) {
|
||||
$secondary_links[] = '<a href="index.php?sec=estado&sec2=operation/agentes/estado_agente&refr=60&group_id='.$id.'">'.$name.'</a>';
|
||||
}
|
||||
$data[1] = implode(', ', $secondary_links);
|
||||
}
|
||||
|
||||
$table_data->data[] = $data;
|
||||
}
|
||||
|
||||
if ($config['activate_gis'] || $agent['url_address'] != '') {
|
||||
|
Loading…
x
Reference in New Issue
Block a user