Enabled Search, Improved Navbar, Fixed Application Authorisation and some other minor fixes

This commit is contained in:
Deon George
2013-05-08 19:00:47 +10:00
parent 364cb58b7b
commit ce17247db6
27 changed files with 877 additions and 67 deletions

View File

@@ -14,8 +14,8 @@ class URL extends Kohana_URL {
public static $method_directory = array(
'admin'=>'a',
'reseller'=>'r',
'task'=>'task',
'user'=>'u',
'task'=>'task',
);
/**
@@ -49,5 +49,26 @@ class URL extends Kohana_URL {
// If we get here, we didnt have anything.
return $dir;
}
public static function navbar() {
$result = array();
foreach (array_reverse(static::$method_directory) as $k=>$v)
switch ($k) {
case 'admin': $result[$k] = array('name'=>'Administrator','icon'=>'icon-globe');
break;
case 'affiliate':
case 'reseller': $result[$k] = array('name'=>'Reseller','icon'=>'icon-th-list');
break;
case 'user': $result[$k] = array('name'=>Auth::instance()->get_user()->name(),'icon'=>'icon-user');
break;
default: $result[$k] = array('name'=>$k,'icon'=>'icon-question-sign');
}
return $result;
}
}
?>