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

@ -31,84 +31,23 @@ class Auth_OSB extends Auth_ORM {
if (Config::sitemode() == Kohana::DEVELOPMENT) if (Config::sitemode() == Kohana::DEVELOPMENT)
SystemMessage::add(array('title'=>'Debug','type'=>'debug','body'=>Debug::vars(array('user'=>$uo->username,'r'=>$role)))); SystemMessage::add(array('title'=>'Debug','type'=>'debug','body'=>Debug::vars(array('user'=>$uo->username,'r'=>$role))));
if (! empty($role)) { if (! empty($role) AND Request::current()->mmo()) {
// Get the module details
$mo = ORM::factory('Module',array('name'=>Request::current()->controller()));
if (! $mo->loaded() OR ! $mo->status) {
SystemMessage::add(array(
'title'=>'Module is not defined or active in the Database',
'type'=>'warning',
'body'=>sprintf('Module not defined: %s',Request::current()->controller()),
));
} else {
if (Request::current()->directory())
$method_name = sprintf('%s_%s',Request::current()->directory(),Request::current()->action());
else
$method_name = Request::current()->action();
// Get the method number
$mmo = ORM::factory('Module_Method',array('module_id'=>$mo->id,'name'=>$method_name));
if (! $mmo->loaded()) {
SystemMessage::add(array(
'title'=>'Method is not defined or active in the Database',
'type'=>'warning',
'body'=>sprintf('Method not defined: %s for %s',Request::current()->action(),$mo->name),
));
} else {
// If the role has the authorisation to run the method // If the role has the authorisation to run the method
$gmo = ORM::factory('Group_Method') $gmo = ORM::factory('Group_Method')
->where('method_id','=',$mmo->id); ->where('method_id','=',Request::current()->mmo()->id);
$roles = '';
foreach ($gmo->find_all() as $gm) {
$roles .= ($roles ? '|' : '').$gm->group->name;
foreach ($gmo->find_all() as $gm)
// $gm->group->id == 0 means all users. // $gm->group->id == 0 means all users.
if ($gm->group->id == 0 OR $uo->has_any('group',$gm->group->list_childgrps(TRUE))) { if ($gm->group->id == 0 OR $uo->has_any('group',$gm->group->list_childgrps(TRUE))) {
$status = TRUE; $status = TRUE;
$roles = '';
break; break;
} }
}
if (! $status) {
if (Config::sitemode() == Kohana::DEVELOPMENT)
SystemMessage::add(array(
'title'=>'User is not authorised in Database',
'type'=>'debug',
'body'=>sprintf('Role(s) checked: %s<br/>User: %s</br>Module: %s<br/>Method: %s',$roles,$uo->username,$mo->name,$mmo->name),
));
}
}
}
if (Config::sitemode() == Kohana::DEVELOPMENT)
SystemMessage::add(array(
'title'=>'Debug',
'type'=>'debug',
'body'=>sprintf('User: <b>%s</b>, Module: <b>%s</b>, Method: <b>%s</b>, Role: <b>%s</b>, Status: <b>%s</b>, Data: <b>%s</b>',
$uo->username,Request::current()->controller(),Request::current()->action(),$role,$status,$debug)));
// There is no role, so the method should be allowed to run as anonymous // There is no role, so the method should be allowed to run as anonymous
} else { } else
if (Config::sitemode() == Kohana::DEVELOPMENT)
SystemMessage::add(array(
'title'=>'Debug',
'type'=>'debug',
'body'=>sprintf('User: <b>%s</b>, Module: <b>%s</b>, Method: <b>%s</b>, Status: <b>%s</b>, Data: <b>%s</b>',
$uo->username,Request::current()->controller(),Request::current()->action(),'No Role Default Access',$debug)));
$status = TRUE; $status = TRUE;
} }
} else {
if (Config::sitemode() == Kohana::DEVELOPMENT)
SystemMessage::add(array('title'=>'Debug','type'=>'debug','body'=>'No user logged in'));
}
return $status; return $status;
} }

View File

@ -63,7 +63,7 @@ class Company {
} }
public function language() { public function language() {
return $this->so->language->iso; return $this->so->language;
} }
public function logo() { public function logo() {

View File

@ -88,6 +88,10 @@ class Config extends Kohana_Config {
return ($ao = Auth::instance()->get_user() AND is_object($ao)) ? HTML::anchor(URL::link('user','account/edit'),$ao->name()) : HTML::anchor('login',_('Login')); return ($ao = Auth::instance()->get_user() AND is_object($ao)) ? HTML::anchor(URL::link('user','account/edit'),$ao->name()) : HTML::anchor('login',_('Login'));
} }
public static function logout_uri() {
return ($ao = Auth::instance()->get_user() AND is_object($ao)) ? HTML::anchor('logout','Logout',array('class'=>'lnk_logout')) : '';
}
public static function logo() { public static function logo() {
return HTML::image(static::logo_uri(),array('class'=>'headlogo','alt'=>_('Logo'))); return HTML::image(static::logo_uri(),array('class'=>'headlogo','alt'=>_('Logo')));
} }
@ -110,11 +114,15 @@ class Config extends Kohana_Config {
if (! count($result)) { if (! count($result)) {
// We need to know our site here, so that we can subsequently load our enabled modules. // We need to know our site here, so that we can subsequently load our enabled modules.
if (PHP_SAPI === 'cli') { if (PHP_SAPI === 'cli') {
if (! $site = Minion_CLI::options('site')) if (! ($site = Minion_CLI::options('site'))) {
// @todo Need to figure out how to make this CLI error nicer. // @todo Need to figure out how to make this CLI error nicer.
throw new Minion_Exception_InvalidTask(_('Cant figure out the site, use --site= for CLI')); #throw new Minion_Exception_InvalidTask(_('Cant figure out the site, use --site= for CLI'));
else echo _('Cant figure out the site, use --site= for CLI')."\n";
die();
} else
$_SERVER['SERVER_NAME'] = $site; $_SERVER['SERVER_NAME'] = $site;
} }
foreach (ORM::factory('Module')->list_external() as $mo) foreach (ORM::factory('Module')->list_external() as $mo)

View File

@ -11,23 +11,25 @@
*/ */
class Controller_Account extends Controller_TemplateDefault { class Controller_Account extends Controller_TemplateDefault {
public function action_group() { public function action_group() {
// List all available groups for this user.
$output = ''; $output = '';
$cg = $this->ao->group->find_all(); foreach ($this->ao->groups() as $go)
foreach ($cg as $go) {
$output .= sprintf('Group %s: %s<br/>',$go->id,$go->display('name')); $output .= sprintf('Group %s: %s<br/>',$go->id,$go->display('name'));
foreach ($go->list_childgrps(TRUE) as $cgo) Block::factory()
$output .= sprintf('- %s: %s (%s)<br/>',$cgo->id,$cgo->display('name'),$cgo->parent_id); ->title('Group Structure')
->body($output);
$output .= sprintf('END Group %s<br/><br/>',$go->id); // List all available methods for this user.
} $output = '';
Block::add(array( foreach ($this->ao->methods() as $mmo)
'title'=>'Group Structure', $output .= sprintf('Module: %s, Method %s: %s<br/>',$mmo->module->name,$mmo->name,$mmo->url());
'body'=>$output,
)); Block::factory()
->title('Available Methods')
->body($output);
} }
} }
?> ?>

View File

@ -87,6 +87,8 @@ class Controller_Login extends lnApp_Controller_Login {
'style'=>array('css/login.css'=>'screen'), 'style'=>array('css/login.css'=>'screen'),
)); ));
} }
$this->template->shownavbar = FALSE;
} }
} }
?> ?>

View File

@ -16,36 +16,11 @@ class Controller_TemplateDefault extends lnApp_Controller_TemplateDefault {
protected $ao; protected $ao;
public function __construct(Request $request, Response $response) { public function __construct(Request $request, Response $response) {
if (Config::theme())
$this->template = Config::theme().'/page'; $this->template = Config::theme().'/page';
return parent::__construct($request,$response); return parent::__construct($request,$response);
} }
protected function _headimages() {
// This is where we should be able to change our country
// @todo To implement
$co = Config::country();
HeadImages::add(array(
'img'=>sprintf('img/country/%s.png',strtolower($co->two_code)),
'attrs'=>array('onclick'=>"target='_blank';",'title'=>$co->display('name'))
));
return HeadImages::factory();
}
protected function _left() {
if ($this->template->left)
return $this->template->left;
elseif (Auth::instance()->logged_in(NULL,get_class($this).'|'.__METHOD__))
return Controller_Tree::js();
}
protected function _right() {
return ($this->template->right) ? $this->template->right : '';
}
public function before() { public function before() {
// If our action doesnt exist, no point processing any further. // If our action doesnt exist, no point processing any further.
if (! method_exists($this,'action_'.Request::current()->action())) if (! method_exists($this,'action_'.Request::current()->action()))

View File

@ -1,131 +0,0 @@
<?php defined('SYSPATH') or die('No direct access allowed.');
/**
* This class extends renders OSB menu tree.
*
* @package OSB
* @category Controllers
* @author Deon George
* @copyright (c) 2009-2013 Open Source Billing
* @license http://dev.osbill.net/license.html
*/
class Controller_Tree extends lnApp_Controller_Tree {
protected $auth_required = TRUE;
/**
* Draw the Tree Menu
*
* The incoming ID is either a Branch B_x or a Node N_x
* Where X is actually the module.
*
* @param array $data Tree data passed in by inherited methods
*/
public function action_json(array $data=array()) {
// Get the user details
$id = (is_null($this->request->param('id')) AND isset($_REQUEST['id'])) ? substr($_REQUEST['id'],2) : $this->request->param('id');
$user = Auth::instance()->get_user();
if ($user) {
if (! $id) {
$modules = array();
foreach ($user->groups() as $go)
foreach ($go->list_parentgrps(TRUE) as $cgo)
foreach ($cgo->module_method->find_all() as $mmo)
if ($mmo->menu_display AND empty($modules[$mmo->module_id]))
$modules[$mmo->module_id] = $mmo->module;
Sort::MAsort($modules,'name');
foreach ($modules as $id => $mo)
if (! $mo->parent_id)
array_push($data,array('id'=>$id,'name'=>$mo->name,'state'=>'closed'));
} else {
$idx = NULL;
if (preg_match('/_/',$id))
list($id,$idx) = explode('_',$id,2);
$mo = ORM::factory('Module',$id);
$methods = array();
if ($mo->loaded()) {
foreach ($mo->module_method->find_all() as $mmo)
if ($mmo->menu_display)
foreach ($mmo->group->find_all() as $gmo)
if ($user->has_any('group',$gmo->list_childgrps(TRUE)))
$methods[$mmo->id] = $mmo;
Sort::MASort($modules,'name');
$subdata = array();
foreach ($methods as $id => $mmo) {
if (preg_match('/_/',$mmo->name)) {
list($mode,$action) = explode('_',$mmo->name);
$url = URL::link($mode,$mmo->module->name.'/'.$action,TRUE);
} else {
$url = URL::site($mmo->module->name.'/'.$mmo->name);
}
// We can split our menus into sub menus using the _ char.
if (preg_match('/_/',$mmo->name)) {
list($sub,$name) = explode('_',$mmo->name,2);
$subdata[$sub][$name]['name'] = preg_replace('/^(.*: )/','',$mmo->notes);
$subdata[$sub][$name]['id'] = sprintf('%s_%s',$mmo->module_id,$id);
$subdata[$sub][$name]['href'] = (empty($details['page']) ? $url : $details['page']);
} else {
// We dont want to show these items again, if we can through on a submenu
if (! $idx)
array_push($data,array(
'id'=>sprintf('%s_%s',$mmo->module_id,$id),
'name'=>$mmo->name,
'state'=>'none',
'attr_id'=>sprintf('%s_%s',$mmo->module->name,$id),
'attr_href'=>(empty($details['page']) ? $url : $details['page'])
));
}
}
// If our sub menus only have 1 branch, then we'll display it as normal.
if (count($subdata) == 1) {
$sk = array_keys($subdata);
$idx = array_shift($sk);
}
if ($idx)
foreach ($subdata[$idx] as $k=>$v) {
array_push($data,array(
'id'=>$v['id'],
'name'=>$v['name'],
'state'=>'none',
'attr_id'=>$v['id'],
'attr_href'=>$v['href']
));
}
else
foreach ($subdata as $t=>$x)
array_push($data,array('id'=>$mmo->module_id.'_'.$t,'name'=>$t,'state'=>'closed'));
}
}
}
$this->output = array();
foreach ($data as $branch) {
array_push($this->output,array(
'attr'=>array('id'=>sprintf('B_%s',$branch['id'])),
'state'=>$branch['state'],
'data'=>array('title'=>$branch['name']),
'attr'=>array('id'=>sprintf('N_%s',$branch['id']),'href'=>empty($branch['attr_href']) ? URL::site(sprintf('%s/menu',$branch['name'])) : $branch['attr_href']),
)
);
}
return parent::action_json($data);
}
}
?>

View File

@ -25,34 +25,34 @@ class Controller_User_Account extends Controller_Account {
// Run validation and save // Run validation and save
if ($this->ao->changed()) if ($this->ao->changed())
if ($this->ao->check()) { if ($this->ao->check()) {
SystemMessage::add(array( SystemMessage::factory()
'title'=>_('Record updated'), ->title('Record updated')
'type'=>'info', ->type('success')
'body'=>_('Your account record has been updated.') ->body(_('Your account record has been updated.'));
));
$this->ao->save(); $this->ao->save();
} else { } else {
$output = ''; $output = '';
// @todo Need to check that this still works with the new bootstrap theming
foreach ($this->ao->validation()->errors('forms/login') as $field => $error) foreach ($this->ao->validation()->errors('forms/login') as $field => $error)
$output .= sprintf('<li><b>%s</b> %s</li>',$field,$error); $output .= sprintf('<li><b>%s</b> %s</li>',$field,$error);
if ($output) if ($output)
$output = sprintf('<ul>%s</ul>',$output); $output = sprintf('<ul>%s</ul>',$output);
SystemMessage::add(array( SystemMessage::factory()
'title'=>_('Record NOT updated'), ->title(_('Record NOT updated'))
'type'=>'error', ->type('error')
'body'=>_('Your updates didnt pass validation.').'<br/>'.$output, ->body(_('Your updates didnt pass validation.').'<br/>'.$output);
));
} }
Block::add(array( Block::factory()
'title'=>sprintf('%s: %s - %s',_('Account Edit'),$this->ao->accnum(),$this->ao->name(TRUE)), ->title(sprintf('Account: %s',$this->ao->accnum()))
'body'=>View::factory($this->viewpath()) ->title_icon('icon-wrench')
->set('record',$this->ao), ->type('form-horizontal')
)); ->body(View::factory('account/user/edit')->set('o',$this->ao));
} }
public function action_resetpassword() { public function action_resetpassword() {
@ -66,11 +66,10 @@ class Controller_User_Account extends Controller_Account {
// Run validation and save // Run validation and save
if ($this->ao->changed()) if ($this->ao->changed())
if ($this->ao->check()) { if ($this->ao->check()) {
SystemMessage::add(array( SystemMessage::factory()
'title'=>_('Record updated'), ->title('Record updated')
'type'=>'info', ->type('success')
'body'=>_('Your account record has been updated.') ->body(_('Your account record has been updated.'));
));
$this->ao->save(); $this->ao->save();
@ -80,25 +79,27 @@ class Controller_User_Account extends Controller_Account {
HTTP::redirect('login'); HTTP::redirect('login');
} else { } else {
// @todo Need to check that this still works with the new bootstrap theming
$output = ''; $output = '';
foreach ($this->ao->validation()->errors('forms/login') as $field => $error) foreach ($this->ao->validation()->errors('forms/login') as $field => $error)
$output .= sprintf('<li><b>%s</b> %s</li>',$field,$error); $output .= sprintf('<li><b>%s</b> %s</li>',$field,$error);
if ($output) if ($output)
$output = sprintf('<ul>%s</ul>',$output); $output = sprintf('<ul>%s</ul>',$output);
SystemMessage::add(array( SystemMessage::factory()
'title'=>_('Record NOT updated'), ->title(_('Record NOT updated'))
'type'=>'error', ->type('error')
'body'=>_('Your updates didnt pass validation.').'<br/>'.$output, ->body(_('Your updates didnt pass validation.').'<br/>'.$output);
));
} }
Block::add(array( // @todo To add JS password validation (minimum length and both values equal)
'title'=>_('Password Reset'), Block::factory()
'body'=>View::factory($this->viewpath()) ->title(sprintf('Password Reset: %s',$this->ao->accnum()))
->set('record',$this->ao), ->title_icon('icon-cog')
)); ->type('form-horizontal')
->body(View::factory('account/user/resetpassword')->set('o',$this->ao));
} }
} }
?> ?>

View File

@ -16,8 +16,14 @@ class Controller_Welcome extends Controller_TemplateDefault {
if (! Kohana::$config->load('config')->appname) if (! Kohana::$config->load('config')->appname)
HTTP::redirect('guide/app'); HTTP::redirect('guide/app');
// @todo This should be in the DB or something. $output = '';
HTTP::redirect('product/categorys');
$output = View::factory('pages/welcome');
Style::factory()
->type('file')
->data('media/css/pages/welcome.css');
$this->template->content = $output;
} }
public function action_breadcrumb() { public function action_breadcrumb() {

View File

@ -10,6 +10,47 @@
* @license http://dev.osbill.net/license.html * @license http://dev.osbill.net/license.html
*/ */
abstract class Kohana extends Kohana_Core { abstract class Kohana extends Kohana_Core {
/**
* Work out our Class Name as per Kohana's standards
*/
public static function classname($name) {
return str_replace(' ','_',ucwords(strtolower(str_replace('_',' ',$name))));
}
/**
* Find files using a multi-site enabled application
*
* In order of precedence, we'll return:
* 1) site-theme file, ie: site/X/THEME/${file}
* 2) site file, ie: site/X/${file}
* 3) theme file, ie: THEME/${file}
* 4) normal search, ie: ${file}
*/
public static function find_file($dir,$file,$ext=NULL,$array=FALSE) {
// Limit our scope to the following dirs
// @note, we cannot have classes checked, since Config() doesnt exist yet
$dirs = array('views','media');
if (! in_array($dir,$dirs) OR PHP_SAPI === 'cli')
return parent::find_file($dir,$file,$ext,$array);
// Our search order.
$prefixes = array(
sprintf('site/%s/%s/',Config::siteid(),Config::theme()),
sprintf('site/%s/',Config::siteid()),
Config::theme().'/',
'',
);
foreach ($prefixes as $p) {
if ($x = parent::find_file($dir,$p.$file,$ext,$array))
return $x;
}
// We found a site path.
return $x;
}
/** /**
* @compat Restore KH 3.1 functionality * @compat Restore KH 3.1 functionality
* @var boolean True if Kohana is running from the command line * @var boolean True if Kohana is running from the command line
@ -45,12 +86,5 @@ abstract class Kohana extends Kohana_Core {
return $result; return $result;
} }
/**
* Work out our Class Name as per Kohana's standards
*/
public static function classname($name) {
return str_replace(' ','_',ucwords(strtolower(str_replace('_',' ',$name))));
}
} }
?> ?>

View File

@ -0,0 +1,29 @@
<?php defined('SYSPATH') or die('No direct access allowed.');
/**
* This class is used to create our Menu/Navbars
*
* @package OSB
* @category Helpers
* @author Deon George
* @copyright (c) 2009-2013 Open Source Billing
* @license http://dev.osbill.net/license.html
*/
class Menu {
public static function items($type) {
$result = array();
if (empty(URL::$method_directory[$type]))
return NULL;
$uo = Auth::instance()->get_user();
foreach ($uo->methods() as $mmo)
if ($mmo->menu_display AND preg_match('/^'.$type.'_/',$mmo->name))
if (empty($result[$mmo->id]))
$result[$mmo->id] = $mmo;
return $result;
}
}
?>

View File

@ -35,7 +35,7 @@ class Model_Account extends Model_Auth_UserDefault {
array('Config::date',array(':value')), array('Config::date',array(':value')),
), ),
'status'=>array( '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 * Get the groups that an account belongs to
*/ */
public function groups() { 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(); 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 * Return an account name
*/ */

View File

@ -10,6 +10,8 @@
* @license http://dev.osbill.net/license.html * @license http://dev.osbill.net/license.html
*/ */
class Model_Country extends ORM_OSB { class Model_Country extends ORM_OSB {
protected $_form = array('id'=>'id','value'=>'name');
public function currency() { public function currency() {
return ORM::factory('Currency')->where('country_id','=',$this->id)->find(); return ORM::factory('Currency')->where('country_id','=',$this->id)->find();
} }

View File

@ -10,5 +10,6 @@
* @license http://dev.osbill.net/license.html * @license http://dev.osbill.net/license.html
*/ */
class Model_Currency extends ORM_OSB { class Model_Currency extends ORM_OSB {
protected $_form = array('id'=>'id','value'=>'name');
} }
?> ?>

View File

@ -33,7 +33,7 @@ class Model_Group extends Model_Auth_RoleDefault {
protected $_display_filters = array( protected $_display_filters = array(
'status'=>array( 'status'=>array(
array('StaticList_YesNo::display',array(':value')), array('StaticList_YesNo::get',array(':value')),
), ),
); );

View File

@ -31,7 +31,7 @@ class Model_Module extends ORM_OSB {
array('strtoupper',array(':value')), array('strtoupper',array(':value')),
), ),
'status'=>array( 'status'=>array(
array('StaticList_YesNo::display',array(':value')), array('StaticList_YesNo::get',array(':value')),
), ),
); );

View File

@ -10,6 +10,10 @@
* @license http://dev.osbill.net/license.html * @license http://dev.osbill.net/license.html
*/ */
class Model_Module_Method extends ORM_OSB { class Model_Module_Method extends ORM_OSB {
// This module doesnt keep track of column updates automatically
protected $_created_column = FALSE;
protected $_updated_column = FALSE;
// Relationships // Relationships
protected $_belongs_to = array( protected $_belongs_to = array(
'module'=>array(), 'module'=>array(),
@ -25,19 +29,24 @@ class Model_Module_Method extends ORM_OSB {
'name'=>'ASC', 'name'=>'ASC',
); );
protected $_display_filters = array( /**
'menu_display'=>array( * Calculate the description for this method on any menu link
array('StaticList_YesNo::display',array(':value')), */
), public function menu_display() {
); // @todo The test for value equal 1 is for legacy, remove when all updated.
if ($this->menu_display AND $this->menu_display != 1)
return $this->menu_display;
else
return sprintf('%s: %s',$this->module->name,$this->name);
}
// This module doesnt keep track of column updates automatically public function url() {
protected $_created_column = FALSE; if (! preg_match('/_/',$this->name))
protected $_updated_column = FALSE; return NULL;
// Return the method name. list($type,$action) = preg_split('/_/',$this->name,2);
public function name() {
return sprintf('%s::%s',$this->module->name,$this->name); return URL::link($type,$this->module->name.'/'.$action);
} }
} }
?> ?>

View File

@ -47,7 +47,7 @@ abstract class ORM extends Kohana_ORM {
if (isset($this->_object_formated[$column])) if (isset($this->_object_formated[$column]))
return $this->_object_formated[$column]; return $this->_object_formated[$column];
else else
return HTML::nbsp($value); return $value;
} }
/** /**

View File

@ -21,6 +21,9 @@ abstract class ORM_OSB extends ORM {
// Our attribute values that need to be stored as serialized // Our attribute values that need to be stored as serialized
protected $_serialize_column = array(); protected $_serialize_column = array();
// Our attributes that should be converted to NULL when empty
protected $_nullifempty = array();
// Our attributes used in forms. // Our attributes used in forms.
protected $_form = array(); protected $_form = array();
@ -36,6 +39,52 @@ abstract class ORM_OSB extends ORM {
); );
} }
/**
* Try and (un)serialize our data, and if it fails, just return it.
*/
private function _serialize($data,$set=FALSE) {
try {
return $set ? serialize($data) : unserialize($data);
// Maybe the data serialized?
} catch (Exception $e) {
return $data;
}
}
/**
* Retrieve and Store DB BLOB data.
*/
private function _blob($data,$set=FALSE) {
try {
return $set ? gzcompress($this->_serialize($data,$set)) : $this->_serialize(gzuncompress($data));
// Maybe the data isnt compressed?
} catch (Exception $e) {
return $this->_serialize($data,$set);
}
}
/**
* If a column is marked to be nullified if it is empty, this is where it is done.
*/
private function _nullifempty(array $array) {
foreach ($array as $k=>$v) {
if (is_array($v)) {
if (is_null($x=$this->_nullifempty($v)))
unset($array[$k]);
else
$array[$k] = $x;
} else
if (! $v)
unset($array[$k]);
}
return count($array) ? $array : NULL;
}
/** /**
* Auto process some data as it comes from the database * Auto process some data as it comes from the database
* @see parent::__get() * @see parent::__get()
@ -52,9 +101,10 @@ abstract class ORM_OSB extends ORM {
// In case our blob hasnt been saved as one. // In case our blob hasnt been saved as one.
try { try {
$this->_object[$column] = $this->blob($this->_object[$column]); $this->_object[$column] = $this->_blob($this->_object[$column]);
} }
catch(Exception $e) { catch(Exception $e) {
echo Debug::vars($e);die();
// @todo Log this exception // @todo Log this exception
echo Kohana_Exception::text($e), "\n"; echo Kohana_Exception::text($e), "\n";
echo debug_print_backtrace(); echo debug_print_backtrace();
@ -116,23 +166,6 @@ abstract class ORM_OSB extends ORM {
} }
} }
final public static function xform($table,$blank=FALSE) {
return ORM::factory($table)->formselect($blank);
}
/**
* Retrieve and Store DB BLOB data.
*/
private function blob($data,$set=FALSE) {
try {
return $set ? gzcompress(serialize($data)) : unserialize(gzuncompress($data));
// Maybe the data isnt compressed?
} catch (Exception $e) {
return $set ? serialize($data) : unserialize($data);
}
}
public function config($key) { public function config($key) {
$mc = Config::instance()->module_config($this->_object_name); $mc = Config::instance()->module_config($this->_object_name);
@ -176,18 +209,6 @@ abstract class ORM_OSB extends ORM {
return TRUE; return TRUE;
} }
public function xformselect($blank) {
$result = array();
if ($blank)
$result[] = '';
foreach ($this->find_all() as $o)
$result[$o->{$this->_form['id']}] = $o->{$this->_form['value']};
return $result;
}
public function keyget($column,$key=NULL) { public function keyget($column,$key=NULL) {
if (is_null($key) OR ! is_array($this->$column)) if (is_null($key) OR ! is_array($this->$column))
return $this->$column; return $this->$column;
@ -202,10 +223,19 @@ abstract class ORM_OSB extends ORM {
public function save(Validation $validation = NULL) { public function save(Validation $validation = NULL) {
// Find any fields that have changed, and process them. // Find any fields that have changed, and process them.
if ($this->_changed) if ($this->_changed)
foreach ($this->_changed as $c) foreach ($this->_changed as $c) {
// Convert to NULL
if (in_array($c,$this->_nullifempty)) {
if (is_array($this->_object[$c]))
$this->_object[$c] = $this->_nullifempty($this->_object[$c]);
elseif (! $this->_object[$c])
$this->_object[$c] = NULL;
}
// Any fields that are blobs, and encode them. // Any fields that are blobs, and encode them.
if ($this->_table_columns[$c]['data_type'] == 'blob') { if (! is_null($this->_object[$c]) AND $this->_table_columns[$c]['data_type'] == 'blob') {
$this->_object[$c] = $this->blob($this->_object[$c],TRUE); $this->_object[$c] = $this->_blob($this->_object[$c],TRUE);
// We need to reset our auto_convert flag // We need to reset our auto_convert flag
if (isset($this->_table_columns[$c]['auto_convert'])) if (isset($this->_table_columns[$c]['auto_convert']))
@ -215,14 +245,51 @@ abstract class ORM_OSB extends ORM {
} elseif (is_array($this->_object[$c]) AND in_array($c,$this->_serialize_column)) { } elseif (is_array($this->_object[$c]) AND in_array($c,$this->_serialize_column)) {
$this->_object[$c] = serialize($this->_object[$c]); $this->_object[$c] = serialize($this->_object[$c]);
} }
}
return parent::save($validation); return parent::save($validation);
} }
public function status($render=FALSE) {
if (! isset($this->_table_columns['status']))
return NULL;
if (! $render)
return $this->display('status');
return View::factory(Config::theme().'/status')
->set('label',$this->status ? 'label-success' : '')
->set('status',$this->display('status'));
}
/**
* Function help to find records that are active
*/
public function list_active() {
return $this->_where_active()->find_all();
}
public function list_count($active=TRUE) { public function list_count($active=TRUE) {
$x=($active ? $this->_where_active() : $this); $x=($active ? $this->_where_active() : $this);
return $x->find_all()->count(); return $x->find_all()->count();
} }
/**
* Return an array of data that can be used in a SELECT statement.
* The ID and VALUE is defined in the model for the select.
*/
public function list_select($blank=FALSE) {
$result = array();
if ($blank)
$result[] = '';
if ($this->_form AND array_intersect(array('id','value'),$this->_form))
foreach ($this->find_all() as $o)
$result[$o->{$this->_form['id']}] = $o->{$this->_form['value']};
return $result;
}
} }
?> ?>

View File

@ -27,5 +27,31 @@ class Request extends Kohana_Request {
return parent::directory($directory); return parent::directory($directory);
} }
/**
* Get our Module_Method object for this request
*/
public function mmo() {
static $result = FALSE;
if (is_null($result) OR $result)
return $result;
$result = NULL;
$mo = ORM::factory('Module',array('name'=>$this->_controller));
if ($mo->loaded() AND $mo->status) {
$method = strtolower($this->_directory ? sprintf('%s_%s',$this->_directory,$this->_action) : $this->_action);
// Get the method number
$mmo = ORM::factory('Module_Method',array('module_id'=>$mo->id,'name'=>$method));
if ($mmo->loaded())
$result = $mmo;
}
return $result;
}
} }
?> ?>

View File

@ -10,33 +10,16 @@
* @license http://dev.osbill.net/license.html * @license http://dev.osbill.net/license.html
*/ */
abstract class StaticList { abstract class StaticList {
// This is our list of items that will be rendered // Our Static Items List
protected $list = array(); abstract protected function _table();
/** // To get an individual item from the table
* Each static list type must provide the table function that contains // @note This must be declared in the child class due to static scope
* the table of list and values. //abstract public static function get($value);
*/
abstract protected function table();
public static function factory() {
throw new Kohana_Exception(':class is calling :method, when it should have its own method',
array(':class'=>get_called_class(),':method'=>__METHOD__));
}
/**
* Display a static name for a value
*
* @param key $id value to render
* @see _display()
*/
public static function display($value) {
return static::_display($value);
}
// Due to static scope, sometimes we need to call this function from the child class. // Due to static scope, sometimes we need to call this function from the child class.
protected static function _display($id) { protected function _get($id) {
$table = static::factory()->table(); $table = $this->_table();
if (! $table) if (! $table)
return 'No Table'; return 'No Table';
@ -47,10 +30,13 @@ abstract class StaticList {
} }
/** /**
* Lists our available keys * Setup our class instantiation
* @note This must be declared in the child class due to static scope
*/ */
public static function keys() { public static function factory() {
return array_keys(static::factory()->table()); $x = get_called_class();
return new $x;
} }
/** /**
@ -59,13 +45,24 @@ abstract class StaticList {
* @param string Form name to render * @param string Form name to render
* @param string Default value to populate in the Form input. * @param string Default value to populate in the Form input.
*/ */
public static function form($name,$default='',$addblank=FALSE) { public static function form($name,$default='',$addblank=FALSE,array $attributes=NULL) {
$table = static::factory()->table(); $table = static::factory()->_table();
if ($addblank) if ($addblank)
$table = array_merge(array(''=>'&nbsp;'),$table); $table = array_merge(array(''=>'&nbsp;'),$table);
return Form::Select($name,$table,$default); return Form::Select($name,$table,$default,$attributes);
}
/**
* Lists our available keys
*/
public static function keys() {
return array_keys(static::factory()->_table());
}
public static function table() {
return static::factory()->_table();
} }
} }
?> ?>

View File

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

View File

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

View File

@ -10,7 +10,7 @@
* @license http://dev.osbill.net/license.html * @license http://dev.osbill.net/license.html
*/ */
class StaticList_RecurSchedule extends StaticList { class StaticList_RecurSchedule extends StaticList {
protected function table() { protected function _table() {
return array( return array(
0=>_('Weekly'), 0=>_('Weekly'),
1=>_('Monthly'), 1=>_('Monthly'),
@ -22,34 +22,8 @@ class StaticList_RecurSchedule extends StaticList {
); );
} }
public static function factory() { public static function get($value) {
return new StaticList_RecurSchedule; return static::factory()->_get($value);
}
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);
} }
} }
?> ?>

View File

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

View File

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

View File

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

View File

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

View File

@ -13,7 +13,6 @@ class URL extends Kohana_URL {
// Our method paths for different functions // Our method paths for different functions
public static $method_directory = array( public static $method_directory = array(
'admin'=>'a', 'admin'=>'a',
'affiliate'=>'affiliate', // @todo To retire
'reseller'=>'r', 'reseller'=>'r',
'task'=>'task', 'task'=>'task',
'user'=>'u', 'user'=>'u',

View File

@ -13,7 +13,6 @@
return array( return array(
'appname' => 'OS Billing', // Our application name, as shown in the title bar of pages 'appname' => 'OS Billing', // Our application name, as shown in the title bar of pages
'cache_type' => 'file',
'email_from' => array('noreply@graytech.net.au'=>'Graytech Hosting'), 'email_from' => array('noreply@graytech.net.au'=>'Graytech Hosting'),
'email_admin_only'=> array( 'email_admin_only'=> array(
// 'adsl_traffic_notice'=>array('deon@leenooks.vpn'=>'Deon George'), // 'adsl_traffic_notice'=>array('deon@leenooks.vpn'=>'Deon George'),
@ -24,8 +23,8 @@ return array(
), ),
'bsb' => '633-000', // @todo This should come from the DB 'bsb' => '633-000', // @todo This should come from the DB
'accnum' => '120 440 821', // @todo This should come from the DB 'accnum' => '120 440 821', // @todo This should come from the DB
'theme' => 'yaml', // @todo This should be in the DB 'theme' => 'focusbusiness', // @todo This should be in the DB
'theme_admin' => 'yaml', // @todo This should be in the DB 'theme_admin' => 'baseadmin', // @todo This should be in the DB
'tmpdir' => '/tmp', 'tmpdir' => '/tmp',
); );
?> ?>

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 331 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 B

View File

@ -1,61 +0,0 @@
/*
* jsTree apple theme 1.0
* Supported features: dots/no-dots, icons/no-icons, focused, loading
* Supported plugins: ui (hovered, clicked), checkbox, contextmenu, search
*/
.jstree-apple > ul { background:url("bg.jpg") left top repeat; }
.jstree-apple li,
.jstree-apple ins { background-image:url("d.png"); background-repeat:no-repeat; background-color:transparent; }
.jstree-apple li { background-position:-90px 0; background-repeat:repeat-y; }
.jstree-apple li.jstree-last { background:transparent; }
.jstree-apple .jstree-open > ins { background-position:-72px 0; }
.jstree-apple .jstree-closed > ins { background-position:-54px 0; }
.jstree-apple .jstree-leaf > ins { background-position:-36px 0; }
.jstree-apple a { border-radius:4px; -moz-border-radius:4px; -webkit-border-radius:4px; text-shadow:1px 1px 1px white; }
.jstree-apple .jstree-hovered { background:#e7f4f9; border:1px solid #d8f0fa; padding:0 3px 0 1px; text-shadow:1px 1px 1px silver; }
.jstree-apple .jstree-clicked { background:#beebff; border:1px solid #99defd; padding:0 3px 0 1px; }
.jstree-apple a .jstree-icon { background-position:-56px -20px; }
.jstree-apple a.jstree-loading .jstree-icon { background:url("throbber.gif") center center no-repeat !important; }
.jstree-apple.jstree-focused { background:white; }
.jstree-apple .jstree-no-dots li,
.jstree-apple .jstree-no-dots .jstree-leaf > ins { background:transparent; }
.jstree-apple .jstree-no-dots .jstree-open > ins { background-position:-18px 0; }
.jstree-apple .jstree-no-dots .jstree-closed > ins { background-position:0 0; }
.jstree-apple .jstree-no-icons a .jstree-icon { display:none; }
.jstree-apple .jstree-search { font-style:italic; }
.jstree-apple .jstree-no-icons .jstree-checkbox { display:inline-block; }
.jstree-apple .jstree-no-checkboxes .jstree-checkbox { display:none !important; }
.jstree-apple .jstree-checked > a > .jstree-checkbox { background-position:-38px -19px; }
.jstree-apple .jstree-unchecked > a > .jstree-checkbox { background-position:-2px -19px; }
.jstree-apple .jstree-undetermined > a > .jstree-checkbox { background-position:-20px -19px; }
.jstree-apple .jstree-checked > a > .checkbox:hover { background-position:-38px -37px; }
.jstree-apple .jstree-unchecked > a > .jstree-checkbox:hover { background-position:-2px -37px; }
.jstree-apple .jstree-undetermined > a > .jstree-checkbox:hover { background-position:-20px -37px; }
#vakata-dragged.jstree-apple ins { background:transparent !important; }
#vakata-dragged.jstree-apple .jstree-ok { background:url("d.png") -2px -53px no-repeat !important; }
#vakata-dragged.jstree-apple .jstree-invalid { background:url("d.png") -18px -53px no-repeat !important; }
#jstree-marker.jstree-apple { background:url("d.png") -41px -57px no-repeat !important; text-indent:-100px; }
.jstree-apple a.jstree-search { color:aqua; }
.jstree-apple .jstree-locked a { color:silver; cursor:default; }
#vakata-contextmenu.jstree-apple-context,
#vakata-contextmenu.jstree-apple-context li ul { background:#f0f0f0; border:1px solid #979797; -moz-box-shadow: 1px 1px 2px #999; -webkit-box-shadow: 1px 1px 2px #999; box-shadow: 1px 1px 2px #999; }
#vakata-contextmenu.jstree-apple-context li { }
#vakata-contextmenu.jstree-apple-context a { color:black; }
#vakata-contextmenu.jstree-apple-context a:hover,
#vakata-contextmenu.jstree-apple-context .vakata-hover > a { padding:0 5px; background:#e8eff7; border:1px solid #aecff7; color:black; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; }
#vakata-contextmenu.jstree-apple-context li.jstree-contextmenu-disabled a,
#vakata-contextmenu.jstree-apple-context li.jstree-contextmenu-disabled a:hover { color:silver; background:transparent; border:0; padding:1px 4px; }
#vakata-contextmenu.jstree-apple-context li.vakata-separator { background:white; border-top:1px solid #e0e0e0; margin:0; }
#vakata-contextmenu.jstree-apple-context li ul { margin-left:-4px; }
/* TODO: IE6 support - the `>` selectors */

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 B

View File

@ -1,77 +0,0 @@
/*
* jsTree classic theme 1.0
* Supported features: dots/no-dots, icons/no-icons, focused, loading
* Supported plugins: ui (hovered, clicked), checkbox, contextmenu, search
*/
.jstree-classic li,
.jstree-classic ins { background-image:url("d.png"); background-repeat:no-repeat; background-color:transparent; }
.jstree-classic li { background-position:-90px 0; background-repeat:repeat-y; }
.jstree-classic li.jstree-last { background:transparent; }
.jstree-classic .jstree-open > ins { background-position:-72px 0; }
.jstree-classic .jstree-closed > ins { background-position:-54px 0; }
.jstree-classic .jstree-leaf > ins { background-position:-36px 0; }
.jstree-classic .jstree-hovered { background:#AABBCC; border:0px solid #FFFFFF; padding:0 2px 0 1px; }
.jstree-classic .jstree-clicked { background:#E6E6E8; border:0px solid #FFFFFF; padding:0 2px 0 1px; }
.jstree-classic a .jstree-icon { background-position:-56px -19px; }
.jstree-classic .jstree-open > a .jstree-icon { background-position:-56px -36px; }
.jstree-classic a.jstree-loading .jstree-icon { background:url("throbber.gif") center center no-repeat !important; }
/* .jstree-classic.jstree-focused { background:#FCFCFE; } */
.jstree-classic .jstree-no-dots li,
.jstree-classic .jstree-no-dots .jstree-leaf > ins { background:transparent; }
.jstree-classic .jstree-no-dots .jstree-open > ins { background-position:-18px 0; }
.jstree-classic .jstree-no-dots .jstree-closed > ins { background-position:0 0; }
.jstree-classic .jstree-no-icons a .jstree-icon { display:none; }
.jstree-classic .jstree-search { font-style:italic; }
.jstree-classic .jstree-no-icons .jstree-checkbox { display:inline-block; }
.jstree-classic .jstree-no-checkboxes .jstree-checkbox { display:none !important; }
.jstree-classic .jstree-checked > a > .jstree-checkbox { background-position:-38px -19px; }
.jstree-classic .jstree-unchecked > a > .jstree-checkbox { background-position:-2px -19px; }
.jstree-classic .jstree-undetermined > a > .jstree-checkbox { background-position:-20px -19px; }
.jstree-classic .jstree-checked > a > .jstree-checkbox:hover { background-position:-38px -37px; }
.jstree-classic .jstree-unchecked > a > .jstree-checkbox:hover { background-position:-2px -37px; }
.jstree-classic .jstree-undetermined > a > .jstree-checkbox:hover { background-position:-20px -37px; }
#vakata-dragged.jstree-classic ins { background:transparent !important; }
#vakata-dragged.jstree-classic .jstree-ok { background:url("d.png") -2px -53px no-repeat !important; }
#vakata-dragged.jstree-classic .jstree-invalid { background:url("d.png") -18px -53px no-repeat !important; }
#jstree-marker.jstree-classic { background:url("d.png") -41px -57px no-repeat !important; text-indent:-100px; }
.jstree-classic a.jstree-search { color:aqua; }
.jstree-classic .jstree-locked a { color:silver; cursor:default; }
#vakata-contextmenu.jstree-classic-context,
#vakata-contextmenu.jstree-classic-context li ul { background:#f0f0f0; border:1px solid #979797; -moz-box-shadow: 1px 1px 2px #999; -webkit-box-shadow: 1px 1px 2px #999; box-shadow: 1px 1px 2px #999; }
#vakata-contextmenu.jstree-classic-context li { }
#vakata-contextmenu.jstree-classic-context a { color:black; }
#vakata-contextmenu.jstree-classic-context a:hover,
#vakata-contextmenu.jstree-classic-context .vakata-hover > a { padding:0 5px; background:#e8eff7; border:1px solid #aecff7; color:black; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; }
#vakata-contextmenu.jstree-classic-context li.jstree-contextmenu-disabled a,
#vakata-contextmenu.jstree-classic-context li.jstree-contextmenu-disabled a:hover { color:silver; background:transparent; border:0; padding:1px 4px; }
#vakata-contextmenu.jstree-classic-context li.vakata-separator { background:white; border-top:1px solid #e0e0e0; margin:0; }
#vakata-contextmenu.jstree-classic-context li ul { margin-left:-4px; }
/* IE6 BEGIN */
.jstree-classic li,
.jstree-classic ins,
#vakata-dragged.jstree-classic .jstree-invalid,
#vakata-dragged.jstree-classic .jstree-ok,
#jstree-marker.jstree-classic { _background-image:url("d.gif"); }
.jstree-classic .jstree-open ins { _background-position:-72px 0; }
.jstree-classic .jstree-closed ins { _background-position:-54px 0; }
.jstree-classic .jstree-leaf ins { _background-position:-36px 0; }
.jstree-classic .jstree-open a ins.jstree-icon { _background-position:-56px -36px; }
.jstree-classic .jstree-closed a ins.jstree-icon { _background-position:-56px -19px; }
.jstree-classic .jstree-leaf a ins.jstree-icon { _background-position:-56px -19px; }
#vakata-contextmenu.jstree-classic-context ins { _display:none; }
#vakata-contextmenu.jstree-classic-context li { _zoom:1; }
.jstree-classic .jstree-undetermined a .jstree-checkbox { _background-position:-20px -19px; }
.jstree-classic .jstree-checked a .jstree-checkbox { _background-position:-38px -19px; }
.jstree-classic .jstree-unchecked a .jstree-checkbox { _background-position:-2px -19px; }
/* IE6 END */

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 132 B

View File

@ -1,84 +0,0 @@
/*
* jsTree default-rtl theme 1.0
* Supported features: dots/no-dots, icons/no-icons, focused, loading
* Supported plugins: ui (hovered, clicked), checkbox, contextmenu, search
*/
.jstree-default-rtl li,
.jstree-default-rtl ins { background-image:url("d.png"); background-repeat:no-repeat; background-color:transparent; }
.jstree-default-rtl li { background-position:-90px 0; background-repeat:repeat-y; }
.jstree-default-rtl li.jstree-last { background:transparent; }
.jstree-default-rtl .jstree-open > ins { background-position:-72px 0; }
.jstree-default-rtl .jstree-closed > ins { background-position:-54px 0; }
.jstree-default-rtl .jstree-leaf > ins { background-position:-36px 0; }
.jstree-default-rtl .jstree-hovered { background:#e7f4f9; border:1px solid #d8f0fa; padding:0 2px 0 1px; }
.jstree-default-rtl .jstree-clicked { background:#beebff; border:1px solid #99defd; padding:0 2px 0 1px; }
.jstree-default-rtl a .jstree-icon { background-position:-56px -19px; }
.jstree-default-rtl a.jstree-loading .jstree-icon { background:url("throbber.gif") center center no-repeat !important; }
.jstree-default-rtl.jstree-focused { background:#ffffee; }
.jstree-default-rtl .jstree-no-dots li,
.jstree-default-rtl .jstree-no-dots .jstree-leaf > ins { background:transparent; }
.jstree-default-rtl .jstree-no-dots .jstree-open > ins { background-position:-18px 0; }
.jstree-default-rtl .jstree-no-dots .jstree-closed > ins { background-position:0 0; }
.jstree-default-rtl .jstree-no-icons a .jstree-icon { display:none; }
.jstree-default-rtl .jstree-search { font-style:italic; }
.jstree-default-rtl .jstree-no-icons .jstree-checkbox { display:inline-block; }
.jstree-default-rtl .jstree-no-checkboxes .jstree-checkbox { display:none !important; }
.jstree-default-rtl .jstree-checked > a > .jstree-checkbox { background-position:-38px -19px; }
.jstree-default-rtl .jstree-unchecked > a > .jstree-checkbox { background-position:-2px -19px; }
.jstree-default-rtl .jstree-undetermined > a > .jstree-checkbox { background-position:-20px -19px; }
.jstree-default-rtl .jstree-checked > a > .jstree-checkbox:hover { background-position:-38px -37px; }
.jstree-default-rtl .jstree-unchecked > a > .jstree-checkbox:hover { background-position:-2px -37px; }
.jstree-default-rtl .jstree-undetermined > a > .jstree-checkbox:hover { background-position:-20px -37px; }
#vakata-dragged.jstree-default-rtl ins { background:transparent !important; }
#vakata-dragged.jstree-default-rtl .jstree-ok { background:url("d.png") -2px -53px no-repeat !important; }
#vakata-dragged.jstree-default-rtl .jstree-invalid { background:url("d.png") -18px -53px no-repeat !important; }
#jstree-marker.jstree-default-rtl { background:url("d.png") -41px -57px no-repeat !important; text-indent:-100px; }
.jstree-default-rtl a.jstree-search { color:aqua; }
.jstree-default-rtl .jstree-locked a { color:silver; cursor:default; }
#vakata-contextmenu.jstree-default-rtl-context,
#vakata-contextmenu.jstree-default-rtl-context li ul { background:#f0f0f0; border:1px solid #979797; -moz-box-shadow: 1px 1px 2px #999; -webkit-box-shadow: 1px 1px 2px #999; box-shadow: 1px 1px 2px #999; }
#vakata-contextmenu.jstree-default-rtl-context li { }
#vakata-contextmenu.jstree-default-rtl-context a { color:black; }
#vakata-contextmenu.jstree-default-rtl-context a:hover,
#vakata-contextmenu.jstree-default-rtl-context .vakata-hover > a { padding:0 5px; background:#e8eff7; border:1px solid #aecff7; color:black; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; }
#vakata-contextmenu.jstree-default-rtl-context li.jstree-contextmenu-disabled a,
#vakata-contextmenu.jstree-default-rtl-context li.jstree-contextmenu-disabled a:hover { color:silver; background:transparent; border:0; padding:1px 4px; }
#vakata-contextmenu.jstree-default-rtl-context li.vakata-separator { background:white; border-top:1px solid #e0e0e0; margin:0; }
#vakata-contextmenu.jstree-default-rtl-context li ul { margin-left:-4px; }
/* IE6 BEGIN */
.jstree-default-rtl li,
.jstree-default-rtl ins,
#vakata-dragged.jstree-default-rtl .jstree-invalid,
#vakata-dragged.jstree-default-rtl .jstree-ok,
#jstree-marker.jstree-default-rtl { _background-image:url("d.gif"); }
.jstree-default-rtl .jstree-open ins { _background-position:-72px 0; }
.jstree-default-rtl .jstree-closed ins { _background-position:-54px 0; }
.jstree-default-rtl .jstree-leaf ins { _background-position:-36px 0; }
.jstree-default-rtl a ins.jstree-icon { _background-position:-56px -19px; }
#vakata-contextmenu.jstree-default-rtl-context ins { _display:none; }
#vakata-contextmenu.jstree-default-rtl-context li { _zoom:1; }
.jstree-default-rtl .jstree-undetermined a .jstree-checkbox { _background-position:-18px -19px; }
.jstree-default-rtl .jstree-checked a .jstree-checkbox { _background-position:-36px -19px; }
.jstree-default-rtl .jstree-unchecked a .jstree-checkbox { _background-position:0px -19px; }
/* IE6 END */
/* RTL part */
.jstree-default-rtl .jstree-hovered, .jstree-default-rtl .jstree-clicked { padding:0 1px 0 2px; }
.jstree-default-rtl li { background-image:url("dots.gif"); background-position: 100% 0px; }
.jstree-default-rtl .jstree-checked > a > .jstree-checkbox { background-position:-36px -19px; margin-left:2px; }
.jstree-default-rtl .jstree-unchecked > a > .jstree-checkbox { background-position:0px -19px; margin-left:2px; }
.jstree-default-rtl .jstree-undetermined > a > .jstree-checkbox { background-position:-18px -19px; margin-left:2px; }
.jstree-default-rtl .jstree-checked > a > .jstree-checkbox:hover { background-position:-36px -37px; }
.jstree-default-rtl .jstree-unchecked > a > .jstree-checkbox:hover { background-position:0px -37px; }
.jstree-default-rtl .jstree-undetermined > a > .jstree-checkbox:hover { background-position:-18px -37px; }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

View File

@ -1,74 +0,0 @@
/*
* jsTree default theme 1.0
* Supported features: dots/no-dots, icons/no-icons, focused, loading
* Supported plugins: ui (hovered, clicked), checkbox, contextmenu, search
*/
.jstree-default li,
.jstree-default ins { background-image:url("d.png"); background-repeat:no-repeat; background-color:transparent; }
.jstree-default li { background-position:-90px 0; background-repeat:repeat-y; }
.jstree-default li.jstree-last { background:transparent; }
.jstree-default .jstree-open > ins { background-position:-72px 0; }
.jstree-default .jstree-closed > ins { background-position:-54px 0; }
.jstree-default .jstree-leaf > ins { background-position:-36px 0; }
.jstree-default .jstree-hovered { background:#e7f4f9; border:1px solid #d8f0fa; padding:0 2px 0 1px; }
.jstree-default .jstree-clicked { background:#beebff; border:1px solid #99defd; padding:0 2px 0 1px; }
.jstree-default a .jstree-icon { background-position:-56px -19px; }
.jstree-default a.jstree-loading .jstree-icon { background:url("throbber.gif") center center no-repeat !important; }
.jstree-default.jstree-focused { background:#ffffee; }
.jstree-default .jstree-no-dots li,
.jstree-default .jstree-no-dots .jstree-leaf > ins { background:transparent; }
.jstree-default .jstree-no-dots .jstree-open > ins { background-position:-18px 0; }
.jstree-default .jstree-no-dots .jstree-closed > ins { background-position:0 0; }
.jstree-default .jstree-no-icons a .jstree-icon { display:none; }
.jstree-default .jstree-search { font-style:italic; }
.jstree-default .jstree-no-icons .jstree-checkbox { display:inline-block; }
.jstree-default .jstree-no-checkboxes .jstree-checkbox { display:none !important; }
.jstree-default .jstree-checked > a > .jstree-checkbox { background-position:-38px -19px; }
.jstree-default .jstree-unchecked > a > .jstree-checkbox { background-position:-2px -19px; }
.jstree-default .jstree-undetermined > a > .jstree-checkbox { background-position:-20px -19px; }
.jstree-default .jstree-checked > a > .jstree-checkbox:hover { background-position:-38px -37px; }
.jstree-default .jstree-unchecked > a > .jstree-checkbox:hover { background-position:-2px -37px; }
.jstree-default .jstree-undetermined > a > .jstree-checkbox:hover { background-position:-20px -37px; }
#vakata-dragged.jstree-default ins { background:transparent !important; }
#vakata-dragged.jstree-default .jstree-ok { background:url("d.png") -2px -53px no-repeat !important; }
#vakata-dragged.jstree-default .jstree-invalid { background:url("d.png") -18px -53px no-repeat !important; }
#jstree-marker.jstree-default { background:url("d.png") -41px -57px no-repeat !important; text-indent:-100px; }
.jstree-default a.jstree-search { color:aqua; }
.jstree-default .jstree-locked a { color:silver; cursor:default; }
#vakata-contextmenu.jstree-default-context,
#vakata-contextmenu.jstree-default-context li ul { background:#f0f0f0; border:1px solid #979797; -moz-box-shadow: 1px 1px 2px #999; -webkit-box-shadow: 1px 1px 2px #999; box-shadow: 1px 1px 2px #999; }
#vakata-contextmenu.jstree-default-context li { }
#vakata-contextmenu.jstree-default-context a { color:black; }
#vakata-contextmenu.jstree-default-context a:hover,
#vakata-contextmenu.jstree-default-context .vakata-hover > a { padding:0 5px; background:#e8eff7; border:1px solid #aecff7; color:black; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; }
#vakata-contextmenu.jstree-default-context li.jstree-contextmenu-disabled a,
#vakata-contextmenu.jstree-default-context li.jstree-contextmenu-disabled a:hover { color:silver; background:transparent; border:0; padding:1px 4px; }
#vakata-contextmenu.jstree-default-context li.vakata-separator { background:white; border-top:1px solid #e0e0e0; margin:0; }
#vakata-contextmenu.jstree-default-context li ul { margin-left:-4px; }
/* IE6 BEGIN */
.jstree-default li,
.jstree-default ins,
#vakata-dragged.jstree-default .jstree-invalid,
#vakata-dragged.jstree-default .jstree-ok,
#jstree-marker.jstree-default { _background-image:url("d.gif"); }
.jstree-default .jstree-open ins { _background-position:-72px 0; }
.jstree-default .jstree-closed ins { _background-position:-54px 0; }
.jstree-default .jstree-leaf ins { _background-position:-36px 0; }
.jstree-default a ins.jstree-icon { _background-position:-56px -19px; }
#vakata-contextmenu.jstree-default-context ins { _display:none; }
#vakata-contextmenu.jstree-default-context li { _zoom:1; }
.jstree-default .jstree-undetermined a .jstree-checkbox { _background-position:-20px -19px; }
.jstree-default .jstree-checked a .jstree-checkbox { _background-position:-38px -19px; }
.jstree-default .jstree-unchecked a .jstree-checkbox { _background-position:-2px -19px; }
/* IE6 END */

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -1,72 +0,0 @@
/**
* "Yet Another Multicolumn Layout" - (X)HTML/CSS Framework
*
* (en) Workaround for IE8 und Webkit browsers to fix focus problems when using skiplinks
* (de) Workaround für IE8 und Webkit browser, um den Focus zu korrigieren, bei Verwendung von Skiplinks
*
* @note inspired by Paul Ratcliffe's article
* http://www.communis.co.uk/blog/2009-06-02-skip-links-chrome-safari-and-added-wai-aria
* Many thanks to Mathias Schäfer (http://molily.de/) for his code improvements
*
* @copyright Copyright 2005-2011, Dirk Jesse
* @license CC-A 2.0 (http://creativecommons.org/licenses/by/2.0/),
* YAML-C (http://www.yaml.de/en/license/license-conditions.html)
* @link http://www.yaml.de
* @package yaml
* @version 3.3.1
* @revision $Revision: 501 $
* @lastmodified $Date: 2011-06-18 17:27:44 +0200 (Sa, 18 Jun 2011) $
*/
(function () {
var YAML_focusFix = {
skipClass : 'skip',
init : function () {
var userAgent = navigator.userAgent.toLowerCase();
var is_webkit = userAgent.indexOf('webkit') > -1;
var is_ie = userAgent.indexOf('msie') > -1;
if (is_webkit || is_ie) {
var body = document.body,
handler = YAML_focusFix.click;
if (body.addEventListener) {
body.addEventListener('click', handler, false);
} else if (body.attachEvent) {
body.attachEvent('onclick', handler);
}
}
},
trim : function (str) {
return str.replace(/^\s\s*/, '').replace(/\s\s*$/, '');
},
click : function (e) {
e = e || window.event;
var target = e.target || e.srcElement;
var a = target.className.split(' ');
for (var i=0; i < a.length; i++) {
var cls = YAML_focusFix.trim(a[i]);
if ( cls === YAML_focusFix.skipClass) {
YAML_focusFix.focus(target);
break;
}
}
},
focus : function (link) {
if (link.href) {
var href = link.href,
id = href.substr(href.indexOf('#') + 1),
target = document.getElementById(id);
if (target) {
target.setAttribute("tabindex", "-1");
target.focus();
}
}
}
};
YAML_focusFix.init();
})();

View File

@ -1,250 +0,0 @@
/**
* "Yet Another Multicolumn Layout" - (X)HTML/CSS Framework
*
* (en) YAML core stylesheet
* (de) YAML Basis-Stylesheet
*
* Don't make any changes in this file!
* Your changes should be placed in any css-file in your own stylesheet folder.
*
* @copyright Copyright 2005-2011, Dirk Jesse
* @license CC-A 2.0 (http://creativecommons.org/licenses/by/2.0/),
* YAML-C (http://www.yaml.de/en/license/license-conditions.html)
* @link http://www.yaml.de
* @package yaml
* @version 3.3.1
* @revision $Revision: 501 $
* @lastmodified $Date: 2011-06-18 17:27:44 +0200 (Sa, 18 Jun 2011) $
*/
@media all
{
/**
* @section browser reset
* @see http://www.yaml.de/en/documentation/css-components/base-stylesheet.html
*/
/* (en) Global reset of paddings and margins for all HTML elements */
/* (de) Globales Zurücksetzen der Innen- und Außenabstände für alle HTML-Elemente */
* { margin:0; padding:0; }
/* (en) Correction:margin/padding reset caused too small select boxes. */
/* (de) Korrektur:Das Zurücksetzen der Abstände verursacht zu kleine Selectboxen. */
option { padding-left:0.4em; } /* LTR */
select { padding:1px; }
/**
* (en) Global fix of the Italics bugs in IE 5.x and IE 6
* (de) Globale Korrektur des Italics Bugs des IE 5.x und IE 6
*
* @bugfix
* @affected IE 5.x/Win, IE6
* @css-for IE 5.x/Win, IE6
* @valid yes
*/
* html body * { overflow:visible; }
body {
/* (en) Fix for rounding errors when scaling font sizes in older versions of Opera browser */
/* (de) Beseitigung von Rundungsfehler beim Skalieren von Schriftgrößen in älteren Opera Versionen */
font-size:100.01%;
/* (en) Standard values for colors and text alignment */
/* (de) Vorgabe der Standardfarben und Textausrichtung */
background:#fff;
color:#000;
text-align:left; /* LTR */
}
/* (en) avoid visible outlines on DIV containers in Webkit browsers */
/* (de) Vermeidung sichtbarer Outline-Rahmen in Webkit-Browsern */
div { outline:0 none; }
/* (en) HTML 5 - adjusting visual formatting model to block level */
/* (en) HTML 5 - Anpassung des visuellen Formatmodells auf Blockelemente */
article,aside,canvas,details,figcaption,figure,
footer,header,hgroup,menu,nav,section,summary {
display:block;
}
/* (en) Clear borders for <fieldset> and <img> elements */
/* (de) Rahmen für <fieldset> und <img> Elemente löschen */
fieldset, img { border:0 solid; }
/* (en) new standard values for lists, blockquote and cite */
/* (de) Neue Standardwerte für Listen & Zitate */
ul, ol, dl { margin:0 0 1em 1em; } /* LTR */
li {
line-height:1.5em;
margin-left:0.8em; /* LTR */
}
dt { font-weight:bold; }
dd { margin:0 0 1em 0.8em; } /* LTR */
blockquote { margin:0 0 1em 0.8em; } /* LTR */
blockquote:before, blockquote:after,
q:before, q:after { content:""; }
/*------------------------------------------------------------------------------------------------------*/
/**
* @section clearing methods
* @see http://yaml.de/en/documentation/basics/general.html
*/
/* (en) clearfix method for clearing floats */
/* (de) Clearfix-Methode zum Clearen der Float-Umgebungen */
.clearfix:after {
clear:both;
content:".";
display:block;
font-size:0;
height:0;
visibility:hidden;
}
/* (en) essential for Safari browser !! */
/* (de) Diese Angabe benötigt der Safari-Browser zwingend !! */
.clearfix { display:block; }
/* (en) alternative solution to contain floats */
/* (de) Alternative Methode zum Einschließen von Float-Umgebungen */
.floatbox { display:table; width:100%; }
/* (en) IE-Clearing:Only used in Internet Explorer, switched on in iehacks.css */
/* (de) IE-Clearing:Benötigt nur der Internet Explorer und über iehacks.css zugeschaltet */
#ie_clearing { display:none; }
/*------------------------------------------------------------------------------------------------------*/
/**
* @section hidden elements | Versteckte Elemente
* @see http://www.yaml.de/en/documentation/basics/skip-links.html
*
* (en) skip links and hidden content
* (de) Skip-Links und versteckte Inhalte
*/
/* (en) classes for invisible elements in the base layout */
/* (de) Klassen für unsichtbare Elemente im Basislayout */
.skip, .hideme, .print {
position:absolute;
top:-32768px;
left:-32768px; /* LTR */
}
/* (en) make skip links visible when using tab navigation */
/* (de) Skip-Links für Tab-Navigation sichtbar schalten */
.skip:focus, .skip:active {
position:static;
top:0;
left:0;
}
/* skiplinks:technical setup */
#skiplinks {
position:absolute;
top:0px;
left:-32768px;
z-index:1000;
width:100%;
margin:0;
padding:0;
list-style-type:none;
}
#skiplinks .skip:focus,
#skiplinks .skip:active {
left:32768px;
outline:0 none;
position:absolute;
width:100%;
}
}
@media screen, projection
{
/**
* @section base layout | Basis Layout
* @see http://www.yaml.de/en/documentation/css-components/base-stylesheet.html
*
* |-------------------------------|
* | #col1 | #col3 | #col2 |
* | 20% | flexible | 20% |
* |-------------------------------|
*/
#left { float:left; width:20%; vertical-align:top; }
#right { float:right; width:20%; vertical-align:top; }
#center { width:auto; margin:0 20%; vertical-align:top; }
/* (en) Preparation for absolute positioning within content columns */
/* (de) Vorbereitung für absolute Positionierungen innerhalb der Inhaltsspalten */
#left_content, #right_content, #center_content { position:relative; }
/*------------------------------------------------------------------------------------------------------*/
/**
* @section subtemplates
* @see http://www.yaml.de/en/documentation/practice/subtemplates.html
*/
.subcolumns { display:table; width:100%; table-layout:fixed; }
.subcolumns_oldgecko { width: 100%; float:left; }
.c20l, .c25l, .c33l, .c40l, .c38l, .c50l, .c60l, .c62l, .c66l, .c75l, .c80l { float:left; }
.c20r, .c25r, .c33r, .c40r, .c38r, .c50r, .c60r, .c66r, .c62r, .c75r, .c80r { float:right; margin-left:-5px; }
.c20l, .c20r { width:20%; }
.c40l, .c40r { width:40%; }
.c60l, .c60r { width:60%; }
.c80l, .c80r { width:80%; }
.c25l, .c25r { width:25%; }
.c33l, .c33r { width:33.333%; }
.c50l, .c50r { width:50%; }
.c66l, .c66r { width:66.666%; }
.c75l, .c75r { width:75%; }
.c38l, .c38r { width:38.2%; }
.c62l, .c62r { width:61.8%; }
.subc { padding:0 0.5em; }
.subcl { padding:0 1em 0 0; }
.subcr { padding:0 0 0 1em; }
.equalize, .equalize .subcolumns { table-layout:fixed; }
.equalize > div {
display:table-cell;
float:none;
margin:0;
overflow:hidden;
vertical-align:top;
}
}
@media print
{
/**
* (en) float clearing for subtemplates. Uses display:table to avoid bugs in FF & IE
* (de) Float Clearing für Subtemplates. Verwendet display:table, um Darstellungsprobleme im FF & IE zu vermeiden
*/
.subcolumns,
.subcolumns > div {
overflow:visible;
display:table;
}
/* (en) make .print class visible */
/* (de) .print-Klasse sichtbar schalten */
.print {
position:static;
left:0;
}
/* (en) generic class to hide elements for print */
/* (de) Allgemeine CSS Klasse, um beliebige Elemente in der Druckausgabe auszublenden */
.noprint { display:none !important; }
}

View File

@ -1,225 +0,0 @@
/**
* "Yet Another Multicolumn Layout" - (X)HTML/CSS Framework
*
* (en) Uniform design of standard content elements
* (de) Einheitliche Standardformatierungen für die wichtigten Inhalts-Elemente
*
* @copyright Copyright 2005-2011, Dirk Jesse
* @license CC-A 2.0 (http://creativecommons.org/licenses/by/2.0/),
* YAML-C (http://www.yaml.de/en/license/license-conditions.html)
* @link http://www.yaml.de
* @package yaml
* @version 3.3.1
* @revision $Revision:392 $
* @lastmodified $Date:2009-07-05 12:18:40 +0200 (So, 05. Jul 2009) $
* @appdef yaml
*/
@media all
{
/**
* Fonts
*
* (en) global settings of font-families and font-sizes
* (de) Globale Einstellungen für Zeichensatz und Schriftgrößen
*
* @section content-global-settings
*/
/* (en) reset font size for all elements to standard (16 Pixel) */
/* (de) Alle Schriftgrößen auf Standardgröße (16 Pixel) zurücksetzen */
html * { font-size:100.01%; }
/**
* (en) reset monospaced elements to font size 16px in all browsers
* (de) Schriftgröße von monospaced Elemente in allen Browsern auf 16 Pixel setzen
*
* @see: http://webkit.org/blog/67/strange-medium/
*/
textarea, pre, code, kbd, samp, var, tt {
font-family:Consolas, "Lucida Console", "Andale Mono", "Bitstream Vera Sans Mono", "Courier New", Courier;
}
/* (en) base layout gets standard font size 12px */
/* (de) Basis-Layout erhält Standardschriftgröße von 12 Pixeln */
body {
font-family:Arial, Helvetica, sans-serif;
font-size:75.00%;
color:#444;
}
/*--- Headings | Überschriften ------------------------------------------------------------------------*/
h1,h2,h3,h4,h5,h6 {
font-family:"Times New Roman", Times, serif;
font-weight:normal;
color:#222;
margin:0 0 0.25em 0;
}
h1 { font-size:250%; } /* 30px */
h2 { font-size:200%; } /* 24px */
h3 { font-size:150%; } /* 18px */
h4 { font-size:133.33%; } /* 16px */
h5 { font-size:116.67%; } /* 14px */
h6 { font-size:116.67%; } /* 14px */
/* --- Lists | Listen -------------------------------------------------------------------------------- */
ul, ol, dl { line-height:1.5em; margin:0 0 1em 1em; }
ul { list-style-type:disc; }
ul ul { list-style-type:circle; margin-bottom:0; }
ol { list-style-type:decimal; }
ol ol { list-style-type:lower-latin; margin-bottom:0; }
li { margin-left:0.8em; line-height:1.5em; }
dt { font-weight:bold; }
dd { margin:0 0 1em 0.8em; }
/* --- general text formatting | Allgemeine Textauszeichnung ------------------------------------------ */
p { line-height:1.5em; margin:0 0 1em 0; }
blockquote, cite, q {
font-family:Georgia, "Times New Roman", Times, serif;
font-style:italic;
}
blockquote { margin:0 0 1em 1.6em; color:#666; }
strong,b { font-weight:bold; }
em,i { font-style:italic; }
big { font-size:116.667%; }
small { font-size:91.667%; }
pre { line-height:1.5em; margin:0 0 1em 0; }
pre, code, kbd, tt, samp, var { font-size:100%; }
pre, code { color:#800; }
kbd, samp, var, tt { color:#666; font-weight:bold; }
var, dfn { font-style:italic; }
acronym, abbr {
border-bottom:1px #aaa dotted;
font-variant:small-caps;
letter-spacing:.07em;
cursor:help;
}
sub { vertical-align: sub; font-size: smaller; }
sup { vertical-align: super; font-size: smaller; }
hr {
color:#fff;
background:transparent;
margin:0 0 0.5em 0;
padding:0 0 0.5em 0;
border:0;
border-bottom:1px #eee solid;
}
/*--- Links ----------------------------------------------------------------------------------------- */
a { color:#4D87C7; background:transparent; text-decoration:none; }
a:visited { color:#036; }
/* (en) maximum constrast for tab focus - change with great care */
/* (en) Maximaler Kontrast für Tab Focus - Ändern Sie diese Regel mit Bedacht */
a:focus { text-decoration:underline; color:#000; background: #fff; outline: 3px #f93 solid; }
a:hover,
a:active { color:#182E7A; text-decoration:underline; outline: 0 none; }
/* --- images (with optional captions) | Bilder (mit optionaler Bildunterschrift) ------------------ */
p.icaption_left { float:left; display:inline; margin:0 1em 0.15em 0; }
p.icaption_right { float:right; display:inline; margin:0 0 0.15em 1em; }
p.icaption_left img,
p.icaption_right img { padding:0; border:1px #888 solid; }
p.icaption_left strong,
p.icaption_right strong { display:block; overflow:hidden; margin-top:2px; padding:0.3em 0.5em; background:#eee; font-weight:normal; font-size:91.667%; }
/**
* ------------------------------------------------------------------------------------------------- #
*
* Generic Content Classes
*
* (en) standard classes for positioning and highlighting
* (de) Standardklassen zur Positionierung und Hervorhebung
*
* @section content-generic-classes
*/
.highlight { color:#c30; }
.dimmed { color:#888; }
.info { background:#f8f8f8; color:#666; padding:10px; margin-bottom:0.5em; font-size:91.7%; }
.note { background:#efe; color:#040; border:2px #484 solid; padding:10px; margin-bottom:1em; }
.important { background:#ffe; color:#440; border:2px #884 solid; padding:10px; margin-bottom:1em; }
.warning { background:#fee; color:#400; border:2px #844 solid; padding:10px; margin-bottom:1em; }
.float_left { float:left; display:inline; margin-right:1em; margin-bottom:0.15em; }
.float_right { float:right; display:inline; margin-left:1em; margin-bottom:0.15em; }
.center { display:block; text-align:center; margin:0.5em auto; }
/**
* ------------------------------------------------------------------------------------------------- #
*
* Tables | Tabellen
*
* (en) Generic classes for table-width and design definition
* (de) Generische Klassen für die Tabellenbreite und Gestaltungsvorschriften für Tabellen
*
* @section content-tables
*/
/*
table { width:auto; border-collapse:collapse; margin-bottom:0.5em; border-top:2px #888 solid; border-bottom:2px #888 solid; }
table caption { font-variant:small-caps; }
table.full { width:100%; }
table.fixed { table-layout:fixed; }
th,td { padding:0.5em; }
thead th { color:#000; border-bottom:2px #800 solid; }
tbody th { background:#e0e0e0; color:#333; }
tbody th[scope="row"], tbody th.sub { background:#f0f0f0; }
tbody th { border-bottom:1px solid #fff; text-align:left; }
tbody td { border-bottom:1px solid #eee; }
tbody tr:hover th[scope="row"],
tbody tr:hover tbody th.sub { background:#f0e8e8; }
tbody tr:hover td { background:#fff8f8; }
*/
/**
* ------------------------------------------------------------------------------------------------- #
*
* Miscellaneous | Sonstiges
*
* @section content-misc
*/
/**
* (en) Emphasizing external Hyperlinks via CSS
* (de) Hervorhebung externer Hyperlinks mit CSS
*
* @section content-external-links
* @app-yaml-default disabled
*/
/*
#main a[href^="http://www.my-domain.com"],
#main a[href^="https://www.my-domain.com"]
{
padding-left:12px;
background-image:url('your_image.gif');
background-repeat:no-repeat;
background-position:0 0.45em;
}
*/
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 127 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 915 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 262 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 260 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 306 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 406 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 291 B

View File

@ -1,16 +0,0 @@
@media all {
#nav_main{width:100%;float:left;background:#000 url(images/bg_hnav1.png) repeat-x top left;line-height:0}
#nav_main ul{float:left;display:inline;border-left:1px #000 solid;margin:0 0 0 20px;padding:0}
#nav_main ul li{float:left;display:inline;font-size:1em;line-height:1em;list-style-type:none;border-right:1px #000 solid;margin:0;padding:0}
#nav_main ul li a{display:block;width:auto;font-size:1em;font-weight:400;background:transparent;text-decoration:none;color:#ccc;margin:0;padding:10px 1em}
#nav_main ul li a:focus,#nav_main ul li a:hover,#nav_main ul li a:active{color:#eee;text-decoration:none;background:transparent url(images/bg_hnav1_hover.png) repeat-x top right}
#nav_main ul li#current{background:transparent url(images/bg_hnav1_hover.png) repeat-x top right}
#nav_main ul li#current a,#nav_main ul li#current a:focus,#nav_main ul li#current a:hover,#nav_main ul li#current a:active{color:#fff;font-weight:700;background:transparent;text-decoration:none}
#nav_main2{width:100%;float:left;background:#4e5155;border-top:1px #666 solid;line-height:0;font-size:90%;height:2.2em;overflow:hidden}
#nav_main2 ul{float:left;display:inline;border-left:0 #aaa solid;border-right:0 #fff solid;border-bottom:red 1px solid;margin:0 0 0 21px;padding:0}
#nav_main2 ul li{float:left;display:inline;font-size:1em;line-height:1em;list-style-type:none;border-left:0 #fff solid;border-right:0 #aaa solid;margin:0;padding:0}
#nav_main2 ul li a{display:block;width:auto;font-size:1em;font-weight:400;background:transparent;text-decoration:none;color:#aaa;margin:0;padding:.6em .8em}
#nav_main2 ul li a:focus,#nav_main2 ul li a:hover,#nav_main2 ul li a:active{color:#fff;text-decoration:none}
#nav_main2 ul li#active{background:#4e5155 url(images/bg_hnav2_hover.png) no-repeat bottom center}
#nav_main2 ul li#active a,#nav_main2 ul li#active a:focus,#nav_main2 ul li#active a:hover,#nav_main2 ul li#active a:active{color:#fff;font-weight:700;background:transparent;text-decoration:none}
}

View File

@ -1,14 +0,0 @@
/* base layout */
@import url(../../../css/html5reset-1.6.1.css);
@import url(base.css);
@import url(content.css);
/* import url(iehacks.css); */
/* screen layout */
@import url(screen/basemod.css);
@import url(screen/contentmod.css);
@import url(navigation/nav_buttons.css);
/* import url(navigation/nav_hlist.css); */
/* print layout */
@import url(print/print_100_draft.css);

View File

@ -1,74 +0,0 @@
/**
* "Yet Another Multicolumn Layout" - (X)HTML/CSS Framework
*
* (en) print stylesheet
* (de) Druck-Stylesheet
*
* @copyright Copyright 2005-2011, Dirk Jesse
* @license CC-A 2.0 (http://creativecommons.org/licenses/by/2.0/),
* YAML-C (http://www.yaml.de/en/license/license-conditions.html)
* @link http://www.yaml.de
* @package yaml
* @version 3.3.1
* @revision $Revision:392 $
* @lastmodified $Date:2009-07-05 12:18:40 +0200 (So, 05. Jul 2009) $
*/
@media print
{
/**
* @section basic layout preparation
* @see http://www.yaml.de/en/documentation/css-components/layout-for-print-media.html
*/
/* (en) change font size unit to [pt] - avoiding problems with [px] unit in Gecko based browsers */
/* (de) Wechsel der der Schriftgrößen-Maßheinheit zu [pt] - Probleme mit Maßeinheit [px] in Gecko-basierten Browsern vermeiden */
body { font-size:10pt; }
/* (en) Hide unneeded container of the screenlayout in print layout */
/* (de) Für den Druck nicht benötigte Container des Layouts abschalten */
#topnav, #nav, #search, nav, #info_box { display:none; }
/*------------------------------------------------------------------------------------------------------*/
/* (en) Avoid page breaks right after headings */
/* (de) Vermeidung von Seitenumbrüchen direkt nach einer Überschrift */
h1,h2,h3,h4,h5,h6 { page-break-after:avoid; }
/*------------------------------------------------------------------------------------------------------*/
/**
* @section column selection
* (en) individually switch on/off any content column for printing
* (de) (De)aktivierung der Contentspalten für den Ausdruck
*
* @see http://www.yaml.de/en/documentation/css-components/layout-for-print-media.html
*/
#col1, #col1_content { float:none; width:100%; margin:0; padding:0; border:0; }
#col2 { display:none; }
#col3 { display:none; }
/*------------------------------------------------------------------------------------------------------*/
/* (en) optional output of acronyms and abbreviations*/
/* (de) optionale Ausgabe von Auszeichnung von Abkürzungen */
/*
abbr[title]:after,
acronym[title]:after { content:'(' attr(title) ')'; }
*/
/*------------------------------------------------------------------------------------------------------*/
/* (en) optional URL output of hyperlinks in print layout */
/* (de) optionale Ausgabe der URLs von Hyperlinks */
/*
a[href]:after {
content:" <URL:"attr(href)">";
color:#444;
background:inherit;
font-style:italic;
}
*/
}

View File

@ -1,39 +0,0 @@
@charset "UTF-8";
@media screen, projection {
body{background:#FFF url(../images/bg_dotted.png) repeat;text-align:center;padding:0;overflow-y:scroll}
#page_margins{width:95%;text-align:left;position:relative;margin:auto;overflow:visible;background:#FFF}
#page{width:95%;margin:auto}
#header,#nav,#main,#footer{clear:both}
#nav {overflow:hidden}
#topnav{position:static;background:#000 url(../images/bg_head.png) repeat-x bottom;color:#CCC;text-align:left;font-size:81.25%;border-bottom:1px #000 solid;overflow:hidden;padding:2px 20px;height:15px}
#topnav .langMenu{float:right}
#topnav .langMenu a{float:left;margin-right:.5em}
#topnav .langMenu img{float:left;border:1px solid #444;margin-right:.3em;margin-top:.1em}
#topnav .langMenu img.arrow{border:0;margin-right:0;margin-top:2px}
#topnav .langMenu a span.text{float:left;margin-right:.5em;color:#666}
#topnav .langMenu a:hover span.text{float:left;margin-right:.5em;color:#FFF}
#topnav .langMenu span.text{float:left;margin-right:.5em;color:#FFF}
#topnav .langMenu span.text2{float:left;margin-right:.5em}
#topnav .langMenu span.textOff{float:left;margin-right:.5em;color:#666}
#header{height:60px;color:#FFF;background:#000 url(../images/bg_logo.png) repeat-x top;overflow:hidden}
#header img{font-size:208%;margin:10px 0 0 20px}
#nav_main2 .tx-macinasearchbox-pi1{float:right;margin:.2em 2em 2px 0}
#nav_main2 .tx-macinasearchbox-pi1 input.suchBox{width:12em;padding:.1em}
#shadow{height:10px;background:url(../images/bg_main_bottom.png) repeat-x bottom;border-bottom:1px #888 solid}
#footer{position:relative;color:#888;background:#000 url(../navigation/images/bg_hnav1.png) repeat-x top;line-height:2em;padding:20px 20px 5px;text-align:right;font-size:81.25%}
#backlink{position:absolute;right:20px;bottom:10px;color:#666}
#backlink img{position:relative;top:5px}
#main{padding:0 0;position:relative;border-top:1px #888 solid;background:#fff url(../images/bg_main_top.png) repeat-x top}
.first{overflow:hidden;width:auto;background:url(../images/bg_firstblock.gif) repeat-x bottom;border-bottom:2px #fff solid;height:1%;padding:0 20px 12px}
.second{overflow:hidden;color:#f4f4f4;background:#404347 url(../images/bg_body.gif) repeat-x 0 -250px;height:1%;padding:0 20px}
* html > body .first{float:left;overflow:visible}
* html > body .second{float:left;overflow:visible}
#left{float:none}
#left_content{margin-left:1em;margin-right:1em;background:inherit;padding:10px 5px 5px 5px}
#right{display:none;float:none}
#right_content{margin-left:1em;margin-right:1em}
#center{margin-right:280px;margin-top:10px;border-left:1px #ddd solid}
#center_content{margin-left:1em;margin-right:1em;padding:10px 5px 5px 5px}
.skip:focus,a.skip:active{position:absolute;display:block;background:#fff;color:#333}
#info_box {padding:5px 5px 5px 5px;margin-top:0px}
}

View File

@ -1,145 +0,0 @@
@media all {
body{color:#333;font-size:81.25%;font-family:'Trebuchet MS', Verdana, Arial, Helvetica, Sans-Serif}
h1,h2,h3,h4,h5,h6{font-family:Georgia, Times, Serif;font-weight:400}
h1{font-size:1.6em;color:#FFF;letter-spacing:-.02em;position:absolute;height:55px;width:85%;margin:0 0 .25em 7em;padding:5px 0 0 20px}
h2{font-size:1.8em;color:#111;padding-top:0.25em;letter-spacing:-.02em;margin:0 0 .25em}
h3{font-size:1.5em;color:#222;padding-top:1.5em;border-bottom:1px #ddd solid;letter-spacing:0;margin:0 0 .25em}
h4{font-size:1.4em;color:#889;padding-top:1em;font-weight:400;margin:0 0 .3em}
h5{font-size:1.2em;color:#889;font-style:italic;margin:0 0 .3em}
h6{font-size:1em;color:#889;padding-bottom:.3em;border-bottom:1px #ddd solid;margin:0 0 .3em}
.first .c33r h2{border-left:10px #800 solid;margin-top:1.5em;background:#f4f4f4;padding:0 0 0 10px}
.second a{color:#aaa;font-weight:700}
.second h3{font-size:1.6em;color:#fff;padding-bottom:.3em;border-bottom:1px #800 solid}
.second h6{border:0;margin:0}
h1 span{position:absolute;height:100%;width:100%;margin-left:-7em;margin-top:-0.4em;}
p,ul,dd,dt{line-height:1.5em}
p{line-height:1.5em;text-align:justify;margin:0 0 1em}
th p{margin:0}
table.bugs p{line-height:1.5em;text-align:center;margin:0}
dt,li{text-align:justify}
strong,b{font-weight:700}
em,i{font-style:italic}
pre,code{font-family:"Courier New", Courier, monospace}
address{font-style:normal;line-height:1.5em;margin:0 0 1em}
hr{color:#fff;background:transparent;border:0;border-bottom:1px #eee solid;margin:0 0 .5em;padding:0 0 .5em}
acronym,abbr{letter-spacing:.07em;border-bottom:1px dashed #c00;cursor:help}
.float_left{float:left;margin-right:1em;margin-bottom:.15em;border:0}
.float_right{float:right;margin-left:1em;margin-bottom:.15em;border:0}
.center{text-align:center;margin-left:auto;margin-right:auto}
.framed{border:4px #222 solid;background:#fff;padding:4px}
a,a em.file{color:#aa1124;text-decoration:none}
a:hover{text-decoration:underline}
a:focus{text-decoration:underline}
#topnav a{color:#666;background:transparent;text-decoration:none}
#topnav a:hover{color:#fff;text-decoration:underline;background-color:transparent}
#topnav a:focus{color:#fff;text-decoration:underline;background-color:transparent}
#footer a{color:#ccc}
#main a.imagelink{padding-left:0;background:transparent}
table{border-collapse:separate;width:100%;margin-bottom:.5em;border-spacing:2px}
table.bugs{margin-bottom:1em;margin-top:.5em}
table.bugs th{background:#444;color:#fff;text-align:center;border-bottom:1px #fff solid;border-right:1px #fff solid;padding:.5em}
table.bugs td{background:#888;color:#fff;text-align:center;border-bottom:1px #fff solid;border-right:1px #fff solid;padding:.5em}
table.description{margin-bottom:1em;margin-top:.5em}
table.description th{background:#aaa;color:#fff;text-align:left;vertical-align:top;border-bottom:1px #fff solid;border-right:1px #fff solid;padding:.5em}
table.description td{background:#f4f4f4;color:#444;text-align:left;vertical-align:top;border-bottom:1px #fff solid;border-right:1px #fff solid;padding:.5em}
input[type=text],input[type=password],textarea,select{background:#fff url(../images/bg_main_top.png) repeat-x top;border:1px #ccc solid;padding:.2em}
input[type=text]:focus,input[type=password]:focus,textarea:focus,select:focus{border:1px #448 solid;background:#eef;color:#333}
input.suchbox{border:1px #666 solid;background:#333;color:#888;padding:3px}
ul.icon{list-style-type:none;margin:0 0 1em;padding:0}
ul.icon li{background:url(../../img/icons/symb_item.png) no-repeat left center;margin-left:0;padding-left:20px;text-align:left}
ul.link{list-style-type:none;margin:0 0 1em;padding:0}
ul.link li{background:url(../../img/icons/symb_link.png) no-repeat 0 .15em;margin-left:0;padding-left:20px;text-align:left}
ul.info{list-style-type:none;margin:0 0 1em;padding:0}
ul.info li{background:url(../../img/icons/symb_info.png) no-repeat 0 .15em;margin-left:0;padding-left:20px;text-align:left}
.warnung{color:#353;background-color:#f4f8f4;border:1px #aca dotted;border-left:0;border-right:0;background-image:url(../../img/symbols/symb_warning.png);background-repeat:no-repeat;background-position:top left;margin:0 0 1em 1em;padding:.5em 1em .5em 48px}
.wichtig{color:#353;background-color:#f4f8f4;border:1px #aca dotted;border-left:0;border-right:0;background-image:url(../../img/symbols/symb_attention.png);background-repeat:no-repeat;background-position:top left;margin:0 0 1em 1em;padding:.5em 1em .5em 48px}
.hinweis{color:#353;background-color:#f4f8f4;border:1px #aca dotted;border-left:0;border-right:0;background-image:url(../../img/symbols/symb_hint.png);background-repeat:no-repeat;background-position:top left;margin:0 0 1em 1em;padding:.5em 1em .5em 48px}
p.demo{color:#aa1124;background-color:#fff5f5;border:1px #fcc dotted;border-left:0;border-right:0;background-image:url(../../img/symbols/symb_file.png);background-repeat:no-repeat;background-position:top left;margin:0 0 1em 1em;padding:.7em 1em .7em 48px}
p.demo span.file{color:#aa1124}
p.navlink{background:#f4f5f6 url(../../img/symbols/symb_forward.png);background-repeat:no-repeat;background-position:top left;color:#56636f;border-top:2px #aab2ba solid;margin-bottom:.5em;padding:.7em 1em .7em 48px}
p.navlink a{color:#56636f}
p.navlink a:hover{font-weight:700;background:transparent}
blockquote{color:#444;background:#f8f8f8;border:1px #ddd solid;border-left:8px #ddd solid;margin:0 0 1em 1em;padding:1em 1em 0}
ul.linklist{list-style-type:none;margin:0 0 1em}
ul.linklist li{margin:0 0 1em}
ul.browsers{margin:0 0 .4em}
ul.browsers li{list-style-type:none;background:#f8f8f8;color:#444;font-weight:400;text-align:left;border-bottom:1px #fff solid;border-right:1px #fff solid;margin:0;padding:.1em .1em .2em .5em}
ul.browsers li img{vertical-align:bottom}
ul.browsers li.title{font-weight:700;background:#eee;color:#444;padding:.2em .2em .2em .5em}
em.mono,em.file,em.directory{font-family:"Courier New", Courier, monospace;font-style:normal}
em.mono{color:#56636f;background:#f4f5f6;border:1px #aab2ba solid;padding:0 .3em}
em.file{color:#008;background:transparent url(../../img/icons/file.gif) no-repeat left;padding:0 0 0 14px}
em.directory{color:#008;background:transparent url(../../img/icons/dir.gif) no-repeat left;padding:0 0 0 15px}
pre,code,p.code{font-family:"Courier New", Courier, monospace;text-align:left;display:block;line-height:1.3em;color:#56636f;background:#f4f5f6;border:1px #aab2ba dotted;border-left:0;border-right:0;margin:0 0 1em 1em;padding:.5em .5em .5em 1em}
code.css,p.code{background-image:url(../../img/symbols/symb_css.png);background-repeat:no-repeat;background-position:top right}
code.xhtml{background-image:url(../../img/symbols/symb_xhtml.png);background-repeat:no-repeat;background-position:top right}
div.download{text-align:left;display:block;line-height:1.3em;color:#353;background-color:#f4f8f4;border:1px #aab2ba dotted;border-left:0;border-right:0;background-image:url(../../img/symbols/symb_download.png);background-repeat:no-repeat;background-position:left .8em;margin:0 0 1em 1em;padding:1em 1em 0 50px}
div.download p,div.doc p{text-align:left}
div.download a.file{color:#000;font-weight:700;text-decoration:underline}
div.download a.file:hover{color:#aa1124;font-weight:700;text-decoration:none}
div.doc{text-align:left;display:block;line-height:1.3em;color:#56636f;background-color:#f4f5f6;border:1px #aab2ba dotted;border-left:0;border-right:0;background-image:url(../../img/symbols/symb_doc.png);background-repeat:no-repeat;background-position:10px 1.3em;margin:0 0 1em 1em;padding:1em 1em 0 50px}
div.doc a.file{color:#000;font-weight:700;text-decoration:underline}
div.doc a.file:hover{color:red;font-weight:700;text-decoration:none}
.tx-indexedsearch .tx-indexedsearch-searchbox{color:#353;background-color:#f4f8f4;border:1px #aca dotted;border-left:0;border-right:0;margin:0 0 2em;padding:.5em .5em .5em 1em}
.tx-indexedsearch .tx-indexedsearch-searchbox table{width:auto}
.tx-indexedsearch .tx-indexedsearch-searchbox td{padding:.3em}
.tx-indexedsearch .tx-indexedsearch-searchbox p{margin-bottom:0}
.tx-indexedsearch .tx-indexedsearch-whatis{font-size:1.5em;font-family:Georgia, Times, Serif;font-weight:400;color:#889}
.tx-indexedsearch .tx-indexedsearch-res .tx-indexedsearch-title{margin-bottom:.5em;font-size:1.4em;font-family:Georgia, Times, Serif;font-weight:400;color:#889;background:#fff}
.tx-indexedsearch .tx-indexedsearch-res{text-align:left}
.tx-indexedsearch .tx-indexedsearch-res .tx-indexedsearch-info{color:#aaa;font-size:.9em}
.tx-indexedsearch .tx-indexedsearch-searchbox INPUT.tx-indexedsearch-searchbox-button{width:100px}
.tx-indexedsearch .tx-indexedsearch-searchbox INPUT.tx-indexedsearch-searchbox-sword{width:150px}
.tx-indexedsearch .tx-indexedsearch-whatis P .tx-indexedsearch-sw{font-weight:700;font-style:italic}
.tx-indexedsearch P.tx-indexedsearch-noresults{text-align:center;font-weight:700}
.tx-indexedsearch .tx-indexedsearch-res .tx-indexedsearch-title P{font-weight:700}
.tx-indexedsearch .tx-indexedsearch-res .tx-indexedsearch-title P.tx-indexedsearch-percent{font-weight:400}
.tx-indexedsearch .tx-indexedsearch-res .tx-indexedsearch-descr P{font-style:italic}
.tx-indexedsearch .tx-indexedsearch-res .tx-indexedsearch-secHead{margin-top:20px;margin-bottom:5px}
.tx-indexedsearch .tx-indexedsearch-res .tx-indexedsearch-secHead H2{color:#069;margin-top:0;margin-bottom:0;background:transparent}
.tx-indexedsearch .tx-indexedsearch-res .tx-indexedsearch-secHead TABLE{background:#ccc}
.tx-indexedsearch .tx-indexedsearch-res .tx-indexedsearch-secHead TD{vertical-align:middle}
.tx-indexedsearch .tx-indexedsearch-res .noResume{color:#666}
.tx-indexedsearch-sw,.csc-sword,.tx-indexedsearch-redMarkup{font-family:monospace;font-style:normal;color:#fff;background:#484;padding:0 .3em}
.tx-dropdownsitemap-pi1 A{font-weight:700}
.tx-dropdownsitemap-pi1 li.open ol{display:block}
.tx-dropdownsitemap-pi1 li.closed ol{display:none}
.tx-dropdownsitemap-pi1 li.open ul{display:block}
.tx-dropdownsitemap-pi1 li.closed ul{display:none}
.tx-dropdownsitemap-pi1 div{padding:2px}
.tx-dropdownsitemap-pi1 div.level_2{background:#fff}
.tx-dropdownsitemap-pi1 div.level_2 a{font-weight:400}
.tx-dropdownsitemap-pi1 div.level_3{background:#fff}
.tx-dropdownsitemap-pi1 div.level_4{background:#fff}
.tx-dropdownsitemap-pi1 div.level_5{background:#fff}
.tx-dropdownsitemap-pi1 div.expAll{text-align:center;background-color:#f4f8f4;border:1px #aca dotted;margin-bottom:1em}
.tx-dropdownsitemap-pi1 div.expAll a{color:#353}
.tx-dropdownsitemap-pi1 img{margin-right:.5em}
.tx-dropdownsitemap-pi1 a:hover{background:transparent}
p.floatbox{overflow:hidden}
p.smalltext{font-size:.9em}
span.mono{font-family:"Courier New", Courier, monospace;font-style:normal;color:#56636f;background:#f4f5f6;border:1px #aab2ba dotted;padding:0 .3em}
span.file{font-family:"Courier New", Courier, monospace;font-style:normal;color:#56636f;background:transparent url(../../img/icons/file.gif) no-repeat left;padding:0 0 0 14px}
span.directory{font-family:"Courier New", Courier, monospace;font-style:normal;color:#56636f;background:transparent url(../../img/icons/dir.gif) no-repeat left;padding:0 0 0 15px}
span.version{display:block;color:#666;font-weight:400;font-size:85%;padding:0 5px 0 20px}
.csc-mailform-field{clear:left}
fieldset.csc-mailform .csc-mailform-field label{width:11em;float:left}
fieldset.csc-mailform .csc-mailform-field input,fieldset.csc-mailform .csc-mailform-field select,fieldset.csc-mailform .csc-mailform-field textarea{margin-bottom:.5em}
fieldset.csc-mailform .csc-mailform-field textarea{font-size:1em}
fieldset.csc-mailform label span{color:red}
input#mailformformtype_mail{margin-left:11.1em}
#category ul li {list-style:none;min-height:48px;width:30%;margin:0 10px 43px 0;float:left}
#category ul li:nth-last-child(-n+3) {margin-bottom:0} /* Last Row */
#category ul li h3 {text-transform:uppercase;letter-spacing:1px;padding-bottom:6px;font-size:105%;font-weight:bold}
#category ul li p {padding:0;margin:0;}
#category ul li a {color:#111;text-decoration:none}
#category ul li a:focus, #category ul li a:hover, #category ul li a:active {color:#811;text-decoration:none;}
.list-box-left { border: 1px solid #AAAACC; margin-right: auto; }
.list-box-left tr.list-head { background-color: #E1E1E3; }
.list-box-left tr.list-sub-head { background-color: #EDEDEF; }
.list-box-left tr th { font-style: bold; }
.list-box-left tr .id { width: 25px; text-align: right; }
.list-box-left tr.list-data:nth-child(even) { background-color: #FCFCFE; }
.list-box-left tr.list-data:nth-child(odd) { background-color: #F6F6F8; }
.list-box-left tr.list-data .right { text-align: right; }
}

View File

@ -1,84 +1,61 @@
<!-- @todo NEEDS TO BE TRANSLATED --> <div class="row">
<?php echo Form::open(); ?> <div class="span10 offset1">
<table class="box-center"> <fieldset>
<tr> <legend>Update Account Details</legend>
<td class="head">Last Updated</td>
<td><?php echo $record->display('date_last'); ?></td> <?php echo Form::input('date_last',$o->display('date_last'),array('label'=>'Last Updated','disabled')); ?>
</tr>
<tr> <?php echo Form::input('username',$o->display('username'),array('label'=>'User Name','disabled')); ?>
<td class="head">User Name</td>
<td><b><?php echo $record->username; ?></b></td> <?php echo Form::input('email',$o->display('email'),array('label'=>'Email','class'=>'input-xxlarge','placeholder'=>'Email Address','type'=>'email','required')); ?>
</tr>
<!-- //@todo This needs to be done somewhere else <div class="row">
<tr> <div class="span1">
<td class="head">Password</td> <?php echo Form::select('title',StaticList_Title::table(),$o->display('title'),array('class'=>'input-small','label'=>'Title','required')); ?>
<td><input type="password" name="password" value=""/></td> </div>
</tr>
<tr> <div class="span2">
<td class="head">Confirm Password</td> <?php echo Form::input('first_name',$o->display('first_name'),array('label'=>'','class'=>'input-medium','placeholder'=>'First Name','required')); ?>
<td><input type="password" name="confirm_password" value=""/></td> </div>
</tr>
--> <div class="span3">
<tr> <?php echo Form::input('last_name',$o->display('last_name'),array('label'=>'','class'=>'input-large','placeholder'=>'Last Name','required')); ?>
<td class="head">Email</td> </div>
<td><input type="text" name="email" value="<?php echo $record->email; ?>"/></td>
</tr> </div>
<tr>
<td class="head">Company</td> <?php echo Form::input('company',$o->display('company'),array('label'=>'Company','class'=>'input-xxlarge','placeholder'=>'Company Name')); ?>
<td><input type="text" name="company" value="<?php echo $record->company; ?>"/></td>
</tr> <?php echo Form::input('address1',$o->display('address1'),array('label'=>'Address','class'=>'input-xxlarge','placeholder'=>'Address','required')); ?>
<tr>
<td class="head">First Name</td> <?php echo Form::input('address2',$o->display('address2'),array('label'=>'','class'=>'input-xxlarge')); ?>
<td><input type="text" name="first_name" value="<?php echo $record->first_name; ?>"/></td>
</tr> <div class="row">
<tr> <div class="span3">
<td class="head">Last Name</td> <?php echo Form::input('city',$o->display('city'),array('label'=>'City','placeholder'=>'City','required')); ?>
<td><input type="text" name="last_name" value="<?php echo $record->last_name; ?>"/></td> </div>
</tr>
<tr> <div class="span1">
<td class="head">Title</td> <?php echo Form::input('state',$o->display('state'),array('label'=>'','class'=>'input-mini','placeholder'=>'State','required')); ?>
<td><?php echo $record->display('title'); ?></td> </div>
</tr>
<tr> <div class="span1">
<td class="head">Address</td> <?php echo Form::input('zip',$o->display('zip'),array('label'=>'','class'=>'input-mini','placeholder'=>'Post Code','required')); ?>
<td><input type="text" name="address1" value="<?php echo $record->address1; ?>"/></td> </div>
</tr> </div> <!-- /row -->
<tr>
<td class="head">&nbsp;</td> <?php echo Form::select('country_id',ORM::factory('Country')->list_select(),$o->country_id,array('label'=>'Country','required')); ?>
<td><input type="text" name="address2" value="<?php echo $record->address2; ?>"/></td>
</tr> <?php echo Form::select('language_id',ORM::factory('Language')->list_select(),$o->language_id,array('label'=>'Language','required')); ?>
<tr>
<td class="head">City</td> <?php echo Form::select('currency_id',ORM::factory('Currency')->list_select(),$o->currency_id,array('label'=>'Currency','required')); ?>
<td><input type="text" name="city" value="<?php echo $record->city; ?>"/></td>
</tr> <div class="row">
<tr> <div class="offset2">
<td class="head">State</td> <button type="submit" class="btn btn-primary">Save changes</button>
<td><input type="text" name="state" value="<?php echo $record->state; ?>"/></td> <button type="button" class="btn">Cancel</button>
</tr> </div>
<tr> </div>
<td class="head">Postal Code</td> </fieldset>
<td><input type="text" name="zip" value="<?php echo $record->zip; ?>"/></td> </div> <!-- /span8 -->
</tr> </div> <!-- /row -->
<tr>
<td class="head">Country</td>
<td><?php echo $record->country->display('name'); ?></td>
</tr>
<tr>
<td class="head">Language</td>
<td><?php echo $record->language->display('name'); ?></td>
</tr>
<tr>
<td class="head">Currency</td>
<td><?php echo $record->currency->display('name'); ?></td>
</tr>
<tr>
<!-- @todo NEEDS TO BE CONFIGURABLE -->
<td class="head">HTML Email</td>
<td>Yes</td>
</tr>
<!-- @todo OTHER STATIC VARS -->
<tr>
<td colspan="2" style="text-align: center;"><?php echo Form::submit('update','Update',array('class'=>'form_button')); ?></td>
</tr>
</table>
<?php echo Form::close(); ?>

View File

@ -1,17 +1,16 @@
<!-- @todo NEEDS TO BE TRANSLATED --> <div class="row">
<br/> <div class="span8 offset1">
<?php echo Form::open(); ?> <fieldset>
<table class="box-center"> <legend>Reset Password</legend>
<tr>
<td class="head">Password</td> <?php echo Form::input('password','',array('label'=>'Password','type'=>'password','required','minlength'=>8)); ?>
<td><input type="password" name="password" value=""/></td> <?php echo Form::input('password_confirm','',array('label'=>'Confirm','type'=>'password','required','minlength'=>8)); ?>
</tr>
<tr> <div class="row">
<td class="head">Confirm Password</td> <div class="offset2">
<td><input type="password" name="password_confirm" value=""/></td> <button type="submit" class="btn btn-primary">Update</button>
</tr> </div>
<tr> </div>
<td colspan="2" style="text-align: center;"><?php echo Form::submit('update','Update',array('class'=>'form_button')); ?></td> </fieldset>
</tr> </div>
</table> </div>
<?php echo Form::close(); ?>

View File

@ -0,0 +1,10 @@
<?php foreach (array('user'=>Auth::instance()->get_user()->name(),'reseller'=>'Reseller','affiliate'=>'Affiliate','admin'=>'Administrator') as $type => $ddname) : ?>
<?php if ($x = Menu::items($type)) : ?>
<ul class="nav pull-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-user"></i> <?php echo $ddname; ?> <b class="caret"></b></a>
<?php echo Menu::ul($x,$type == 'user' ? array('logout'=>'Logout') : NULL); ?>
</li>
</ul>
<?php endif ?>
<?php endforeach ?>

View File

@ -1,115 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!-- YAML Template Layout for lnApp -->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="auto" lang="auto">
<head>
<title><?php echo $meta->title; ?></title>
<link rel="shortcut icon" href="<?php echo $meta->shortcut_icon ? $meta->shortcut_icon : '/favicon.ico' ?>" type="image/vnd.microsoft.icon" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-Language" content="<?php echo $meta->language; ?>" />
<meta name="keywords" content="<?php echo $meta->keywords; ?>" />
<meta name="description" content="<?php echo $meta->description; ?>" />
<meta name="copyright" content="<?php echo Config::copywrite(); ?>" />
<!-- JavaScript Detection -->
<script type="text/javascript">document.documentElement.className += " js";</script>
<?php echo HTML::style('media/theme/yaml/css/page.css'); ?>
<?php echo Style::factory(); ?>
<?php echo Script::factory(); ?>
</head>
<body>
<!-- begin: skip link navigation -->
<ul id="skiplinks">
<li><a class="skip" href="#nav">Skip to navigation (Press Enter).</a></li>
<li><a class="skip" href="#left">Skip to main content (Press Enter).</a></li>
</ul>
<!-- end: skip link navigation -->
<div id="page_margins">
<div id="page">
<div id="topnav">
<div class="langMenu">
<?php echo Country::icon(Config::country()); ?>
<span class="text"><?php echo Config::country()->display('name'); ?></span>
<!-- //@todo Enable contact form -->
<div style="display:none">
<span class="text2"> &#124; </span>
<?php echo HTML::anchor('contact','Contact Us'); ?>
</div>
<span class="text2"> &#124; </span>
<?php echo Config::login_uri(); ?>
</div>
<span><?php echo Company::instance()->name(); ?></span>
</div>
<div id="header">
<h1><span>&nbsp;</span>&nbsp;</h1>
</div>
<!-- begin: main navigation #nav -->
<div id="nav">
<div id="nav_main">
<ul>
<li id="current"><?php echo HTML::anchor('','Home'); ?></li>
<li><?php echo HTML::anchor('product/categorys','Products'); ?></li>
<li><?php echo HTML::anchor('http://helpdesk.graytech.net.au/otrs/faq.pl','FAQ'); ?></li>
</ul>
</div>
<div id="nav_main2">
<?php echo BreadCrumb::factory(); ?>
</div>
</div>
<!-- end: main navigation -->
<!-- begin: main content area #main -->
<table id="main">
<tr>
<!-- Left Pane -->
<td id="left" <?php echo $left ? '' : 'style="display: none;"'?>>
<!-- begin: #left - first float column -->
<div id="left_content" class="clearfix">
<?php echo $left; ?>
</div>
<!-- end: #left -->
</td>
<!-- Main Body Pane -->
<td id="center">
<!-- begin: #center static column -->
<div id="center_content" class="clearfix">
<!-- begin: info box -->
<?php if ((string)$sysmsg) { ?>
<div id="info_box" class="info" style="display:block;">
<?php echo $sysmsg; ?>
</div>
<?php } ?>
<!-- end: info box -->
<?php echo $content; ?>
<!-- Begin: IE Column Clearing -->
<div id="ie_clearing">&nbsp;</div>
<!-- End: IE Column Clearing -->
</div>
<!-- end: #center -->
</td>
<!-- Right Pane -->
<td id="right" <?php echo $right ? '' : 'style="display: none;"'?>>
<!-- begin: #right second float column -->
<div id="right_content" class="clearfix">
<?php echo $right; ?>
</div>
<!-- end: #right -->
</td>
</tr>
</table>
<!-- end: #main -->
<!-- begin: #footer -->
<div id="shadow"></div>
<div id="footer"><?php echo $footer; ?></div>
<!-- end: #footer -->
<div id="debug">
<?php if (Kohana::$environment == Kohana::DEVELOPMENT) { ?>
<div id="kohana-profiler" style="display: none;"><?php echo View::factory('profiler/stats'); ?></div>
<script type="text/javascript">$("#footer").click(function() {$('#kohana-profiler').toggle();});</script>
<?php }?>
<?php if (Kohana::$environment >= Kohana::STAGING) { ?>
<div id="kohana-session" style="display: none; text-align: left;"><?php echo Debug::vars(Session::instance()); ?></div>
<script type="text/javascript">$("#footer").click(function() {$('#kohana-session').toggle();});</script>
<?php }?>
</div>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,22 @@
<?php defined('SYSPATH') or die('No direct access allowed.');
/**
* This class provides the rendering of ADSL Product Categories
*
* @package ADSL
* @category Helper
* @author Deon George
* @copyright (c) 2009-2013 Open Source Billing
* @license http://dev.osbill.net/license.html
*/
class Product_Category_Template_AdslCompare extends Product_Category_Template {
protected function render() {
Style::factory()
->type('file')
->data('media/pages/plans.css');
return View::factory('product/category/list/adslcompare')
->set('o',$this->pco);
}
}
?>

View File

@ -0,0 +1,22 @@
<?php defined('SYSPATH') or die('No direct access allowed.');
/**
* This class provides the rendering of ADSL Product Categories, when there are many products
*
* @package ADSL
* @category Helper
* @author Deon George
* @copyright (c) 2009-2013 Open Source Billing
* @license http://dev.osbill.net/license.html
*/
class Product_Category_Template_AdslCompareLarge extends Product_Category_Template {
protected function render() {
Style::factory()
->type('file')
->data('media/pages/plans.css');
return View::factory('product/category/list/adslcompare-large')
->set('o',$this->pco);
}
}
?>

View File

@ -46,8 +46,6 @@ class Service_Traffic_Adsl {
/** /**
* Return an instance of this class * Return an instance of this class
*
* @return HeadImage
*/ */
public static function instance($supplier) { public static function instance($supplier) {
$sc = Kohana::classname(get_called_class().'_'.$supplier); $sc = Kohana::classname(get_called_class().'_'.$supplier);

View File

@ -0,0 +1,75 @@
<div id="page-title">
<h1><?php echo $o->title(); ?></h1>
<?php echo $o->description(); ?>
</div> <!-- /page-title -->
<div id="container">
<div class="row">
<div class="grid-12">
<div class="tablewrapper">
<table class="plan plain">
<tr class="plan-header">
<th class="plan-title">Plan Name</th>
<?php $c=0; foreach ($o->products() as $po) : ?>
<td class="plan-title"><?php echo $po->title(); ?></td>
<?php endforeach ?>
</tr>
<tr class="plan-header">
<th class="plan-price" >Price</th>
<?php $c=0; foreach ($o->products() as $po) : ?>
<?php $x = (string)Currency::display($po->price(0,1,'price_base',TRUE)); ?>
<td class="plan-price">
<span class="note">$</span><?php echo substr($x,0,strpos($x,'.')); ?><span class="cents"> .<?php echo substr($x,-2,strpos($x,'.')); ?></span><span class="term"><?php echo StaticList_RecurSchedule::get(1); ?></span>
</td>
<?php endforeach ?>
</tr>
<tr class="plan-features">
<th>Setup</th>
<?php $c=0; foreach ($o->products() as $po) : ?>
<td><span class="note">$</span><?php echo Currency::display($po->price(0,1,'price_setup',TRUE)); ?></td>
<?php endforeach ?>
</tr>
<tr class="plan-features">
<th>Speed</th>
<?php $c=0; foreach ($o->products() as $po) : ?>
<td><?php echo $po->plugin()->display('speed'); ?></td>
<?php endforeach ?>
</tr>
<tr class="plan-features">
<th>Peak Downloads</th>
<?php $c=0; foreach ($o->products() as $po) : ?>
<td><?php echo $po->plugin()->base_down_peak/1000; ?><span class="normal">GB</span></td>
<?php endforeach ?>
</tr>
<?php if ($po->plugin()->base_down_offpeak) : ?>
<tr class="plan-features">
<th>OffPeak Downloads</th>
<?php $c=0; foreach ($o->products() as $po) : ?>
<td><?php echo $po->plugin()->base_down_offpeak/1000; ?><span class="normal">GB</span></td>
<?php endforeach ?>
<?php endif ?>
<tr class="plan-features">
<th>Extra Traffic</th>
<?php $c=0; foreach ($o->products() as $po) : ?>
<td><span class="note">$</span><?php echo $po->plugin()->display('extra_down_peak'); ?><span class="normal">/GB</span></td>
<?php endforeach ?>
</tr>
<tr class="plan-features">
<th>Contract Term</th>
<?php $c=0; foreach ($o->products() as $po) : ?>
<td><?php echo $po->plugin()->display('contract_term'); ?> <span class="normal">mths</span></td>
<?php endforeach ?>
</tr>
</table>
</div> <!-- /tablewrapper -->
</div> <!-- /grid -->
</div> <!-- /row -->
</div> <!-- /container -->

View File

@ -0,0 +1,61 @@
<div id="page-title">
<h1><?php echo $o->title(); ?></h1>
<?php echo $o->description(); ?>
</div> <!-- /page-title -->
<div id="container">
<div class="row">
<div class="grid-12">
<div class="pricing-plans plans-4">
<div class="row">
<?php $c=0; foreach ($o->products() as $po) : ?>
<?php if (! ($c++%4) AND $c>1) : ?>
</div> <!-- /row -->
<hr class="row-divider" />
<div class="row">
<?php endif ?>
<div class="plan-container">
<div class="plan">
<div class="plan-header">
<div class="plan-title">
<?php echo $po->title(); ?>
</div> <!-- /plan-title -->
<div class="plan-price">
<?php $x = (string)Currency::display($po->price(0,1,'price_base',TRUE)); ?>
<span class="note">$</span><?php echo substr($x,0,strpos($x,'.')); ?><span class="cents"> .<?php echo substr($x,-2,strpos($x,'.')); ?></span><span class="term"><?php echo StaticList_RecurSchedule::get(1); ?></span>
</div> <!-- /plan-price -->
</div> <!-- /plan-header -->
<div class="plan-features">
<ul>
<li><span class="note">$</span><strong><?php echo Currency::display($po->price(0,1,'price_setup',TRUE)); ?></strong> setup</li>
<li><strong><?php echo $po->plugin()->display('speed'); ?></strong> Speed</li>
<li><strong><?php echo $po->plugin()->base_down_peak/1000; ?></strong>GB Peak Downloads</li>
<?php if ($po->plugin()->base_down_offpeak) : ?>
<li><strong><?php echo $po->plugin()->base_down_offpeak/1000; ?></strong>GB OffPeak Downloads</li>
<?php endif ?>
<li><span class="note">$</span><strong><?php echo $po->plugin()->display('extra_down_peak'); ?></strong>/GB Extra Traffic</li>
<li><strong><?php echo $po->plugin()->display('contract_term'); ?></strong> Months Contract</li>
</ul>
</div> <!-- /plan-features -->
<div class="plan-actions">
<!--
<a href="javascript:;" class="btn">Purchase Now</a>
-->
</div> <!-- /plan-actions -->
</div> <!-- /plan -->
</div> <!-- /plan-container -->
<?php endforeach ?>
</div> <!-- /row -->
</div> <!-- /pricing-plans -->
</div> <!-- /grid -->
</div> <!-- /row -->
</div> <!-- /container -->

View File

@ -26,7 +26,7 @@ class Model_Cart extends ORM_OSB {
*/ */
protected $_display_filters = array( protected $_display_filters = array(
'recurr_schedule'=>array( 'recurr_schedule'=>array(
array('StaticList_RecurSchedule::display',array(':value')), array('StaticList_RecurSchedule::get',array(':value')),
), ),
); );

View File

@ -40,8 +40,6 @@ abstract class Service_Domain {
/** /**
* Return an instance of this class * Return an instance of this class
*
* @return HeadImage
*/ */
public static function instance($supplier) { public static function instance($supplier) {
$sc = sprintf('%s_%s',get_called_class(),$supplier); $sc = sprintf('%s_%s',get_called_class(),$supplier);

View File

@ -23,7 +23,7 @@ class Model_Email_Template extends ORM_OSB {
protected $_display_filters = array( protected $_display_filters = array(
'status'=>array( 'status'=>array(
array('StaticList_YesNo::display',array(':value')), array('StaticList_YesNo::get',array(':value')),
), ),
); );
} }

View File

@ -97,7 +97,7 @@ class Export_Quicken extends Export {
} else { } else {
throw new Kohana_Exception('Missing product map data for :product (:id)', throw new Kohana_Exception('Missing product map data for :product (:id)',
array(':product'=>$iio->product->name(),':id'=>$iio->product_id)); array(':product'=>$iio->product->title(),':id'=>$iio->product_id));
$qto->ACCNT = 'Other Income'; $qto->ACCNT = 'Other Income';
$qto->INVITEM = 'Product:Unknown'; $qto->INVITEM = 'Product:Unknown';

View File

@ -0,0 +1,22 @@
<?php defined('SYSPATH') or die('No direct access allowed.');
/**
* This class provides the rendering of Hosting Product Categories
*
* @package Host
* @category Helper
* @author Deon George
* @copyright (c) 2009-2013 Open Source Billing
* @license http://dev.osbill.net/license.html
*/
class Product_Category_Template_HostCompare extends Product_Category_Template {
protected function render() {
Style::factory()
->type('file')
->data('media/pages/plans.css');
return View::factory('product/category/list/hostcompare')
->set('o',$this->pco);
}
}
?>

View File

@ -0,0 +1,52 @@
<div id="page-title">
<h1><?php echo $o->title(); ?></h1>
<?php echo $o->description(); ?>
</div> <!-- /page-title -->
<div id="container">
<div class="row">
<div class="grid-12">
<div class="pricing-plans plans-4">
<div class="row">
<?php $c=0; foreach ($o->products() as $po) : ?>
<?php if (! ($c++%4) AND $c>1) : ?>
</div> <!-- /row -->
<hr class="row-divider" />
<div class="row">
<?php endif ?>
<div class="plan-container">
<div class="plan">
<div class="plan-header">
<div class="plan-title">
<?php echo $po->title(); ?>
</div> <!-- /plan-title -->
<div class="plan-price">
<?php $x = (string)Currency::display($po->price(0,4,'price_base',TRUE)); ?>
<span class="note">$</span><?php echo substr($x,0,strpos($x,'.')); ?><span class="cents"> .<?php echo substr($x,-2,strpos($x,'.')); ?></span><span class="term"><?php echo StaticList_RecurSchedule::get(4); ?></span>
</div> <!-- /plan-price -->
</div> <!-- /plan-header -->
<div class="plan-features">
<ul>
<li><span class="note">$</span><strong><?php echo Currency::display($po->price(0,4,'price_setup',TRUE)); ?></strong> setup</li>
</ul>
</div> <!-- /plan-features -->
<div class="plan-actions">
<a href="<?php echo URL::site('product/view/'.$po->id); ?>" class="btn">More Information</a>
</div> <!-- /plan-actions -->
</div> <!-- /plan -->
</div> <!-- /plan-container -->
<?php endforeach ?>
</div> <!-- /row -->
</div> <!-- /pricing-plans -->
</div> <!-- /grid -->
</div> <!-- /row -->
</div> <!-- /container -->

View File

@ -325,11 +325,11 @@ class Controller_Task_Invoice extends Controller_Task {
foreach (ORM::factory('Invoice_Item')->find_all() as $iio) { foreach (ORM::factory('Invoice_Item')->find_all() as $iio) {
if ($iio->product_name AND $iio->product_id) { if ($iio->product_name AND $iio->product_id) {
if (md5(strtoupper($iio->product_name)) == md5(strtoupper($iio->product->name()))) { if (md5(strtoupper($iio->product_name)) == md5(strtoupper($iio->product->title()))) {
$iio->product_name = NULL; $iio->product_name = NULL;
$iio->save(); $iio->save();
} else { } else {
print_r(array("DIFF",'id'=>$iio->id,'pn'=>serialize($iio->product_name),'ppn'=>serialize($iio->product->name()),'pid'=>$iio->product_id,'test'=>strcasecmp($iio->product_name,$iio->product->name()))); print_r(array("DIFF",'id'=>$iio->id,'pn'=>serialize($iio->product_name),'ppn'=>serialize($iio->product->title()),'pid'=>$iio->product_id,'test'=>strcasecmp($iio->product_name,$iio->product->title())));
} }
} }
} }

View File

@ -478,7 +478,7 @@ class Invoice_TCPDF_Default extends Invoice_Tcpdf {
$this->SetFont('helvetica','',8); $this->SetFont('helvetica','',8);
$this->SetX($x); $this->SetX($x);
$this->Cell(0,0,sprintf('%s - %s',$ito->product->name(),$ito->service->name())); $this->Cell(0,0,sprintf('%s - %s',$ito->product->title(),$ito->service->name()));
if ($ito->price_base) { if ($ito->price_base) {
$this->SetX($x+160); $this->SetX($x+160);

View File

@ -33,7 +33,7 @@ class Model_Invoice extends ORM_OSB implements Cartable {
array('Config::date',array(':value')), array('Config::date',array(':value')),
), ),
'status'=>array( 'status'=>array(
array('StaticList_YesNo::display',array(':value')), array('StaticList_YesNo::get',array(':value')),
), ),
); );
@ -272,7 +272,7 @@ class Model_Invoice extends ORM_OSB implements Cartable {
if (! $ito->item_type == 0) if (! $ito->item_type == 0)
continue; continue;
$t = $ito->product->name(); $t = $ito->product->title();
if (! isset($result[$t])) { if (! isset($result[$t])) {
$result[$t]['quantity'] = 0; $result[$t]['quantity'] = 0;

View File

@ -50,7 +50,7 @@
<tr> <tr>
<td>+</td> <td>+</td>
<?php if ($rs) { ?> <?php if ($rs) { ?>
<td><?php echo StaticList_RecurSchedule::display($rs); ?></td> <td><?php echo StaticList_RecurSchedule::get($rs); ?></td>
<td colspan="1"><?php printf('%s Service(s)',count($items)); ?></td> <td colspan="1"><?php printf('%s Service(s)',count($items)); ?></td>
<?php } else { ?> <?php } else { ?>
<td colspan="2">Other Items</td> <td colspan="2">Other Items</td>

View File

@ -61,7 +61,7 @@
<tr> <tr>
<td><div id="toggle_<?php echo $rs; ?>"><?php echo HTML::image($mediapath->uri(array('file'=>'img/toggle-closed.png')),array('alt'=>'+')); ?></div><script type="text/javascript">$("#toggle_<?php echo $rs; ?>").click(function() {$('#detail_toggle_<?php echo $rs; ?>').toggle();});</script></td> <td><div id="toggle_<?php echo $rs; ?>"><?php echo HTML::image($mediapath->uri(array('file'=>'img/toggle-closed.png')),array('alt'=>'+')); ?></div><script type="text/javascript">$("#toggle_<?php echo $rs; ?>").click(function() {$('#detail_toggle_<?php echo $rs; ?>').toggle();});</script></td>
<?php if ($rs) { ?> <?php if ($rs) { ?>
<td><?php echo StaticList_RecurSchedule::display($rs); ?></td> <td><?php echo StaticList_RecurSchedule::get($rs); ?></td>
<td><?php printf('%s Service(s)',count($items)); ?></td> <td><?php printf('%s Service(s)',count($items)); ?></td>
<td>&nbsp;</td> <td>&nbsp;</td>
<?php } else { ?> <?php } else { ?>
@ -86,7 +86,7 @@
<!-- Service Information --> <!-- Service Information -->
<tr class="head"> <tr class="head">
<td><?php echo HTML::anchor(URL::link('user','service/view/'.$ito->service_id),$ito->service->id()); ?></td> <td><?php echo HTML::anchor(URL::link('user','service/view/'.$ito->service_id),$ito->service->id()); ?></td>
<td colspan="5"><?php printf('%s - %s',$ito->product->name(),$ito->service->name()); ?> (<?php echo $ito->product_id; ?>)</td> <td colspan="5"><?php printf('%s - %s',$ito->product->title(),$ito->service->name()); ?> (<?php echo $ito->product_id; ?>)</td>
<td class="right"><?php echo ($i++==0 ? Currency::display($io->items_service_total($ito->service_id)) : '&nbsp;');?></td> <td class="right"><?php echo ($i++==0 ? Currency::display($io->items_service_total($ito->service_id)) : '&nbsp;');?></td>
</tr> </tr>
<!-- END Product Information --> <!-- END Product Information -->

View File

@ -9,48 +9,165 @@
* @copyright (c) 2009-2013 Open Source Billing * @copyright (c) 2009-2013 Open Source Billing
* @license http://dev.osbill.net/license.html * @license http://dev.osbill.net/license.html
*/ */
class Controller_Admin_Product extends Controller_TemplateDefault_Admin { class Controller_Admin_Product extends Controller_Product {
protected $auth_required = TRUE;
protected $secure_actions = array( protected $secure_actions = array(
'ajaxtranslateform'=>TRUE, 'ajaxtranslatecategory'=>TRUE,
'ajaxtranslate'=>TRUE,
'category'=>TRUE,
'edit'=>TRUE,
'list'=>TRUE, 'list'=>TRUE,
'update'=>TRUE,
'view'=>TRUE, 'view'=>TRUE,
); );
public function action_ajaxtranslateform() { public function action_ajaxtranslate() {
$this->auto_render = FALSE;
$po = ORM::factory('Product',$this->request->param('id')); $po = ORM::factory('Product',$this->request->param('id'));
if (! $this->request->is_ajax() OR ! $po->loaded() OR ! isset($_REQUEST['key'])) if (! $po->loaded() OR ! isset($_REQUEST['key'])) {
$this->response->body(_('Unable to find translate data')); $output = _('Unable to find translate data');
else {
} else {
$pto = $po->product_translate->where('language_id','=',$_REQUEST['key'])->find(); $pto = $po->product_translate->where('language_id','=',$_REQUEST['key'])->find();
$this->response->body(View::factory($this->viewpath())->set('pto',$pto)); $output = View::factory('product/admin/ajaxtranslate')
->set('o',$pto);
} }
$this->response->body($output);
}
/**
* Retrieve the product category translate record
*/
public function action_ajaxtranslatecategory() {
$pco = ORM::factory('Product_Category',$this->request->param('id'));
if (! $pco->loaded() OR ! isset($_REQUEST['key'])) {
$output = _('Unable to find translate data');
} else {
$pcto = $pco->product_category_translate->where('language_id','=',$_REQUEST['key'])->find();
$output = View::factory('product/category/admin/ajaxtranslate')
->set('o',$pcto);
}
$this->response->body($output);
}
/**
* Update the product category
*/
public function action_category() {
$pco = ORM::factory('Product_Category',$this->request->param('id'));
if (! $pco->loaded())
HTTP::redirect('welcome/index');
if ($_POST)
$pco->values($_POST)->save();
Script::factory()
->type('stdin')
->data('
$(document).ready(function() {
$("select[name=language_id]").change(function() {
// If we select a blank, then dont continue
if (this.value == 0)
return false;
// Send the request and update sub category dropdown
$.ajax({
type: "GET",
data: "key="+$(this).val(),
dataType: "html",
cache: false,
url: "'.URL::link('admin','product/ajaxtranslatecategory/'.$pco->id,TRUE).'",
timeout: 2000,
error: function(x) {
alert("Failed to submit");
},
success: function(data) {
$("div[id=translate]").replaceWith(data);
}
});
});
});
');
Block::factory()
->type('form-horizontal')
->title('Update Category')
->title_icon('icon-wrench')
->body(View::factory('product/category/admin/edit')
->set('o',$pco));
}
/**
* Edit a product configuration
*/
public function action_edit() {
$po = ORM::factory('Product',$this->request->param('id'));
if (! $po->loaded())
HTTP::redirect('welcome/index');
if ($_POST)
$po->values($_POST)->save();
Script::factory()
->type('stdin')
->data('
$(document).ready(function() {
$("select[name=language_id]").change(function() {
// If we select a blank, then dont continue
if (this.value == 0)
return false;
// Send the request and update sub category dropdown
$.ajax({
type: "GET",
data: "key="+$(this).val(),
dataType: "html",
cache: false,
url: "'.URL::link('admin','product/ajaxtranslate/'.$po->id,TRUE).'",
timeout: 2000,
error: function(x) {
alert("Failed to submit");
},
success: function(data) {
$("div[id=translate]").replaceWith(data);
}
});
});
});
');
Block::factory()
->type('form-horizontal')
->title('Update Product')
->title_icon('icon-wrench')
->body(View::factory('product/admin/edit')
->set('plugin_form',$po->admin_update())
->set('o',$po));
} }
/** /**
* Show a list of products * Show a list of products
*/ */
public function action_list() { public function action_list() {
if ($this->request->param('id')) $products = ($x=$this->request->param('id')) ? ORM::factory('Product_Category',$x)->products() : ORM::factory('Product')->order_by('status DESC,prod_plugin_file')->find_all();
$prods = ORM::factory('Product_Category',$this->request->param('id'))->products();
else
$prods = ORM::factory('Product')->order_by('status DESC,prod_plugin_file')->find_all();
Block::add(array( Block::factory()
'title'=>_('Customer Products'), ->title(_('Products'))
'body'=>Table::display( ->title_icon('icon-th')
$prods, ->body(Table::display(
$products,
25, 25,
array( array(
'id'=>array('label'=>'ID','url'=>URL::link('admin','product/view/')), 'id'=>array('label'=>'ID','url'=>URL::link('admin','product/view/')),
'name()'=>array('label'=>'Details'), 'title()'=>array('label'=>'Details'),
'status'=>array('label'=>'Active'), 'status(TRUE)'=>array('label'=>'Active'),
'prod_plugin_file'=>array('label'=>'Plugin Name'), 'prod_plugin_file'=>array('label'=>'Plugin Name'),
'prod_plugin_data'=>array('label'=>'Plugin Data'), 'prod_plugin_data'=>array('label'=>'Plugin Data'),
'price_type'=>array('label'=>'Price Type'), 'price_type'=>array('label'=>'Price Type'),
@ -62,81 +179,31 @@ class Controller_Admin_Product extends Controller_TemplateDefault_Admin {
'page'=>TRUE, 'page'=>TRUE,
'type'=>'select', 'type'=>'select',
'form'=>URL::link('admin','product/view'), 'form'=>URL::link('admin','product/view'),
)), )));
));
}
/**
* Edit a product configuration
*/
public function action_update() {
$po = ORM::factory('Product',$this->request->param('id'));
if (! $po->loaded())
HTTP::redirect('welcome/index');
if ($_POST) {
if (isset($_POST['product_translate']['id']) AND ($pto=ORM::factory('Product_Translate',$_POST['product_translate']['id'])) AND $pto->loaded())
if (! $pto->values($_POST['product_translate'])->save())
throw new Kohana_Exception('Failed to save updates to product_translate data for record :record',array(':record'=>$po->id()));
if (! $po->values($_POST)->save())
throw new Kohana_Exception('Failed to save updates to product data for record :record',array(':record'=>$so->id()));
}
Block::add(array(
'title'=>sprintf('%s %s:%s',_('Update Product'),$po->id,$po->name()),
'body'=>View::factory($this->viewpath())
->set('po',$po)
->set('mediapath',Route::get('default/media'))
->set('plugin_form',$po->admin_update()),
));
Script::add(array('type'=>'stdin','data'=>'
$(document).ready(function() {
$("select[name=language_id]").change(function() {
// Send the request and update sub category dropdown
$.ajax({
type: "GET",
data: "key="+$(this).val(),
dataType: "html",
cache: false,
url: "'.URL::link('admin','product/ajaxtranslateform/'.$po->id,TRUE).'",
timeout: 2000,
error: function(x) {
alert("Failed to submit");
},
success: function(data) {
$("div[id=translate]").replaceWith(data);
}
});
});
});
'));
} }
public function action_view() { public function action_view() {
$po = ORM::factory('Product',$this->request->param('id')); $po = ORM::factory('Product',$this->request->param('id'));
Block::add(array( Block::factory()
'title'=>sprintf('%s: %s',_('Current Services Using this Product'),$po->name()), ->title(sprintf('%s: %s',_('Current Services Using this Product'),$po->title()))
'body'=>Table::display( ->title_icon('icon-th-list')
ORM::factory('Service')->where('product_id','=',$po->id)->find_all(), ->body(Table::display(
$po->services()->find_all(),
25, 25,
array( array(
'id'=>array('label'=>'ID','url'=>URL::link('user','service/view/')), 'id'=>array('label'=>'ID','url'=>URL::link('user','service/view/')),
'account->accnum()'=>array(), 'account->accnum()'=>array(),
'account->name()'=>array('label'=>'Account'), 'account->name()'=>array('label'=>'Account'),
'name()'=>array('label'=>'Details'), 'name()'=>array('label'=>'Details'),
'status'=>array('label'=>'Active'), 'status(TRUE)'=>array('label'=>'Active'),
'price(TRUE,TRUE)'=>array('label'=>'Price','align'=>'right'), 'price(TRUE,TRUE)'=>array('label'=>'Price','align'=>'right'),
), ),
array( array(
'page'=>TRUE, 'page'=>TRUE,
'type'=>'select', 'type'=>'select',
'form'=>URL::link('user','service/view'), 'form'=>URL::link('user','service/view'),
)), )));
));
} }
} }
?> ?>

View File

@ -12,26 +12,6 @@
class Controller_Product extends Controller_TemplateDefault { class Controller_Product extends Controller_TemplateDefault {
protected $auth_required = FALSE; protected $auth_required = FALSE;
/**
* Show a list of product categories
*/
public function action_categorys() {
$output = '<div id="category">';
$output .= '<ul>';
foreach (ORM::factory('Product_Category')->list_active() as $pco) {
$a = '<h3>'.$pco->display('name').'</h3>';
$a .= '<p>'.$pco->description().'</p>';
$output .= '<li>'.HTML::anchor('product/category/'.$pco->id,$a).'</li>';
}
$output .= '</ul>';
$output .= '</div>';
$this->template->content = $output;
}
/** /**
* Show the available topics in a category * Show the available topics in a category
* *
@ -43,29 +23,15 @@ class Controller_Product extends Controller_TemplateDefault {
$pco = ORM::factory('Product_Category',$this->request->param('id')); $pco = ORM::factory('Product_Category',$this->request->param('id'));
if (! $pco->loaded()) // Only show categories that are active.
if (! $pco->loaded() OR ((! $pco->status AND ! Kohana::$config->load('debug')->show_inactive)))
HTTP::redirect('welcome/index'); HTTP::redirect('welcome/index');
if (! $pco->status AND ! Kohana::$config->load('debug')->show_inactive) Style::factory()
HTTP::redirect('welcome/index'); ->type('file')
->data('media/css/pages/welcome.css');
BreadCrumb::name($this->request->uri(),$pco->name); return $this->template->content = (string)$pco->template();
BreadCrumb::url('product','product/categorys');
BreadCrumb::url('product/category','product/categorys');
foreach ($pco->products() as $po)
$output .= View::factory($this->viewpath().'/list_item')
->set('co',$pco)
->set('o',$po);
// If our output is blank, then there are no products
if (! $output)
$output = _('Sorry, no pages were found in this category, or your account is not authorized for this category.');
Block::add(array(
'title'=>sprintf('%s: %s',_('Category'),$pco->name),
'body'=>$output,
));
} }
/** /**
@ -77,28 +43,14 @@ class Controller_Product extends Controller_TemplateDefault {
$po = ORM::factory('Product',$id); $po = ORM::factory('Product',$id);
if (! $po->loaded()) if (! $po->loaded())
HTTP::redirect('Product_Category/index'); HTTP::redirect('welcome/index');
BreadCrumb::name($this->request->uri(),$po->product_translate->find()->name); // @todo This breadcrumb may not be working anymore.
BreadCrumb::url('product','product/categorys'); #BreadCrumb::name($this->request->uri(),$po->product_translate->find()->name);
#BreadCrumb::url('product','product/categorys');
// Work out our category id for the control line $this->template->content = (string)View::factory('product/view')
if (! empty($_GET['cid'])) { ->set('o',$po);
$co = ORM::factory('Product_Category',$_GET['cid']);
// If the product category doesnt exist, or doesnt match the product
if (! $co->loaded() OR ! in_array($co->id,$po->avail_category))
HTTP::redirect('Product_Category/index');
BreadCrumb::name('product/view',$co->name);
BreadCrumb::url('product/view','product/category/'.$co->id);
}
Block::add(array(
'title'=>$po->description_short(),
'body'=>View::factory($this->viewpath())
->set('record',$po),
));
} }
} }
?> ?>

View File

@ -1,39 +0,0 @@
<?php defined('SYSPATH') or die('No direct access allowed.');
/**
* This class provides product categories
*
* @package Product
* @category Controllers
* @author Deon George
* @copyright (c) 2009-2013 Open Source Billing
* @license http://dev.osbill.net/license.html
*/
class Controller_Product_Category extends Controller_TemplateDefault {
/**
* By default show a menu of available categories
*/
public function action_index() {
HTTP::redirect('product_category/list');
}
public function action_list() {
Block::add(array(
'title'=>_('Product Categories'),
'body'=>View::factory('product/category/list')
->set('results',$this->_get_categories()),
));
}
/**
* Obtain a list of our categories
* @todo Only show categories according to the users group memeberhsip
* @todo Obey sort order
* @todo Move this to the model
*/
private function _get_categories() {
return ORM::factory('Product_Category')
->list_active();
}
}
?>

View File

@ -26,16 +26,20 @@ class Model_Product extends ORM_OSB {
protected $_display_filters = array( protected $_display_filters = array(
'price_type'=>array( 'price_type'=>array(
array('StaticList_PriceType::display',array(':value')), array('StaticList_PriceType::get',array(':value')),
), ),
'status'=>array( 'status'=>array(
array('StaticList_YesNo::display',array(':value')), array('StaticList_YesNo::get',array(':value')),
), ),
'taxable'=>array( 'taxable'=>array(
array('StaticList_YesNo::display',array(':value')), array('StaticList_YesNo::get',array(':value')),
), ),
); );
protected $_nullifempty = array(
'price_group',
);
// Our attributes that are arrays, we'll convert/unconvert them // Our attributes that are arrays, we'll convert/unconvert them
protected $_serialize_column = array( protected $_serialize_column = array(
'avail_category', 'avail_category',
@ -43,41 +47,12 @@ class Model_Product extends ORM_OSB {
); );
/** /**
* Which categories is this product available in * Return the translated description for a category.
*/ */
public function categories() { public function description($full=FALSE) {
return $this->avail_category; $x = $this->translate();
}
/** return $x->loaded() ? $x->display($full ? 'description_full' : 'description_short') : 'No Description';
* Get the product description, after translating
* @todo This needs to be improved to find the right language item.
*/
public function description_long() {
return $this->product_translate->find()->display('description_full');
}
/**
* Get the product description, after translating
* @todo This needs to be improved to find the right language item.
*/
public function description_short() {
return $this->product_translate->find()->display('description_short');
}
/**
* This will render the product feature summary information
*/
public function feature_summary() {
return (is_null($plugin = $this->plugin())) ? HTML::nbsp('') : $plugin->feature_summary();
}
/**
* Get the product name, after translating
* @todo This needs to be improved to find the right language item.
*/
public function name() {
return $this->product_translate->find()->display('name');
} }
/** /**
@ -93,6 +68,66 @@ class Model_Product extends ORM_OSB {
return ORM::factory(Kohana::classname(sprintf('Product_Plugin_%s',$this->prod_plugin_file)),$this->prod_plugin_data); return ORM::factory(Kohana::classname(sprintf('Product_Plugin_%s',$this->prod_plugin_file)),$this->prod_plugin_data);
} }
public function save(Validation $validation=NULL) {
if ($this->changed())
if (parent::save($validation))
SystemMessage::factory()
->title('Record Updated')
->type('success')
->body(sprintf('Record %s Updated',$this->id));
// Save our Translated Message
if ($x = array_diff_key($_POST,$this->_object) AND ! empty($_POST['language_id']) AND ! empty($_POST['product_translate']) AND is_array($_POST['product_translate'])) {
$pto = $this->product_translate->where('language_id','=',$_POST['language_id'])->find();
// For a new entry, we need to set the product_cat_id
if (! $pto->loaded()) {
$pto->product_cat_id = $this->id;
$pto->language_id = $_POST['language_id'];
}
if ($pto->values($x['product_translate'])->save())
SystemMessage::factory()
->title('Record Updated')
->type('success')
->body(sprintf('Translation for Record %s Updated',$this->id));
}
}
/**
* List the services that are linked to this product
*/
public function services($active=FALSE) {
return $active ? $this->service->where_active() : $this->service;
}
private function translate() {
return $this->product_translate->where('language_id','=',Config::language())->find();
}
/**
* Return the translated title for a category
*/
public function title() {
$x = $this->translate();
return $x->loaded() ? $x->display('name') : 'No Title';
}
/**
* Which categories is this product available in
*/
public function categories() {
return $this->avail_category;
}
/**
* This will render the product feature summary information
*/
public function feature_summary() {
return (is_null($plugin = $this->plugin())) ? HTML::nbsp('') : $plugin->feature_summary();
}
/** /**
* Return the best price to the uesr based on the users group's memberships * Return the best price to the uesr based on the users group's memberships
* @todo This needs to be tested with more than one price group enabled * @todo This needs to be tested with more than one price group enabled

View File

@ -11,27 +11,30 @@
*/ */
class Model_Product_Category extends ORM_OSB { class Model_Product_Category extends ORM_OSB {
protected $_table_name = 'product_cat'; protected $_table_name = 'product_cat';
protected $_created_column = FALSE;
protected $_updated_column = FALSE;
protected $_nullifempty = array(
'status',
'template',
);
protected $_has_many = array( protected $_has_many = array(
'product_category_translate'=>array('foreign_key'=>'product_cat_id','far_key'=>'id'), 'product_category_translate'=>array('foreign_key'=>'product_cat_id','far_key'=>'id'),
'subcategories'=>array('model'=>'product_category','foreign_key'=>'parent_id','far_key'=>'id'),
); );
protected $_sorting = array( /**
'name'=>'asc', * Return the translated description for a category.
); */
public function description() { public function description() {
// If the user is not logged in, show the site default language $x = $this->translate();
// @todo This needs to change to the session language.
if (! $ao=Auth::instance()->get_user())
$ao=Company::instance()->so();
return ($x=$this->product_category_translate->where('language_id','=',$ao->language_id)->find()->description) ? $x : _('No Description'); return $x->loaded() ? $x->display('description') : 'No Description';
} }
/** /**
* List all the products belonging to this cateogry * List all the products belonging to this cateogry
* @todo Consider if we should cache this
*/ */
public function products() { public function products() {
$result = array(); $result = array();
@ -43,13 +46,68 @@ class Model_Product_Category extends ORM_OSB {
return $result; return $result;
} }
public function list_bylistgroup($cat) { public function save(Validation $validation=NULL) {
$result = array(); if ($this->changed())
if (parent::save($validation))
SystemMessage::factory()
->title('Record Updated')
->type('success')
->body(sprintf('Record %s Updated',$this->id));
foreach ($this->where('list_group','=',$cat)->find_all() as $pco) // Save our Translated Message
$result[$pco->id] = $pco; if ($x = array_diff_key($_POST,$this->_object) AND ! empty($_POST['language_id']) AND ! empty($_POST['product_category_translate']) AND is_array($_POST['product_category_translate'])) {
$pcto = $this->product_category_translate->where('language_id','=',$_POST['language_id'])->find();
// For a new entry, we need to set the product_cat_id
if (! $pcto->loaded()) {
$pcto->product_cat_id = $this->id;
$pcto->language_id = $_POST['language_id'];
}
if ($pcto->values($x['product_category_translate'])->save())
SystemMessage::factory()
->title('Record Updated')
->type('success')
->body(sprintf('Translation for Record %s Updated',$this->id));
}
}
/**
* Return the template that is used to render the product category
*/
public function template() {
if (! $this->template)
throw new Kohana_Exception('Product category :category doesnt have a template',array(':category'=>$this->id));
$o = Kohana::classname('Product_Category_Template_'.$this->template);
return new $o($this);
}
public function templates() {
$template_path = 'classes/Product/Category/Template';
$result = array('');
foreach (Kohana::list_files($template_path) as $file => $path) {
$file = strtoupper(preg_replace('/.php$/','',str_replace($template_path.'/','',$file)));
$result[$file] = $file;
}
return $result; return $result;
} }
/**
* Return the translated title for a category
*/
public function title() {
$x = $this->translate();
return $x->loaded() ? $x->display('name') : 'No Title';
}
private function translate() {
return $this->product_category_translate->where('language_id','=',Config::language())->find();
}
} }
?> ?>

View File

@ -11,6 +11,8 @@
*/ */
class Model_Product_Category_Translate extends ORM_OSB { class Model_Product_Category_Translate extends ORM_OSB {
protected $_table_name = 'product_cat_translate'; protected $_table_name = 'product_cat_translate';
protected $_created_column = FALSE;
protected $_updated_column = FALSE;
protected $_belongs_to = array( protected $_belongs_to = array(
'product_category'=>array(), 'product_category'=>array(),

View File

@ -0,0 +1,25 @@
<?php defined('SYSPATH') or die('No direct access allowed.');
/**
* This class provides the rendering of Product Category Templates
*
* @package Product
* @category Helper
* @author Deon George
* @copyright (c) 2009-2013 Open Source Billing
* @license http://dev.osbill.net/license.html
*/
abstract class Product_Category_Template {
protected $pco = NULL;
abstract protected function render();
public function __construct(Model_Product_Category $pco) {
$this->pco = $pco;
}
public function __toString() {
return (string)$this->render();
}
}
?>

View File

@ -0,0 +1,20 @@
<?php defined('SYSPATH') or die('No direct access allowed.');
/**
* This class provides the rendering of Product Category Template Super Category
*
* This Template renders sub categories of the same type.
*
* @package Product
* @category Helper
* @author Deon George
* @copyright (c) 2009-2013 Open Source Billing
* @license http://dev.osbill.net/license.html
*/
class Product_Category_Template_Supercat extends Product_Category_Template {
protected function render() {
return View::factory('product/category/list/supercat')
->set('o',$this->pco);
}
}
?>

View File

@ -0,0 +1,442 @@
/*------------------------------------------------------------------
[Pricing Plans Stylesheet]
Project: Base Admin
Version: 2.0
Last change: 12/29/2012
Assigned to: Rod Howard (rh)
-------------------------------------------------------------------*/
/*-- Plan Container --*/
.plan-container {
position: relative;
float: left;
}
/*-- Plan --*/
.plan {
margin-right: 6px;
margin: 0 10px;
border-radius: 4px;
}
/*-- Plan Header --*/
.plan-header {
text-align: center;
color: #FFF;
background-color: #686868;
-webkit-border-top-left-radius: 4px;
-webkit-border-top-right-radius: 4px;
-moz-border-radius-topleft: 4px;
-moz-border-radius-topright: 4px;
border-top-left-radius: 4px;
border-top-right-radius: 4px;
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.4);
}
.plan-title {
padding: 10px 0;
font-size: 16px;
color: #FFF;
border-bottom: 1px solid #FFF;
border-bottom: 1px solid rgba(0, 0, 0, 0.3);
border-radius: 4px 4px 0 0;
}
.plan-price {
padding: 20px 0 10px;
font-size: 66px;
line-height: 0.8em;
background-color: #797979;
border-top: 1px solid rgba(255, 255, 255, 0.2);
}
.plan-price span.term {
display: block;
margin-bottom: 0;
font-size: 13px;
line-height: 0;
padding: 2em 0 1em;
}
.plan-price span.note {
position: relative;
top: -40px;
display: inline;
font-size: 17px;
line-height: 0.8em;
}
.plan-price span.cents {
position: relative;
display: inline;
font-size: 17px;
line-height: 0.8em;
}
/*-- Plan Features --*/
.plan-features {
border: 1px solid #DDD;
border-bottom: none;
}
.plan-features {
padding-bottom: 1em;
}
.plan-features ul {
padding: 0;
margin: 0;
list-style: none;
}
.plan-features li {
padding: 1em 0;
margin: 0 2em;
text-align: center;
border-bottom: 1px dotted #CCC;
}
.plan-features li:last-child {
border-bottom: none;
}
/*-- Plan Actions --*/
.plan-actions {
padding: 1.15em 0;
background: #F2F2F2;
background-color: whiteSmoke;
background-image: -moz-linear-gradient(top, #F8F8F8, #E6E6E6);
background-image: -ms-linear-gradient(top, #F8F8F8, #E6E6E6);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#F8F8F8), to(#E6E6E6));
background-image: -webkit-linear-gradient(top, #F8F8F8, #E6E6E6);
background-image: -o-linear-gradient(top, #F8F8F8, #E6E6E6);
background-image: linear-gradient(top, #F8F8F8, #E6E6E6);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0);
border-color: #E6E6E6 #E6E6E6 #BFBFBF;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:dximagetransform.microsoft.gradient(enabled=false);
border: 1px solid #DDD;
-webkit-border-bottom-right-radius: 4px;
-webkit-border-bottom-left-radius: 4px;
-moz-border-radius-bottomright: 4px;
-moz-border-radius-bottomleft: 4px;
border-bottom-right-radius: 4px;
border-bottom-left-radius: 4px;
}
.plan-actions .btn {
padding: 1em 0;
margin: 0 2em;
display: block;
font-size: 16px;
font-weight: 600;
}
/*-- Columns --*/
.pricing-plans.plans-1 .plan-container {
width: 100%;
}
.pricing-plans.plans-2 .plan-container {
width: 50%;
}
.pricing-plans.plans-3 .plan-container {
width: 33.33%;
}
.pricing-plans.plans-4 .plan-container {
width: 25%;
}
/*-- Best Value Highlight --*/
.plan.best-value .plan-header {
background-color: #677E30;
}
.plan.best-value .plan-price {
background-color: #81994D;
}
.plan.skyblue .plan-header {
background-color: #3D7AB8;
}
.plan.skyblue .plan-price {
background-color: #69C;
}
.plan.lavendar .plan-header {
background-color: #754F75;
}
.plan.lavendar .plan-price {
background-color: #969;
}
.plan.teal .plan-header {
background-color: #257272;
}
.plan.teal .plan-price {
background-color: #399;
}
.plan.pink .plan-header {
background-color: #FF3778;
}
.plan.pink .plan-price {
background-color: #F69;
}
.plan.black .plan-header {
background-color: #222;
}
.plan.black .plan-price {
background-color: #333;
}
.plan.yellow .plan-header {
background-color: #C69E00;
}
.plan.yellow .plan-price {
background-color: #E8B900;
}
.plan.purple .plan-header {
background-color: #4E2675;
}
.plan.purple .plan-price {
background-color: #639;
}
.plan.red .plan-header {
background-color: #A40000;
}
.plan.red .plan-price {
background-color: #C00;
}
.plan.orange .plan-header {
background-color: #D98200;
}
.plan.orange .plan-price {
background-color: #F90;
}
.plan.blue .plan-header {
background-color: #0052A4;
}
.plan.blue .plan-price {
background-color: #06C;
}
/*-- Green Plan --*/
.plan.green .plan-header {
background-color: #677E30;
}
.plan.green .plan-price {
background-color: #81994D;
}
/*------------------------------------------------------------------
[2. Min Width: 767px / Max Width: 979px]
*/
@media (min-width: 767px) and (max-width: 979px) {
.pricing-plans .plan-container {
width: 50% !important;
margin-bottom: 2em;
}
}
@media (max-width: 767px) {
.pricing-plans .plan-container {
width: 100% !important;
margin-bottom: 2em;
}
}
/* Customer Settings */
.row-divider {
margin: 1.5em 0 1.5em;
}
.tablewrapper {
background: #F8F8F8 no-repeat 0px 0;
padding: 5px 5px;
border-radius: 7px;
display: block;
vertical-align: baseline;
}
.plan.plain {
font-weight: 500;
font-size: 11px;
margin: 0 0;
}
.plan.plain td:first-of-type {
border-left: 1px solid #D8D7D7;
}
.plan.plain .plan-header th.plan-title:first-of-type {
font-weight: normal;
border-radius: 4px 0 0 0;
}
.plan.plain .plan-header td.plan-title:last-of-type {
font-weight: normal;
border-radius: 0 4px 0 0;
}
.plan.plain .plan-header .plan-title {
font-size: 110%;
border-radius: 0 0 0 0;
border-bottom: 1px solid #D8D7D7;
padding: 5px;
}
.plan.plain .plan-header th.plan-price {
font-size: 110%;
color: #FFF;
font-weight: normal;
}
.plan.plain .plan-header td.plan-price {
font-size: 40px;
}
.plan.plain .plan-header td.plan-price span.note {
top: -21px;
}
.plan.plain .plan-header td.plan-price span.cents {
font-size: 20%;
}
.plan.plain .plan-header td.plan-price span.term {
font-size: 30%;
}
.plan.plain tr {
border: 0;
}
.plan.plain .plan-features {
border-top: 1px dotted #D8D7D7;
}
.plan.plain .plan-features th {
text-align: center;
padding: 5px;
font-size: 110%;
font-weight: normal;
}
.plan.plain .plan-features td {
font-weight: bold;
text-align: center;
padding: 5px;
font-size: 110%;
}
.plan.plain .plan-features td span.note {
font-weight: normal;
font-size: 100%;
}
.plan.plain .plan-features td span.normal {
font-weight: normal;
font-size: 100%;
}

View File

@ -0,0 +1,26 @@
<div id="translate">
<div class="span6">
<?php echo Form::input('product_translate[name]',$o->name,array(
'label'=>'Category Title',
'placeholder'=>'Descriptive Title',
'class'=>'span3',
'required',
'help-block'=>'The title is shown when uses search products by category')); ?>
</div>
<div class="span9">
<?php echo Form::textarea('product_translate[description_short]',$o->description_short,array(
'label'=>'Short Product Description',
'placeholder'=>'Short Description',
'class'=>'span6',
'required',
'help-block'=>'Complete description of this category')); ?>
</div>
<div class="span9">
<?php echo Form::textarea('product_translate[description_full]',$o->description_full,array(
'label'=>'Full Product Description',
'placeholder'=>'Full Description',
'class'=>'span6',
'required',
'help-block'=>'Complete description of this category')); ?>
</div>
</div>

View File

@ -1,15 +0,0 @@
<?php echo Form::hidden('product_translate[id]',$pto->id); ?>
<table>
<tr>
<td style="width: 40%;">Product Name</td>
<td style="width: 60%;" style="data"><?php echo Form::input('product_translate[name]',$pto->name); ?></td>
</tr>
<tr>
<td>Product Short Description</td>
<td style="data"><?php echo Form::input('product_translate[description_short]',$pto->description_short); ?></td>
</tr>
<tr>
<td>Product Long Description</td>
<td style="data"><?php echo Form::textarea('product_translate[description_full]',$pto->description_full); ?></td>
</tr>
</table>

View File

@ -0,0 +1,76 @@
<div class="row">
<div class="span9 offset1">
<fieldset>
<legend>Update Product</legend>
<div class="row">
<div class="tabbable span9">
<ul class="nav nav-tabs">
<?php $c=0;foreach (StaticList_RecurSchedule::table() as $k=>$v) : ?>
<li class="<?php echo $c++ ? '' : 'active'; ?>"><a href="#tab<?php echo $k; ?>" data-toggle="tab"><?php echo $v; ?></a></li>
<?php endforeach ?>
</ul>
<div class="tab-content">
<?php $c=0;foreach (StaticList_RecurSchedule::table() as $k=>$v) : ?>
<div class="tab-pane <?php echo $c++ ? '' : 'active'; ?>" id="tab<?php echo $k; ?>">
<?php echo Form::checkbox("price_group[$k][show]",1,$o->isPriceShown($k),array('label'=>'Price Active','class'=>'span2')); ?>
<?php foreach ($o->availPriceGroups() as $g) : ?>
<div class="row">
<div class="span2"><?php echo ORM::factory('Group',$g)->name; ?></div>
<?php foreach ($o->availPriceOptions() as $po) : ?>
<div class="span2">
<?php echo Form::input("price_group[$k][$g][$po]",$o->price($g,$k,$po),array('placeholder'=>$po,'nocg'=>TRUE,'class'=>'span2')); ?>
</div>
<?php endforeach ?> <!-- /availPriceOptions() -->
</div>
<?php endforeach ?> <!-- /availPriceGroups() -->
</div> <!-- /tab-pane -->
<?php endforeach ?> <!-- /StaticList_RecurSchedule -->
</div> <!-- /tab-content -->
</div> <!-- /tabbable -->
</div> <!-- /row -->
<br>
<div class="row">
<div class="span3">
<?php echo StaticList_YesNo::form('status',$o->status,FALSE,array('label'=>'Product Active','class'=>'span1')); ?>
</div>
</div>
<div class="row">
<div class="span3">
<?php echo StaticList_RecurSchedule::form('price_recurr_default',$o,$o->price_recurr_default,array('label'=>'Default Period','class'=>'span2')); ?></td>
</div>
</div> <!-- /row -->
<div class="row">
<div class="span3">
<?php echo Form::input('position',$o->position,array('label'=>'Order','class'=>'span1')); ?>
</div>
</div> <!-- /row -->
<div class="row">
<div class="span5">
<?php echo Form::select('language_id',ORM::factory('Language')->list_select(TRUE),'',array('label'=>'Language','required')); ?>
</div>
</div> <!-- /row -->
<div class="row">
<div id="translate"></div>
</div> <!-- /row -->
<?php if ($plugin_form) { echo '<br/>'.$plugin_form; } ?>
<div class="row">
<div class="offset2">
<button type="submit" class="btn btn-primary">Save changes</button>
<button type="button" class="btn">Cancel</button>
</div>
</div>
</fieldset>
</div> <!-- /span8 -->
</div> <!-- /row -->

View File

@ -1,59 +0,0 @@
<!-- @todo NEEDS TO BE TRANSLATED -->
<?php echo Form::open(); ?>
<table width="100%">
<tr>
<td style="width: 50%; vertical-align: top;">
<table width="100%">
<tr>
<td style="width: 40%;">Product Active</td>
<td style="width: 5%;">&nbsp;</td>
<td style="width: 60%;" class="data"><?php echo StaticList_YesNo::form('status',$po->status); ?></td>
</tr>
<tr>
<td colspan="2">Price</td>
<td class="data">
<table>
<tr>
<td colspan="2">&nbsp;</td>
<?php foreach (StaticList_RecurSchedule::keys() as $k) { ?>
<td class="head"><?php echo StaticList_RecurSchedule::display($k); ?></td>
<td><?php echo Form::checkbox("price_group[$k][show]",1,$po->isPriceShown($k)); ?>
<?php } ?>
</tr>
<?php foreach ($po->availPriceGroups() as $g) { ?>
<?php foreach ($po->availPriceOptions() as $o) { ?>
<tr>
<td><?php echo ORM::factory('Group',$g)->name; ?></td>
<td><?php echo $o; ?></td>
<?php foreach (StaticList_RecurSchedule::keys() as $k) { ?>
<td colspan="2"><?php echo Form::input("price_group[$k][$g][$o]",$po->price($g,$k,$o),array('size'=>5)); ?></td>
<?php } ?>
</tr>
<?php } ?>
<?php } ?>
</table>
</td>
</tr>
<tr>
<td colspan="2">Default Period</td>
<td class="data"><?php echo StaticList_RecurSchedule::form('price_recurr_default',$po,$po->price_recurr_default); ?></td>
</tr>
<tr>
<td colspan="2">Order</td>
<td class="data"><?php echo Form::input('position',$po->position); ?></td>
</tr>
<tr>
<td>Product Descriptions</td>
<td><?php echo Form::select('language_id',ORM_OSB::form('Language',TRUE)); ?></td>
</tr>
<tr>
<td>&nbsp;</td>
<td class="data" colspan="2"><div id="translate"></div></td>
</tr>
</table>
<?php if ($plugin_form) { echo '<br/>'.$plugin_form; } ?>
</td>
</tr>
</table>
<?php echo Form::submit('submit',_('Update'),array('class'=>'form_button')); ?>
<?php echo Form::close(); ?>

Some files were not shown because too many files have changed in this diff Show More