Commit fd7ec79b authored by Ad Schellevis's avatar Ad Schellevis

oops... broke the header links, fixed it so it should work for both the status...

oops... broke the header links, fixed it so it should work for both the status page and the default header.
parent 39628a1a
<?php
global $shortcuts;
$shortcuts['upnp'] = array();
$shortcuts['upnp']['main'] = "pkg_edit.php?xml=miniupnpd.xml";
$shortcuts['upnp']['log'] = "diag_logs_routing.php";
$shortcuts['upnp']['status'] = "status_upnp.php";
$shortcuts['upnp']['service'] = "miniupnpd";
......@@ -87,6 +87,9 @@ function get_shortcut_main_link($shortcut_section, $addspace = true, $service =
break;
}
if(!empty($link) && ($_SERVER['REQUEST_URI'] != "/{$link}"))
if (strtok($_SERVER['REQUEST_URI'],'?') != "/status_services.php")
return "{$space}<a href=\"{$link}\" title=\"" . gettext("Main page for this section") . "\">Main page</a>";
else
return "{$space}<a href=\"{$link}\" class=\"btn btn-default\" data-toggle=\"tooltip\" data-placement=\"bottom\" title=\"" . gettext("Main page for this section") . "\"><span class=\"glyphicon glyphicon-home\"></span></a>";
}
......@@ -111,6 +114,9 @@ function get_shortcut_status_link($shortcut_section, $addspace = true, $service
break;
}
if(!empty($link))
if (strtok($_SERVER['REQUEST_URI'],'?') != "/status_services.php")
return "{$space}<a href=\"{$link}\" title=\"" . gettext("Status of items on this page") . "\">Status</a>";
else
return "{$space}<a href=\"{$link}\" class=\"btn btn-default\" data-toggle=\"tooltip\" data-placement=\"bottom\" title=\"" . gettext("Status of items on this page") . "\"><span class=\"glyphicon glyphicon-eye-open\"></span></a>";
}
......@@ -118,17 +124,19 @@ function get_shortcut_log_link($shortcut_section, $addspace = true) {
global $g, $shortcuts;
$space = ($addspace) ? "&nbsp;" : "" ;
if(!empty($shortcut_section) && !empty($shortcuts[$shortcut_section]['log'])) {
if (strtok($_SERVER['REQUEST_URI'],'?') != "/status_services.php")
return "{$space}<a href=\"{$shortcuts[$shortcut_section]['log']}\" title=\"" . gettext("Log entries for items on this page") . "\">Log</a>";
else
return "{$space}<a href=\"{$shortcuts[$shortcut_section]['log']}\" class=\"btn btn-default\" data-toggle=\"tooltip\" data-placement=\"bottom\" title=\"" . gettext("Log entries for items on this page") . "\"><span class=\"glyphicon glyphicon-list\"></span></a>";
}
}
// Load shortcuts
$dir_array = get_shortcut_files("/usr/local/pkg/shortcuts");
foreach ($dir_array as $file) {
if (!is_dir("/usr/local/pkg/shortcuts/{$file}") && stristr($file,".inc")) {
include("/usr/local/pkg/shortcuts/{$file}");
}
}
$shortcuts['upnp'] = array();
$shortcuts['upnp']['main'] = "pkg_edit.php?xml=miniupnpd.xml";
$shortcuts['upnp']['log'] = "diag_logs_routing.php";
$shortcuts['upnp']['status'] = "status_upnp.php";
$shortcuts['upnp']['service'] = "miniupnpd";
$shortcuts['relayd'] = array();
$shortcuts['relayd']['main'] = "load_balancer_pool.php";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment