Added a sub-menu on the device list page to enable quick access to features

This commit is contained in:
laf
2015-02-03 21:35:34 +00:00
parent e77daabeb5
commit 6e7c095bde
4 changed files with 51 additions and 16 deletions

View File

@@ -0,0 +1,31 @@
<?php
/*
* LibreNMS
*
* Copyright (c) 2014 Neil Lathwood <https://github.com/laf/ http://www.lathwood.co.uk/fa>
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
echo('<td><div class="collapse navbar-collapse" id="navHeaderCollapse">
<div class="btn-group">
<button type="button" class="btn btn-sm btn-danger dropdown-toggle" data-toggle="dropdown" aria-expand="false">Action <span class="caret"></span></button>
<ul class="dropdown-menu dropdown-menu-right">');
if (device_permitted($device['device_id'])) {
echo '<li><a href="'.generate_device_url($device).'"> <img src="images/16/server.png" border="0" align="absmiddle" /> View device</a></li>';
echo '<li><a href="'.generate_device_url($device, array('tab' => 'alerts')).'"> <img src="images/16/bell.png" border="0" align="absmiddle" /> View alerts</a></li>';
if ($_SESSION['userlevel'] >= "7") {
echo '<li><a href="'.generate_device_url($device, array('tab' => 'edit')).'"> <img src="images/16/wrench.png" border="0" align="absmiddle" /> Edit device</a></li>';
}
}
echo('
</ul>
</div>
</div></td>');
?>