mirror of
https://github.com/unraid/webgui.git
synced 2026-01-23 18:09:02 -06:00
Merge pull request #236 from realies/patch-3
Allow menu buttons to have a destination
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
Menu="Buttons:2"
|
||||
Title="Terminal"
|
||||
Icon="terminal"
|
||||
Href="/webterminal/"
|
||||
Code="f120"
|
||||
---
|
||||
<?PHP
|
||||
|
||||
@@ -317,7 +317,7 @@ foreach ($buttons as $page) {
|
||||
eval("?>{$page['text']}");
|
||||
if (empty($page['Link'])) {
|
||||
$icon = substr($page['Icon'],-4)=='.png' ? "<img src='/{$page['root']}/icons/{$page['Icon']}' class='system'>" : "<i class='system fa fa-{$page['Icon']}'></i>";
|
||||
echo "<div id='nav-item' class='{$page['name']}'><a href='#' onclick='{$page['name']}();return false;' title='{$page['Title']}'>$icon<span>{$page['Title']}</span></a></div>";
|
||||
echo "<div id='nav-item' class='{$page['name']}'><a href='".(empty($page['Href']) ? "#" : $page['Href'])."' onclick='{$page['name']}();return false;' title='{$page['Title']}'>$icon<span>{$page['Title']}</span></a></div>";
|
||||
} else
|
||||
echo "<div id='{$page['Link']}'></div>";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user