Improved User Welcome
This commit is contained in:
@@ -13,7 +13,7 @@ class Company {
|
||||
// Our Company Setup object
|
||||
private $so;
|
||||
|
||||
public function __construct(Model_Setup $so) {
|
||||
protected function __construct(Model_Setup $so) {
|
||||
$this->so = $so;
|
||||
|
||||
if (! $this->so->loaded())
|
||||
|
@@ -16,10 +16,60 @@ class Controller_User_Welcome extends Controller_Welcome {
|
||||
);
|
||||
|
||||
public function action_index() {
|
||||
Block::add(array(
|
||||
'title'=>sprintf('%s: %s',$this->ao->accnum(),$this->ao->name(TRUE)),
|
||||
'body'=>View::factory('welcome/user'),
|
||||
));
|
||||
Block::factory()
|
||||
->title(sprintf('Active Service for Account: %s',$this->ao->accnum()))
|
||||
->title_icon('icon-info-sign')
|
||||
->span(6)
|
||||
->body(Table::factory()
|
||||
->data($this->ao->service->list_active())
|
||||
->jssort('service')
|
||||
->columns(array(
|
||||
'id'=>'ID',
|
||||
'service_name()'=>'Service',
|
||||
))
|
||||
->prepend(array(
|
||||
'id'=>array('url'=>URL::link('user','service/view/')),
|
||||
))
|
||||
);
|
||||
|
||||
Block::factory()
|
||||
->title('Quick Shortcuts')
|
||||
->title_icon('icon-bookmark')
|
||||
->span(6)
|
||||
->body(View::factory('welcome/user/shortcuts'));
|
||||
|
||||
Block::factory()
|
||||
->title(sprintf('Invoices Due Account: %s (%s)',$this->ao->accnum(),$this->ao->invoice->list_due_total(TRUE)))
|
||||
->title_icon('icon-info-sign')
|
||||
->span(6)
|
||||
->body(Table::factory()
|
||||
->data($this->ao->invoice->list_due())
|
||||
->columns(array(
|
||||
'id'=>'ID',
|
||||
'due_date'=>'Date Due',
|
||||
'total(TRUE)'=>'Invoice Total',
|
||||
'due(TRUE)'=>'Amount Due',
|
||||
))
|
||||
->prepend(array(
|
||||
'id'=>array('url'=>URL::link('user','invoice/view/')),
|
||||
))
|
||||
);
|
||||
|
||||
Block::factory()
|
||||
->title(sprintf('Services Expiring for Account: %s',$this->ao->accnum()))
|
||||
->title_icon('icon-info-sign')
|
||||
->span(6)
|
||||
->body(Table::factory()
|
||||
->data($this->ao->service->list_expiring())
|
||||
->columns(array(
|
||||
'id'=>'ID',
|
||||
'service_name()'=>'Service',
|
||||
'expire(TRUE)'=>'Date',
|
||||
))
|
||||
->prepend(array(
|
||||
'id'=>array('url'=>URL::link('user','service/view/')),
|
||||
))
|
||||
);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
@@ -42,12 +42,11 @@ abstract class Kohana extends Kohana_Core {
|
||||
'',
|
||||
);
|
||||
|
||||
foreach ($prefixes as $p) {
|
||||
foreach ($prefixes as $p)
|
||||
if ($x = parent::find_file($dir,$p.$file,$ext,$array))
|
||||
return $x;
|
||||
}
|
||||
break;
|
||||
|
||||
// We found a site path.
|
||||
// We found a path.
|
||||
return $x;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user