From 2bda651377b3f2d9067f363c4656dff23301b32a Mon Sep 17 00:00:00 2001 From: m-lopez-f Date: Wed, 25 Nov 2015 08:44:29 +0100 Subject: [PATCH] Fixed problems with includes javascript when enter in list of gis map. Tiquet: #2935 --- .../operation/gis_maps/gis_map.php | 73 +++++++++++++++++++ pandora_console/operation/menu.php | 2 +- 2 files changed, 74 insertions(+), 1 deletion(-) create mode 100644 pandora_console/operation/gis_maps/gis_map.php diff --git a/pandora_console/operation/gis_maps/gis_map.php b/pandora_console/operation/gis_maps/gis_map.php new file mode 100644 index 0000000000..47527f42d7 --- /dev/null +++ b/pandora_console/operation/gis_maps/gis_map.php @@ -0,0 +1,73 @@ +width = "100%"; +$table->class = "databox data"; +$table->data = array (); +$table->head = array (); +$table->head[0] = __('Name'); +$table->head[1] = __('Group'); +$table->align = array (); +$table->align[1] = 'left'; + +$rowPair = true; +$iterator = 0; + +if ($maps !== false) { + foreach ($maps as $map) { + if (!check_acl ($config["id_user"], $map["group_id"], "IR", 0, true)) { + continue; + } + + if ($rowPair) + $table->rowclass[$iterator] = 'rowPair'; + else + $table->rowclass[$iterator] = 'rowOdd'; + $rowPair = !$rowPair; + $iterator++; + + $data = array (); + + $data[0] = '' . $map['map_name'].' '; + $data[1] = ui_print_group_icon ($map["group_id"], true); + + array_push ($table->data, $data); + } +} + +if (!empty ($table->data)) { + html_print_table ($table); +} +else { + echo '
' . __('No maps found') . '
'; +} +unset ($table); +?> diff --git a/pandora_console/operation/menu.php b/pandora_console/operation/menu.php index 3452f0166b..cc8a891b56 100644 --- a/pandora_console/operation/menu.php +++ b/pandora_console/operation/menu.php @@ -189,7 +189,7 @@ if (check_acl ($config['id_user'], 0, "AR")) { //INI GIS Maps if ($config['activate_gis']) { $menu_operation["gismaps"]["text"] = __('GIS Maps'); - $menu_operation["gismaps"]["sec2"] = "operation/gis_maps/index"; + $menu_operation["gismaps"]["sec2"] = "operation/gis_maps/gis_map"; $menu_operation["gismaps"]["refr"] = 0; $menu_operation["gismaps"]["id"] = "oper-gismaps";