Theme work with focusbusiness and baseadmin
Improvements to NAVBAR, updates to StaticList methods, other minor items Enable product category rendering and other minor improvements Added ADSL-large category price plan
This commit is contained in:
@@ -35,7 +35,7 @@ class Model_Account extends Model_Auth_UserDefault {
|
||||
array('Config::date',array(':value')),
|
||||
),
|
||||
'status'=>array(
|
||||
array('StaticList_YesNo::display',array(':value')),
|
||||
array('StaticList_YesNo::get',array(':value')),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -50,7 +50,14 @@ class Model_Account extends Model_Auth_UserDefault {
|
||||
* Get the groups that an account belongs to
|
||||
*/
|
||||
public function groups() {
|
||||
return $this->group->where_active()->find_all();
|
||||
$result = array();
|
||||
|
||||
foreach ($this->group->where_active()->find_all() as $go)
|
||||
foreach ($go->list_parentgrps(TRUE) as $cgo)
|
||||
if (empty($result[$cgo->id]))
|
||||
$result[$cgo->id] = $cgo;
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -100,6 +107,27 @@ class Model_Account extends Model_Auth_UserDefault {
|
||||
return $alo->saved();
|
||||
}
|
||||
|
||||
/**
|
||||
* This function will extract the available methods for this account
|
||||
* This is used both for menu options and method security
|
||||
*/
|
||||
public function methods() {
|
||||
static $result = array();
|
||||
|
||||
// @todo We may want to optimise this with some session caching.
|
||||
if ($result)
|
||||
return $result;
|
||||
|
||||
foreach ($this->groups() as $go)
|
||||
foreach ($go->module_method->find_all() as $mmo)
|
||||
if (empty($result[$mmo->id]))
|
||||
$result[$mmo->id] = $mmo;
|
||||
|
||||
Sort::MAsort($result,'module->name,name');
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return an account name
|
||||
*/
|
||||
|
Reference in New Issue
Block a user