示例#1
0
 public function after($response)
 {
     $response = parent::after($response);
     $href = \Arr::get($this->sidebar, '0.items.0.href', false);
     if ($href != false) {
         return \Response::redirect($href);
     }
     return $response;
 }
示例#2
0
文件: base.php 项目: ryross/kobase
 public function after()
 {
     if ($this->auto_render) {
         $styles = array('admin.css');
         $scripts = array();
         $this->template->styles = array_merge($styles, $this->template->styles);
         $this->template->scripts = array_merge($scripts, $this->template->scripts);
     }
     parent::after();
 }
示例#3
0
文件: auth.php 项目: ragchuck/ra-Log
 public function after()
 {
     if ($this->_user) {
         $user = $this->_user->as_array();
         $roles = $this->_user->roles->find_all();
         foreach ($roles->as_array() as $role) {
             $user['roles'][] = $role->as_array();
         }
         $user['last_login'] *= 1000;
         unset($user['password']);
     } else {
         $user = NULL;
     }
     $this->json(array('message' => $this->_message, 'user' => $user));
     parent::after();
 }
示例#4
0
 /**
  * Assigns the template [View] as the request response.
  */
 public function after()
 {
     if (!$this->is_remote()) {
         $controller = Request::$initial->controller();
         $action = Request::$initial->action();
         View::bind_global('controller', $controller);
         $layout = View::factory('layout');
         $layout->set('title', __(ucfirst($controller)));
         $layout->set('subtitle', __(ucfirst($action)));
         $nav_items_left = array(array('href' => "#!/dashboard", 'text' => __("Dashboard"), 'active' => $controller == 'dashboard', 'class' => "js-dashboard"), array('href' => "#!/profile", 'text' => __("System profile"), 'active' => $controller == 'profile', 'class' => "js-profile"));
         $layout->bind('nav_items_left', $nav_items_left);
         $nav_items_right = array(array('href' => '#', 'text' => __("Config"), 'dropdown' => array(array('href' => '#', 'icon' => 'user', 'text' => __("Login"), 'class' => 'js-login'), array('href' => '#', 'icon' => 'retweet', 'text' => __("Refresh Data"), 'class' => 'js-import-start'))));
         $layout->bind('nav_items_right', $nav_items_right);
         $stats = array((microtime(TRUE) - KOHANA_START_TIME) * 1000, (memory_get_usage() - KOHANA_START_MEMORY) / 1048576, count(get_included_files()));
         $layout->set('stats', vsprintf('%3$d files using %2$.1f MB in %1$.0fms', $stats));
         $layout->content = $this->template->render();
         $this->response->body($layout->render());
     } else {
         $this->response->body($this->template->render());
     }
     parent::after();
 }
示例#5
0
文件: Deals.php 项目: ChrisCov/HUKD
 public function after()
 {
     $this->template->style[] = $this->__CSS__ . 'deals.css';
     parent::after();
 }
示例#6
0
文件: i18n.php 项目: ragchuck/ra-Log
 public function after()
 {
     // enable Browser caching
     $this->enable_browser_caching();
     parent::after();
 }
示例#7
0
文件: Auth.php 项目: adrianpl20/oop
 public function after()
 {
     parent::after();
 }