Always group All in custom reports and custom graphs
This commit is contained in:
parent
fd04125011
commit
68ae6e3112
|
@ -116,13 +116,12 @@ if ($edit_graph) {
|
|||
echo ">";
|
||||
|
||||
$own_info = get_user_info ($config['id_user']);
|
||||
$return_all_groups = $own_info['is_admin'] || users_can_manage_group_all("RR");
|
||||
|
||||
echo "<td><b>".__('Group')."</b></td><td>";
|
||||
if (check_acl ($config['id_user'], 0, "RW"))
|
||||
echo html_print_select_groups($config['id_user'], 'RW', $return_all_groups, 'graph_id_group', $id_group, '', '', '', true);
|
||||
echo html_print_select_groups($config['id_user'], 'RW', true, 'graph_id_group', $id_group, '', '', '', true);
|
||||
elseif (check_acl ($config['id_user'], 0, "RM"))
|
||||
echo html_print_select_groups($config['id_user'], 'RM', $return_all_groups, 'graph_id_group', $id_group, '', '', '', true);
|
||||
echo html_print_select_groups($config['id_user'], 'RM', true, 'graph_id_group', $id_group, '', '', '', true);
|
||||
echo "</td></tr>";
|
||||
echo "<tr>";
|
||||
echo "<td class='datos2'><b>".__('Description')."</b></td>";
|
||||
|
|
|
@ -32,7 +32,6 @@ if (!$report_r && !$report_w && !$report_m) {
|
|||
}
|
||||
|
||||
$access = ($report_r == true) ? 'RR' : (($report_w == true) ? 'RW' : (($report_m == true) ? 'RM' : 'RR'));
|
||||
$manage_group_all = users_can_manage_group_all($access);
|
||||
|
||||
$activeTab = get_parameter('tab', 'main');
|
||||
|
||||
|
@ -189,14 +188,14 @@ if (!empty ($graphs)) {
|
|||
$data[3] = ui_print_group_icon($graph['id_group'],true);
|
||||
|
||||
$data[4] = '';
|
||||
if (($report_w || $report_m) && $manage_group_all) {
|
||||
if (($report_w || $report_m)) {
|
||||
$data[4] = '<a href="index.php?sec=reporting&sec2=godmode/reporting/graph_builder&edit_graph=1&id='.
|
||||
$graph['id_graph'].'">'.html_print_image("images/config.png", true).'</a>';
|
||||
}
|
||||
|
||||
$data[4] .= ' ';
|
||||
|
||||
if ($report_m && $manage_group_all) {
|
||||
if ($report_m) {
|
||||
$data[4] .= '<a href="index.php?sec=reporting&sec2=godmode/reporting/graphs&delete_graph=1&id='
|
||||
.$graph['id_graph'].'" onClick="if (!confirm(\''.__('Are you sure?').'\'))
|
||||
return false;">' . html_print_image("images/cross.png", true, array('alt' => __('Delete'), 'title' => __('Delete'))) . '</a>' .
|
||||
|
|
|
@ -69,7 +69,7 @@ $table->data['name'][1] = html_print_input_text('name', $reportName,
|
|||
$table->data['group'][0] = __('Group');
|
||||
|
||||
$write_groups = users_get_groups_for_select(false, "RW",
|
||||
users_can_manage_group_all("RW"), true, false, 'id_grupo');
|
||||
true, true, false, 'id_grupo');
|
||||
|
||||
// If the report group is not among the RW groups (special permission) we add it
|
||||
if (!isset($write_groups[$idGroupReport]) && $idGroupReport) {
|
||||
|
|
Loading…
Reference in New Issue