mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-30 01:05:39 +02:00
#9662 Fixed gis map menu
This commit is contained in:
parent
0959f1a537
commit
94c843dac2
@ -68,6 +68,11 @@ function menu_print_menu(&$menu)
|
|||||||
$sec2 = 'godmode/alerts/alert_commands';
|
$sec2 = 'godmode/alerts/alert_commands';
|
||||||
} else if ($sec2 === 'enterprise/godmode/setup/edit_skin') {
|
} else if ($sec2 === 'enterprise/godmode/setup/edit_skin') {
|
||||||
$sec2 = 'enterprise/godmode/setup/setup_skins';
|
$sec2 = 'enterprise/godmode/setup/setup_skins';
|
||||||
|
} else if ($sec2 === 'operation/gis_maps/render_view') {
|
||||||
|
$map_id = (int) get_parameter('map_id');
|
||||||
|
if (empty($map_id) === false) {
|
||||||
|
$sec2 .= '&map_id='.$map_id;
|
||||||
|
}
|
||||||
} else if ($sec2 === 'godmode/servers/discovery') {
|
} else if ($sec2 === 'godmode/servers/discovery') {
|
||||||
$wiz = (string) get_parameter('wiz');
|
$wiz = (string) get_parameter('wiz');
|
||||||
$sec2 = 'godmode/servers/discovery&wiz='.$wiz;
|
$sec2 = 'godmode/servers/discovery&wiz='.$wiz;
|
||||||
|
@ -21,23 +21,35 @@ global $config;
|
|||||||
|
|
||||||
require_once 'include/functions_gis.php';
|
require_once 'include/functions_gis.php';
|
||||||
|
|
||||||
// ui_require_javascript_file('openlayers.pandora');
|
|
||||||
$buttons['gis_maps_list'] = [
|
$buttons['gis_maps_list'] = [
|
||||||
'active' => true,
|
'active' => true,
|
||||||
'text' => '<a href="index.php?sec=godgismaps&sec2=operation/gis_maps/gis_map">'.html_print_image(
|
'text' => '<a href="index.php?sec=godgismaps&sec2=operation/gis_maps/gis_map">'.html_print_image(
|
||||||
'images/list.png',
|
'images/logs@svg.svg',
|
||||||
true,
|
true,
|
||||||
['title' => __('GIS Maps list')]
|
[
|
||||||
|
'title' => __('GIS Maps list'),
|
||||||
|
'class' => 'main_menu_icon invert_filter',
|
||||||
|
]
|
||||||
).'</a>',
|
).'</a>',
|
||||||
];
|
];
|
||||||
|
|
||||||
ui_print_page_header(
|
ui_print_standard_header(
|
||||||
__('GIS Maps'),
|
__('GIS Maps'),
|
||||||
'images/op_gis.png',
|
'images/op_gis.png',
|
||||||
false,
|
false,
|
||||||
'',
|
'',
|
||||||
false,
|
false,
|
||||||
$buttons
|
$buttons,
|
||||||
|
[
|
||||||
|
[
|
||||||
|
'link' => '',
|
||||||
|
'label' => __('Topology maps'),
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'link' => '',
|
||||||
|
'label' => __('GIS Maps'),
|
||||||
|
],
|
||||||
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
$own_info = get_user_info($config['id_user']);
|
$own_info = get_user_info($config['id_user']);
|
||||||
|
@ -116,33 +116,34 @@ $controls = [
|
|||||||
|
|
||||||
$layers = gis_get_layers($idMap);
|
$layers = gis_get_layers($idMap);
|
||||||
|
|
||||||
// Render map
|
// Render map.
|
||||||
$has_management_acl = check_acl_restricted_all($config['id_user'], $map['group_id'], 'MW')
|
$has_management_acl = check_acl_restricted_all($config['id_user'], $map['group_id'], 'MW')
|
||||||
|| check_acl_restricted_all($config['id_user'], $map['group_id'], 'MM');
|
|| check_acl_restricted_all($config['id_user'], $map['group_id'], 'MM');
|
||||||
|
|
||||||
$buttons = [];
|
$buttons = [];
|
||||||
|
|
||||||
$buttons['gis_maps_list'] = [
|
$buttons['gis_maps_list'] = [
|
||||||
'text' => '<a href="index.php?sec=godgismaps&sec2=operation/gis_maps/gis_map">'.html_print_image(
|
'active' => false,
|
||||||
'images/list.png',
|
'text' => '<a href="index.php?sec=godgismaps&sec2=operation/gis_maps/gis_map">'.html_print_image(
|
||||||
|
'images/logs@svg.svg',
|
||||||
true,
|
true,
|
||||||
[
|
[
|
||||||
'title' => __('GIS Maps list'),
|
'title' => __('GIS Maps list'),
|
||||||
'class' => 'invert_filter',
|
'class' => 'main_menu_icon invert_filter',
|
||||||
]
|
]
|
||||||
).'</a>',
|
).'</a>',
|
||||||
];
|
];
|
||||||
if ($config['pure'] == 0) {
|
if ($config['pure'] == 0) {
|
||||||
$buttons[]['text'] = '<a href="index.php?sec=gismaps&sec2=operation/gis_maps/render_view&map_id='.$idMap.'&refr='.((int) get_parameter('refr', 0)).'&pure=1">'.html_print_image('images/full_screen.png', true, ['title' => __('Full screen mode'), 'class' => 'invert_filter']).'</a>';
|
$buttons[]['text'] = '<a href="index.php?sec=gismaps&sec2=operation/gis_maps/render_view&map_id='.$idMap.'&refr='.((int) get_parameter('refr', 0)).'&pure=1">'.html_print_image('images/fullscreen@svg.svg', true, ['title' => __('Full screen mode'), 'class' => 'main_menu_icon invert_filter']).'</a>';
|
||||||
} else {
|
} else {
|
||||||
$buttons[]['text'] = '<a href="index.php?sec=gismaps&sec2=operation/gis_maps/render_view&map_id='.$idMap.'&refr='.((int) get_parameter('refr', 0)).'">'.html_print_image('images/normalscreen.png', true, ['title' => __('Back to normal mode'), 'class' => 'invert_filter']).'</a>';
|
$buttons[]['text'] = '<a href="index.php?sec=gismaps&sec2=operation/gis_maps/render_view&map_id='.$idMap.'&refr='.((int) get_parameter('refr', 0)).'">'.html_print_image('images/exit_fullscreen@svg.svg', true, ['title' => __('Back to normal mode'), 'class' => 'main_menu_icon invert_filter']).'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($has_management_acl) {
|
if ($has_management_acl === true) {
|
||||||
$hash = md5($config['dbpass'].$idMap.$config['id_user']);
|
$hash = md5($config['dbpass'].$idMap.$config['id_user']);
|
||||||
$buttons['public_link']['text'] = '<a href="'.ui_get_full_url(
|
$buttons['public_link']['text'] = '<a href="'.ui_get_full_url(
|
||||||
'operation/gis_maps/public_console.php?hash='.$hash.'&map_id='.$idMap.'&id_user='.$config['id_user']
|
'operation/gis_maps/public_console.php?hash='.$hash.'&map_id='.$idMap.'&id_user='.$config['id_user']
|
||||||
).'" target="_blank">'.html_print_image('images/camera_mc.png', true, ['title' => __('Show link to public GIS map'), 'class' => 'invert_filter']).'</a>';
|
).'" target="_blank">'.html_print_image('images/item-icon.svg', true, ['title' => __('Show link to public GIS map'), 'class' => 'main_menu_icon invert_filter']).'</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$times = [
|
$times = [
|
||||||
@ -170,17 +171,27 @@ $status = [
|
|||||||
$buttons[]['text'] = "<div class='mrgn_top_6px'>".__('Filter by status').': '.html_print_select($status, 'show_status', 'all', 'changeShowStatus(this.value);', '', 0, true, false, false).'</div>';
|
$buttons[]['text'] = "<div class='mrgn_top_6px'>".__('Filter by status').': '.html_print_select($status, 'show_status', 'all', 'changeShowStatus(this.value);', '', 0, true, false, false).'</div>';
|
||||||
|
|
||||||
if ($has_management_acl) {
|
if ($has_management_acl) {
|
||||||
$buttons['setup']['text'] = '<a href="index.php?sec=godgismaps&sec2=godmode/gis_maps/configure_gis_map&action=edit_map&map_id='.$idMap.'">'.html_print_image('images/setup.png', true, ['title' => __('Setup'), 'class' => 'invert_filter']).'</a>';
|
$buttons['setup']['text'] = '<a href="index.php?sec=godgismaps&sec2=godmode/gis_maps/configure_gis_map&action=edit_map&map_id='.$idMap.'">'.html_print_image('images/configuration@svg.svg', true, ['title' => __('Setup'), 'class' => 'main_menu_icon invert_filter']).'</a>';
|
||||||
$buttons['setup']['godmode'] = 1;
|
$buttons['setup']['godmode'] = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
ui_print_page_header(
|
ui_print_standard_header(
|
||||||
__('Map').' » '.__('Map').' '.$map['map_name'],
|
__('Map').' » '.__('Map').' '.$map['map_name'],
|
||||||
'images/op_gis.png',
|
'images/op_gis.png',
|
||||||
false,
|
false,
|
||||||
'render_view_tab',
|
'',
|
||||||
false,
|
false,
|
||||||
$buttons
|
$buttons,
|
||||||
|
[
|
||||||
|
[
|
||||||
|
'link' => '',
|
||||||
|
'label' => __('Topology maps'),
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'link' => '',
|
||||||
|
'label' => __('GIS Maps'),
|
||||||
|
],
|
||||||
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
$map_inline_style = 'width: 100%; min-height:500px; height: calc(100vh - 80px);';
|
$map_inline_style = 'width: 100%; min-height:500px; height: calc(100vh - 80px);';
|
||||||
|
@ -411,7 +411,7 @@ if ($access_console_node === true) {
|
|||||||
// INI GIS Maps.
|
// INI GIS Maps.
|
||||||
if ($config['activate_gis']) {
|
if ($config['activate_gis']) {
|
||||||
$sub['gismaps']['text'] = __('GIS Maps');
|
$sub['gismaps']['text'] = __('GIS Maps');
|
||||||
$sub['gismaps']['id'] = 'GIS Maps';
|
$sub['gismaps']['id'] = 'GIS_Maps';
|
||||||
$sub['gismaps']['type'] = 'direct';
|
$sub['gismaps']['type'] = 'direct';
|
||||||
$sub['gismaps']['subtype'] = 'nolink';
|
$sub['gismaps']['subtype'] = 'nolink';
|
||||||
$sub2 = [];
|
$sub2 = [];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user