s7ncms/classes/s7n/controller/admin.php
/**
	 * Loads the template View object.
	 *
	 * @return  void
	 */
Loads the template View object.
@return  void
Loads the template View object . @return void
public function before()
	{
		Theme::$name = 'admin';
		Kohana::modules(array_merge(Kohana::modules(), array (
			'themes' => THEMESPATH.Theme::$name
		)));
		if (Request::$is_ajax OR $this->request !== Request::instance())
		{
			$this->auto_render = FALSE;
		}
		if ($this->auto_render === TRUE)
		{
			$this->template = View::factory($this->template);
		}
		View::bind_global('page_title', $this->title);
		View::bind_global('page_content', $this->content);
		View::bind_global('sidebar_title', $this->sidebar_title);
		View::bind_global('sidebar_content', $this->sidebar_content);
		Assets::add_script(Theme::uri('scripts/jquery.js'), -100);
		Assets::add_script(Theme::uri('scripts/jquery-ui.js'), -100);
		Assets::add_script(Theme::uri('scripts/jquery.form.js'), -100);
		Assets::add_script(Theme::uri('scripts/jquery.tipsy.js'), -100);
		Assets::add_script(Theme::uri('scripts/jquery.tree.js'), -100);
		Assets::add_script(Theme::uri('scripts/jquery.tree.contextmenu.js'), -100);
		Assets::add_script(Theme::uri('scripts/s7n.base.js'), -100);
		Assets::add_script(Theme::uri('scripts/s7n.site.js'), -100);
		Assets::add_stylesheet(Theme::uri('stylesheets/base.css'), -100);
		Assets::add_stylesheet(Theme::uri('stylesheets/style.css'), -100);
		Assets::add_stylesheet(Theme::uri('stylesheets/jquery-ui.css'), -100);
		Assets::add_stylesheet(Theme::uri('stylesheets/admin.css'), -100);
	}
public function before ( ) { Theme :: $ name = 'admin' ; Kohana :: modules ( array_merge ( Kohana :: modules ( ) , array ( 'themes' => THEMESPATH . Theme :: $ name ) ) ) ; if ( Request :: $ is_ajax OR $ this -> request !== Request :: instance ( ) ) { $ this -> auto_render = FALSE ; } if ( $ this -> auto_render === TRUE ) { $ this -> template = View :: factory ( $ this -> template ) ; } View :: bind_global ( 'page_title' , $ this -> title ) ; View :: bind_global ( 'page_content' , $ this -> content ) ; View :: bind_global ( 'sidebar_title' , $ this -> sidebar_title ) ; View :: bind_global ( 'sidebar_content' , $ this -> sidebar_content ) ; Assets :: add_script ( Theme :: uri ( 'scripts/jquery.js' ) , - 100 ) ; Assets :: add_script ( Theme :: uri ( 'scripts/jquery-ui.js' ) , - 100 ) ; Assets :: add_script ( Theme :: uri ( 'scripts/jquery.form.js' ) , - 100 ) ; Assets :: add_script ( Theme :: uri ( 'scripts/jquery.tipsy.js' ) , - 100 ) ; Assets :: add_script ( Theme :: uri ( 'scripts/jquery.tree.js' ) , - 100 ) ; Assets :: add_script ( Theme :: uri ( 'scripts/jquery.tree.contextmenu.js' ) , - 100 ) ; Assets :: add_script ( Theme :: uri ( 'scripts/s7n.base.js' ) , - 100 ) ; Assets :: add_script ( Theme :: uri ( 'scripts/s7n.site.js' ) , - 100 ) ; Assets :: add_stylesheet ( Theme :: uri ( 'stylesheets/base.css' ) , - 100 ) ; Assets :: add_stylesheet ( Theme :: uri ( 'stylesheets/style.css' ) , - 100 ) ; Assets :: add_stylesheet ( Theme :: uri ( 'stylesheets/jquery-ui.css' ) , - 100 ) ; Assets :: add_stylesheet ( Theme :: uri ( 'stylesheets/admin.css' ) , - 100 ) ; }
Loads the template View object.
Loads the template View object .
// load admin theme // Load the template // Add jQuery scripts // Add Stylsheets