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

@@ -12,6 +12,9 @@
class StaticList_Module extends StaticList {
protected static $record = array();
protected function _table() {
}
/**
* Display a static name for a value
*/
@@ -81,13 +84,8 @@ class StaticList_Module extends StaticList {
return Form::select($name,$x,$default,$attributes);
}
protected function table($module=NULL) {
if (is_null($module))
throw new Kohana_Exception('Module is a required attribute.');
}
public static function factory() {
return new StaticList_Module;
public static function get($value) {
return static::factory()->_get($value);
}
}
?>

View File

@@ -10,7 +10,7 @@
* @license http://dev.osbill.net/license.html
*/
class StaticList_PriceType extends StaticList {
protected function table() {
protected function _table() {
return array(
0=>_('One-time Charge'),
1=>_('Recurring Membership/Subscription'),
@@ -18,12 +18,8 @@ class StaticList_PriceType extends StaticList {
);
}
public static function factory() {
return new StaticList_PriceType;
}
public static function display($value) {
return static::_display($value);
public static function get($value) {
return static::factory()->_get($value);
}
}
?>

View File

@@ -10,7 +10,7 @@
* @license http://dev.osbill.net/license.html
*/
class StaticList_RecurSchedule extends StaticList {
protected function table() {
protected function _table() {
return array(
0=>_('Weekly'),
1=>_('Monthly'),
@@ -22,34 +22,8 @@ class StaticList_RecurSchedule extends StaticList {
);
}
public static function factory() {
return new StaticList_RecurSchedule;
}
public static function display($value) {
return static::_display($value);
}
/**
* Renders the price display for a product
*
* @uses product
*/
public static function form($name,$product='',$default='',$addblank=FALSE) {
if (empty($product))
throw new Kohana_Exception('Product is a required field for :method',array(':method'=>__METHOD__));
$x = '';
$table = static::factory()->table();
foreach ($product->get_price_array() as $term => $price) {
$x[$term] = sprintf('%s %s',Currency::display(Tax::add($price['price_base'])),$table[$term]);
if ($price['price_setup'] > 0)
$x[$term] .= sprintf(' + %s %s',Currency::display(Tax::add($price['price_setup'])),_('Setup'));
}
return Form::select($name,$x,$default);
public static function get($value) {
return static::factory()->_get($value);
}
}
?>

View File

@@ -10,19 +10,15 @@
* @license http://dev.osbill.net/license.html
*/
class StaticList_RecurType extends StaticList {
protected function table() {
protected function _table() {
return array(
0=>_('Bill on Aniversary Date of Subscription'),
1=>_('Bill on Fixed Schedule'),
);
}
public static function factory() {
return new StaticList_RecurType;
}
public static function display($value) {
return static::_display($value);
public static function get($value) {
return static::factory()->_get($value);
}
}
?>

View File

@@ -10,7 +10,7 @@
* @license http://dev.osbill.net/license.html
*/
class StaticList_SweepType extends StaticList {
protected function table() {
protected function _table() {
return array(
0=>_('Daily'),
1=>_('Weekly'),
@@ -22,12 +22,8 @@ class StaticList_SweepType extends StaticList {
);
}
public static function factory() {
return new StaticList_SweepType;
}
public static function display($value) {
return static::_display($value);
public static function get($value) {
return static::factory()->_get($value);
}
}
?>

View File

@@ -10,7 +10,7 @@
* @license http://dev.osbill.net/license.html
*/
class StaticList_Title extends StaticList {
protected function table() {
protected function _table() {
return array(
'mr'=>_('Mr'),
'ms'=>_('Ms'),
@@ -21,8 +21,8 @@ class StaticList_Title extends StaticList {
);
}
public static function factory() {
return new StaticList_Title;
public static function get($value) {
return static::factory()->_get($value);
}
}
?>

View File

@@ -10,19 +10,15 @@
* @license http://dev.osbill.net/license.html
*/
class StaticList_YesNo extends StaticList {
protected function table() {
protected function _table() {
return array(
0=>_('No'),
1=>_('Yes'),
);
}
public static function factory() {
return new StaticList_YesNo;
}
public static function display($value) {
return static::_display($value);
public static function get($value) {
return static::factory()->_get($value);
}
}
?>