Register Child and Waitlist working
This commit is contained in:
49
application/classes/Controller/User/Welcome.php
Normal file
49
application/classes/Controller/User/Welcome.php
Normal file
@@ -0,0 +1,49 @@
|
||||
<?php defined('SYSPATH') or die('No direct access allowed.');
|
||||
|
||||
/**
|
||||
* Membership Database Main home page
|
||||
*
|
||||
* @package Membership Database
|
||||
* @category Controllers/User
|
||||
* @author Deon George
|
||||
* @copyright (c) 2014 Deon George
|
||||
* @license http://dev.leenooks.net/license.html
|
||||
*/
|
||||
class Controller_User_Welcome extends Controller_Welcome {
|
||||
protected $auth_required = TRUE;
|
||||
protected $secure_actions = array(
|
||||
'index'=>TRUE,
|
||||
);
|
||||
|
||||
public function action_index() {
|
||||
$output = '';
|
||||
|
||||
if (! $this->ao->list_children()->count())
|
||||
$output .= 'You have no currently registered children, would you like to '.HTML::anchor(URL::link('user','child/add'),'Register').' a child?';
|
||||
else
|
||||
$output = Table::factory()
|
||||
->data($this->ao->list_children())
|
||||
->columns(array(
|
||||
'id'=>'ID',
|
||||
'first_name'=>'First Name',
|
||||
'family_name'=>'Family Name',
|
||||
'dob'=>'DOB',
|
||||
))
|
||||
->prepend(array(
|
||||
'id'=>array('url'=>URL::link('user','child/edit/')),
|
||||
));
|
||||
|
||||
Block::factory()
|
||||
->title(sprintf('Membership details for : %s',$this->ao->name()))
|
||||
->title_icon('icon-info-sign')
|
||||
->span(9)
|
||||
->body($output);
|
||||
|
||||
Block::factory()
|
||||
->title('Quick Shortcuts')
|
||||
->title_icon('icon-bookmark')
|
||||
->span(3)
|
||||
->body(View::factory('welcome/user/shortcuts'));
|
||||
}
|
||||
}
|
||||
?>
|
Reference in New Issue
Block a user