Skip to content

Commit

Permalink
Merge pull request #2955 from arjitc/patch-24
Browse files Browse the repository at this point in the history
Merge launch, SSH, telnet and settings into 1 dropdown
  • Loading branch information
laf committed Feb 11, 2016
2 parents df0e34f + 9cd0820 commit a9e81c2
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions html/pages/device.inc.php
Expand Up @@ -398,19 +398,25 @@
}


echo '<li style="float: right;"><a href="https://'.$device['hostname'].'"><img src="images/16/http.png" alt="https" title="Launch browser to https://'.$device['hostname'].'" border="0" width="16" height="16" target="_blank"></a></li>
<li style="float: right;"><a href="ssh://'.$device['hostname'].'"><img src="images/16/ssh.png" alt="ssh" title="SSH to '.$device['hostname'].'" border="0" width="16" height="16"></a></li>
<li style="float: right;"><a href="telnet://'.$device['hostname'].'"><img src="images/16/telnet.png" alt="telnet" title="Telnet to '.$device['hostname'].'" border="0" width="16" height="16"></a></li>';

if ($_SESSION['userlevel'] >= '7') {
echo '<li class="'.$select['edit'].'" style="float: right;">
echo '<div class="dropdown pull-right">
<button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown"><i class="fa fa-cog"></i>
<span class="caret"></span></button>
<ul class="dropdown-menu">
<li><a href="https://'.$device['hostname'].'"><img src="images/16/http.png" alt="https" title="Launch browser to https://'.$device['hostname'].'" border="0" width="16" height="16" target="_blank"> Launch</a></li>
<li><a href="ssh://'.$device['hostname'].'"><img src="images/16/ssh.png" alt="ssh" title="SSH to '.$device['hostname'].'" border="0" width="16" height="16"> SSH</a></li>
<li><a href="telnet://'.$device['hostname'].'"><img src="images/16/telnet.png" alt="telnet" title="Telnet to '.$device['hostname'].'" border="0" width="16" height="16"> Telnet</a></li>';
if ($_SESSION['userlevel'] >= '7') {
echo '<li>
<a href="'.generate_device_url($device, array('tab' => 'edit')).'">
<img src="images/16/wrench.png" align="absmiddle" border="0" />
Edit
</a>
</li>';
}

}
echo '</ul>
</div>';
echo '</ul>';

}//end if

if (device_permitted($device['device_id']) || $check_device == $vars['device']) {
Expand Down

0 comments on commit a9e81c2

Please sign in to comment.