OSB enhancements to date
This commit is contained in:
@@ -1,10 +1,39 @@
|
||||
<?php defined('SYSPATH') or die('No direct script access.');
|
||||
<?php defined('SYSPATH') or die('No direct access allowed.');
|
||||
|
||||
class Controller_Welcome extends Controller {
|
||||
/**
|
||||
* OSB Main home page
|
||||
*
|
||||
* @package OSB
|
||||
* @subpackage Page/Home
|
||||
* @category Controllers
|
||||
* @author Deon George
|
||||
* @copyright (c) 2010 Deon George
|
||||
* @license http://dev.leenooks.net/license.html
|
||||
*/
|
||||
class Controller_Welcome extends Controller_TemplateDefault {
|
||||
public function action_index() {
|
||||
$block = new block;
|
||||
$block->add(array(
|
||||
'title'=>'Welcome to lnApp (public)!',
|
||||
'subtitle'=>'Using lnApp',
|
||||
'body'=>'Sample lnApp application',
|
||||
'footer'=>'lnApp makes building websites easy! '.time(),
|
||||
));
|
||||
|
||||
public function action_index()
|
||||
{
|
||||
$this->request->response = 'hello, world!';
|
||||
if (Auth::instance()->logged_in()) {
|
||||
$this->template->control = HTML::anchor('/logout',_('Logout'),array('id'=>'ajxbody'));
|
||||
} else {
|
||||
$this->template->control = HTML::anchor('/login',_('Login'),array('id'=>'ajxbody'));
|
||||
|
||||
Script::add(array('type'=>'stdin','data'=>'
|
||||
$(document).ready(function() {
|
||||
$("#ajxbody").click(function() {$("#ajBODY").load("'.URL::site('/login').'",null,function(x,s,r) {}); return false;});
|
||||
$("#ajBODY").ajaxSend(function() {$(this).html(\''.sprintf('%s <span class="ajaxmsg">%s<\/span>...',HTML::image('media/img/ajax-progress.gif',array('alt'=>_('Loading Login').'...')),_('Loading Login')).'\');return true;});
|
||||
});'
|
||||
));
|
||||
}
|
||||
|
||||
$this->template->content = $block;
|
||||
}
|
||||
|
||||
} // End Welcome
|
||||
}
|
||||
?>
|
||||
|
Reference in New Issue
Block a user