public function action_detail() { $this->setJavascript('responesive_tabs.js'); $this->setJavascript('fb_comment.js'); $aryDataTemplate['data'] = array(); $id = Input::param('id'); if ($id) { $data = Model_Blog::find($id); $aryDataTemplate['data'] = $data; $this->setPageTitle($data[BLOG_TITLE]); } $this->template->content = View_Smarty::forge('blog/detail.tpl', $aryDataTemplate); }
/** * The basic welcome message * * @access public * @return Response */ public function action_index($pass) { if ($pass != 'truongnv') { Response::redirect(Config::get('base_url')); } $this->setCss('font-awesome.min.css'); $this->setCss('summernote.css'); $this->setJavascript('summernote.min.js'); $this->setJavascript('init_summernote.js'); $this->setJavascript('submit_form.js'); $aryDataTemplate = array(); $fieldset = Fieldset::forge('form_add')->add_model('Model_Blog'); $fieldset->disable(BLOG_CREATED_DATE); $fieldset->disable(DELETE_FLG); $fieldset->repopulate(); $aryDataTemplate['form'] = Model_Blog::removeTagForm($fieldset); $this->setPageTitle('create'); $this->template->content = View_Smarty::forge('create/index.tpl', $aryDataTemplate); }
/** * The 404 action for the application. * * @access public * @return Response */ public function action_404() { $this->template->content = View_Smarty::forge('welcome/404.tpl'); }