Commit 3d45ed87 authored by Franco Fichtner's avatar Franco Fichtner

search: some more tweaks

o Translate menu returned from API (glitchy, but why?)
o Fix styling in chrome by realigning the grouing
o Remove the button, enter is quicker
o Search indicator to the left
o Hide more menu entries
o Space around separator
parent 78148368
...@@ -181,13 +181,13 @@ class MenuController extends ApiControllerBase ...@@ -181,13 +181,13 @@ class MenuController extends ApiControllerBase
{ {
foreach ($menu_items as $menu_item) { foreach ($menu_items as $menu_item) {
if (!isset($menu_item->breadcrumb)) { if (!isset($menu_item->breadcrumb)) {
$menu_item->breadcrumb = $menu_item->VisibleName; $menu_item->breadcrumb = gettext($menu_item->VisibleName);
$menu_item->depth = 1; $menu_item->depth = 1;
} }
if ($menu_item->isVisible) { if ($menu_item->isVisible) {
if (count($menu_item->Children) > 0) { if (count($menu_item->Children) > 0) {
foreach ($menu_item->Children as &$submenu) { foreach ($menu_item->Children as &$submenu) {
$submenu->breadcrumb = $menu_item->breadcrumb . "/" . $submenu->VisibleName; $submenu->breadcrumb = $menu_item->breadcrumb . ' / ' . gettext($submenu->VisibleName);
$submenu->depth = $menu_item->depth + 1; $submenu->depth = $menu_item->depth + 1;
} }
$this->extractMenuLeaves($menu_item->Children, $items); $this->extractMenuLeaves($menu_item->Children, $items);
......
...@@ -145,7 +145,7 @@ ...@@ -145,7 +145,7 @@
<All order="100" url="/firewall_aliases.php?tab=all"> <All order="100" url="/firewall_aliases.php?tab=all">
<Edit url="/firewall_aliases_edit.php?tab=all" visibility="hidden"/> <Edit url="/firewall_aliases_edit.php?tab=all" visibility="hidden"/>
<NoneEdit url="/firewall_aliases_edit.php?id=*" visibility="hidden"/> <NoneEdit url="/firewall_aliases_edit.php?id=*" visibility="hidden"/>
<None url="/firewall_aliases.php"/> <None url="/firewall_aliases.php" visibility="hidden"/>
</All> </All>
<IPs order="200" url="/firewall_aliases.php?tab=ip"> <IPs order="200" url="/firewall_aliases.php?tab=ip">
<Edit url="/firewall_aliases_edit.php?tab=ip" visibility="hidden"/> <Edit url="/firewall_aliases_edit.php?tab=ip" visibility="hidden"/>
...@@ -160,7 +160,7 @@ ...@@ -160,7 +160,7 @@
</Aliases> </Aliases>
<Rules order="20" url="/firewall_rules.php" cssClass="fa fa-check fa-fw"> <Rules order="20" url="/firewall_rules.php" cssClass="fa fa-check fa-fw">
<RulesEdit url="/firewall_rules_edit.php*" visibility="hidden"/> <RulesEdit url="/firewall_rules_edit.php*" visibility="hidden"/>
<Floating url="/firewall_rules.php?if=FloatingRules"/> <Floating url="/firewall_rules.php?if=FloatingRules" visibility="hidden"/>
<Interface url="/firewall_rules.php?if=*" visibility="hidden"/> <Interface url="/firewall_rules.php?if=*" visibility="hidden"/>
</Rules> </Rules>
<NAT order="30" cssClass="fa fa-exchange fa-fw"> <NAT order="30" cssClass="fa fa-exchange fa-fw">
......
...@@ -165,10 +165,8 @@ ...@@ -165,10 +165,8 @@
<li> <li>
<form class="navbar-form" role="search"> <form class="navbar-form" role="search">
<div class="input-group"> <div class="input-group">
<input type="text" style="width: 250px;" class="form-control" tabindex="1" placeholder="{{ lang._('Search') }}" data-provide="typeahead" id="menu_search_box"> <div class="input-group-addon"><i class="fa fa-search"></i></div>
<div class="input-group-btn"> <input type="text" style="width: 250px;" class="form-control" tabindex="1" data-provide="typeahead" id="menu_search_box">
<button class="btn btn-default" type="button"><i class="glyphicon glyphicon-search"></i></button>
</div>
</div> </div>
</form> </form>
</li> </li>
......
...@@ -114,10 +114,8 @@ if($need_alert_display == true) { ...@@ -114,10 +114,8 @@ if($need_alert_display == true) {
<li> <li>
<form class="navbar-form" role="search"> <form class="navbar-form" role="search">
<div class="input-group"> <div class="input-group">
<input type="text" style="width: 250px;" class="form-control" tabindex="1" placeholder="<?= htmlspecialchars(gettext('Search')) ?>" data-provide="typeahead" id="menu_search_box"> <div class="input-group-addon"><i class="fa fa-search"></i></div>
<div class="input-group-btn"> <input type="text" style="width: 250px;" class="form-control" tabindex="1" data-provide="typeahead" id="menu_search_box">
<button class="btn btn-default" type="button"><i class="glyphicon glyphicon-search"></i></button>
</div>
</div> </div>
</form> </form>
</li> </li>
......
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