diff --git a/app/helpers.php b/app/helpers.php
index 9a6346c5..74001d75 100644
--- a/app/helpers.php
+++ b/app/helpers.php
@@ -139,7 +139,7 @@ if (! function_exists('bs_header')) {
if (! function_exists('bs_menu')) {
- function bs_menu($type, $title)
+ function bs_menu($type)
{
$menu = require BASE_DIR."/config/menu.php";
@@ -147,12 +147,12 @@ if (! function_exists('bs_menu')) {
throw new InvalidArgumentException;
}
+ $request = App::make('request');
+
foreach ($menu[$type] as $key => $value) {
- $value['title'] = trans($value['title']);
+ echo ($request->is($value['link'])) ? '
' : '';
- echo ($title == $value['title']) ? '' : '';
-
- echo ' '.$value['title'].'';
+ echo ' '.trans($value['title']).'';
}
}
diff --git a/config/menu.php b/config/menu.php
index d857a5f9..3dbe0688 100644
--- a/config/menu.php
+++ b/config/menu.php
@@ -9,21 +9,21 @@
*/
$menu['user'] = array(
- ['title' => 'general.dashboard', 'link' => '/user', 'icon' => 'fa-dashboard'],
- ['title' => 'general.my-closet', 'link' => '/user/closet', 'icon' => 'fa-star'],
- ['title' => 'general.player-manage', 'link' => '/user/player', 'icon' => 'fa-users'],
- ['title' => 'general.generate-config', 'link' => '/user/config', 'icon' => 'fa-book'],
- ['title' => 'general.profile', 'link' => '/user/profile', 'icon' => 'fa-user']
+ ['title' => 'general.dashboard', 'link' => 'user', 'icon' => 'fa-dashboard'],
+ ['title' => 'general.my-closet', 'link' => 'user/closet', 'icon' => 'fa-star'],
+ ['title' => 'general.player-manage', 'link' => 'user/player', 'icon' => 'fa-users'],
+ ['title' => 'general.generate-config', 'link' => 'user/config', 'icon' => 'fa-book'],
+ ['title' => 'general.profile', 'link' => 'user/profile', 'icon' => 'fa-user']
);
$menu['admin'] = array(
- ['title' => 'general.dashboard', 'link' => '/admin', 'icon' => 'fa-dashboard'],
- ['title' => 'general.user-manage', 'link' => '/admin/users', 'icon' => 'fa-users'],
- ['title' => 'general.player-manage', 'link' => '/admin/players', 'icon' => 'fa-gamepad'],
- ['title' => 'general.customize', 'link' => '/admin/customize', 'icon' => 'fa-paint-brush'],
- ['title' => 'general.score-options', 'link' => '/admin/score', 'icon' => 'fa-credit-card'],
- ['title' => 'general.options', 'link' => '/admin/options', 'icon' => 'fa-cog'],
- ['title' => 'general.check-update', 'link' => '/admin/update', 'icon' => 'fa-arrow-up']
+ ['title' => 'general.dashboard', 'link' => 'admin', 'icon' => 'fa-dashboard'],
+ ['title' => 'general.user-manage', 'link' => 'admin/users', 'icon' => 'fa-users'],
+ ['title' => 'general.player-manage', 'link' => 'admin/players', 'icon' => 'fa-gamepad'],
+ ['title' => 'general.customize', 'link' => 'admin/customize', 'icon' => 'fa-paint-brush'],
+ ['title' => 'general.score-options', 'link' => 'admin/score', 'icon' => 'fa-credit-card'],
+ ['title' => 'general.options', 'link' => 'admin/options', 'icon' => 'fa-cog'],
+ ['title' => 'general.check-update', 'link' => 'admin/update', 'icon' => 'fa-arrow-up']
);
return $menu;
diff --git a/resources/views/admin/master.tpl b/resources/views/admin/master.tpl
index 33bceed3..b01a2e3d 100644
--- a/resources/views/admin/master.tpl
+++ b/resources/views/admin/master.tpl
@@ -89,7 +89,7 @@