mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
Use mobile navitagion in VC items while using mobile view
This commit is contained in:
parent
025288d9fe
commit
ac8af7ee52
@ -1058,6 +1058,16 @@ class Item extends CachedModel
|
|||||||
{
|
{
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
|
$mobile_navigation = false;
|
||||||
|
|
||||||
|
if (isset($_SERVER['PHP_SELF']) === true
|
||||||
|
&& (strstr($_SERVER['PHP_SELF'], 'mobile/') !== false
|
||||||
|
|| strstr($_SERVER['HTTP_REFERER'], 'mobile/') !== false)
|
||||||
|
) {
|
||||||
|
$mobile_navigation = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
error_log(obhd($_SERVER['PHP_SELF']));
|
||||||
// Load side libraries.
|
// Load side libraries.
|
||||||
include_once $config['homedir'].'/include/functions_ui.php';
|
include_once $config['homedir'].'/include/functions_ui.php';
|
||||||
if (\is_metaconsole()) {
|
if (\is_metaconsole()) {
|
||||||
@ -1070,6 +1080,7 @@ class Item extends CachedModel
|
|||||||
$linkedAgent = static::extractLinkedAgent($data);
|
$linkedAgent = static::extractLinkedAgent($data);
|
||||||
|
|
||||||
$baseUrl = \ui_get_full_url('index.php');
|
$baseUrl = \ui_get_full_url('index.php');
|
||||||
|
$mobileUrl = \ui_get_full_url('mobile/index.php');
|
||||||
|
|
||||||
// TODO: There's a feature to get the link from the label.
|
// TODO: There's a feature to get the link from the label.
|
||||||
if (static::$useLinkedVisualConsole === true
|
if (static::$useLinkedVisualConsole === true
|
||||||
@ -1117,6 +1128,15 @@ class Item extends CachedModel
|
|||||||
* We are in a regular console.
|
* We are in a regular console.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
if ($mobile_navigation === true) {
|
||||||
|
return $mobileUrl.'?'.http_build_query(
|
||||||
|
[
|
||||||
|
'page' => 'visualmap',
|
||||||
|
'id' => $vcId,
|
||||||
|
]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return $baseUrl.'?'.http_build_query(
|
return $baseUrl.'?'.http_build_query(
|
||||||
[
|
[
|
||||||
'sec' => 'network',
|
'sec' => 'network',
|
||||||
@ -1190,6 +1210,15 @@ class Item extends CachedModel
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($mobile_navigation === true) {
|
||||||
|
return $mobileUrl.'?'.http_build_query(
|
||||||
|
[
|
||||||
|
'page' => 'module_graph',
|
||||||
|
'id' => $moduleId,
|
||||||
|
]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return $baseUrl.'?'.http_build_query($queryParams);
|
return $baseUrl.'?'.http_build_query($queryParams);
|
||||||
} else if (\is_metaconsole() && \can_user_access_node()) {
|
} else if (\is_metaconsole() && \can_user_access_node()) {
|
||||||
/*
|
/*
|
||||||
@ -1265,6 +1294,15 @@ class Item extends CachedModel
|
|||||||
* We are in a regular console.
|
* We are in a regular console.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
if ($mobile_navigation === true) {
|
||||||
|
return $mobileUrl.'?'.http_build_query(
|
||||||
|
[
|
||||||
|
'page' => 'agent',
|
||||||
|
'id' => $agentId,
|
||||||
|
]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return $baseUrl.'?'.http_build_query(
|
return $baseUrl.'?'.http_build_query(
|
||||||
[
|
[
|
||||||
'sec' => 'estado',
|
'sec' => 'estado',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user