48 lines
1.3 KiB
PHP
48 lines
1.3 KiB
PHP
|
<?php defined('SYSPATH') or die('No direct access allowed.');
|
||
|
|
||
|
/**
|
||
|
* This class provides the default template controller for rendering pages.
|
||
|
*
|
||
|
* @package OSB
|
||
|
* @subpackage Page/Template
|
||
|
* @category Controllers
|
||
|
* @author Deon George
|
||
|
* @copyright (c) phpLDAPadmin Development Team
|
||
|
* @license http://dev.phpldapadmin.org/license.html
|
||
|
*/
|
||
|
class Controller_TemplateDefault extends lnApp_Controller_TemplateDefault {
|
||
|
public function __construct(Request $request, Response $response) {
|
||
|
if (Config::theme())
|
||
|
$this->template = Config::theme().'/page';
|
||
|
|
||
|
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 empty($this->template->right) ? '' : $this->template->right;
|
||
|
}
|
||
|
}
|
||
|
?>
|