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:
Deon George
2013-04-26 11:42:09 +10:00
parent eeb8d61237
commit 04ebda2aaa
114 changed files with 1732 additions and 6797 deletions

View File

@@ -38,10 +38,10 @@ class Model_Service extends ORM_OSB {
array('Config::date',array(':value')),
),
'recur_schedule'=>array(
array('StaticList_RecurSchedule::display',array(':value')),
array('StaticList_RecurSchedule::get',array(':value')),
),
'status'=>array(
array('StaticList_YesNo::display',array(':value')),
array('StaticList_YesNo::get',array(':value')),
),
);
@@ -52,9 +52,6 @@ class Model_Service extends ORM_OSB {
if (! $this->product->prod_plugin_file)
return NULL;
if (! is_numeric($this->product->prod_plugin_data))
throw new Kohana_Exception('Missing plugin_id for :product (:type)',array(':product'=>$this->product->id,':type'=>$this->product->prod_plugin_file));
$o = ORM::factory(Kohana::classname(sprintf('Service_Plugin_%s',$this->product->prod_plugin_file)),array('service_id'=>$this->id));
return $type ? $o->$type : $o;
@@ -71,7 +68,7 @@ class Model_Service extends ORM_OSB {
* Display the service product name
*/
public function name() {
return is_null($plugin=$this->plugin()) ? $this->product->name() : $plugin->name();
return is_null($plugin=$this->plugin()) ? $this->product->title() : $plugin->name();
}
public function pending_change() {
@@ -211,12 +208,11 @@ class Model_Service extends ORM_OSB {
public function list_bylistgroup($cat) {
$result = array();
$cats = ORM::factory('Product_Category')->list_bylistgroup($cat);
foreach ($this->list_active() as $so)
if (array_intersect($so->product->avail_category,array_keys($cats)))
if ($so->product->prod_plugin_file == $cat)
array_push($result,$so);
Sort::MASort($result,'service_name()');
return $result;
}