diff options
author | jim-p <jimp@pfsense.org> | 2012-08-10 11:48:09 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2012-08-10 11:48:09 -0400 |
commit | 76692ad2a13c455128d9f51d78c5f0d2062d4267 (patch) | |
tree | 8ebf14d3cd0e2d8e68614b9d49b273e245d47b88 /usr/local/www/fbegin.inc | |
parent | b1460af34a50e85a055f228ba281307c80e3cd78 (diff) | |
download | pfsense-76692ad2a13c455128d9f51d78c5f0d2062d4267.zip pfsense-76692ad2a13c455128d9f51d78c5f0d2062d4267.tar.gz |
Start revamp of shortcuts, central file to hold links, also service status/control, added to dns forwarder as example.
Diffstat (limited to 'usr/local/www/fbegin.inc')
-rwxr-xr-x | usr/local/www/fbegin.inc | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/usr/local/www/fbegin.inc b/usr/local/www/fbegin.inc index 1fa9a18..cc205cd 100755 --- a/usr/local/www/fbegin.inc +++ b/usr/local/www/fbegin.inc @@ -13,6 +13,8 @@ if (self === top) { var antiClickjack = document.getElementById("antiClickjack") require_once("globals.inc"); require_once("functions.inc"); +require_once("shortcuts.inc"); +require_once("service-utils.inc"); /* $Id$ */ @@ -380,19 +382,26 @@ function add_to_menu($url, $name) { if (isAllowedPage($url)) echo "<li><a href=\"{$url}\" class=\"navlnk\">{$name}</a></li>\n"; } + ?> <div> <span class="pgtitle"><a href="<?= $_SERVER['SCRIPT_NAME'] ?>"><?=genhtmltitle($pgtitle);?></a></span> -<span style="float:right; margin: 0 0 20px 20px;"> -<?php if(! empty($statusurl)): ?> -<a href="<?php echo $statusurl; ?>" title="<?php echo gettext("Status of items on this page."); ?>"><img src="/themes/<?php echo $g['theme']; ?>/images/status.png" border="0"></a> +<span style="float:right; margin: 0 0 20px 20px"> +<?php +if (!$hide_service_status && !empty($shortcuts[$shortcut_section]['service'])) { + $ssvc = find_service_by_name($shortcuts[$shortcut_section]['service']); + echo get_service_status_icon($ssvc, false); + echo get_service_control_links($ssvc); +} ?> +<?php if(!empty($shortcut_section) && !empty($shortcuts[$shortcut_section]['status'])): ?> +<a href="<?php echo $shortcuts[$shortcut_section]['status']; ?>" title="<?php echo gettext("Status of items on this page."); ?>"><img style="vertical-align:middle" src="/themes/<?php echo $g['theme']; ?>/images/status.png" border="0"></a> <?php endif; ?> -<?php if(! empty($logurl)): ?> -<a href="<?php echo $logurl; ?>" title="<?php echo gettext("Log entries for items on this page."); ?>"><img src="/themes/<?php echo $g['theme']; ?>/images/log.png" border="0"></a> +<?php if(!empty($shortcut_section) && !empty($shortcuts[$shortcut_section]['log'])): ?> +<a href="<?php echo $shortcuts[$shortcut_section]['log']; ?>" title="<?php echo gettext("Log entries for items on this page."); ?>"><img style="vertical-align:middle" src="/themes/<?php echo $g['theme']; ?>/images/log.png" border="0"></a> <?php endif; ?> <?php if(! $g['disablehelpicon']): ?> -<a href="<?php echo $helpurl; ?>" title="<?php echo gettext("Help for items on this page."); ?>"><img src="/themes/<?php echo $g['theme']; ?>/images/help.png" border="0"></a> +<a href="<?php echo $helpurl; ?>" title="<?php echo gettext("Help for items on this page."); ?>"><img style="vertical-align:middle" src="/themes/<?php echo $g['theme']; ?>/images/help.png" border="0"></a> <?php endif; ?> </span> </div> |