/** * Список страниц * * @return void */ public function indexAction() { $grid_options = Phorm_Config::xml('grids/control/page.xml', 'index'); /** * Перезагрузка меню геообъектов */ if ($this->_request->isXmlHttpRequest() && isset($this->_params['pageid'])) { $this->view->setEscape('trim'); $Menu = $this->view->navigation()->menu($this->Page->getNavigationMenu($this->_params['pageid']))->render(); die($Menu); /** * Данные для Grida */ } elseif ($this->_request->isXmlHttpRequest()) { $rows = $this->Page->getPageList($this->_params); $paginator = $this->Page->getPaginator(); $this->_helper->json(Phorm_JQuery_DataGrid::data($rows, $paginator, $grid_options)); return true; } /** * JS для обновления меню */ if (isset($this->_params['tree']) && $this->_params['tree'] == 'reload' && isset($this->_params['pageid'])) { $js = 'window.parent.trees.page.' . $this->_params['controller'] . '.reload(\'' . $this->view->siteUrl() . '/control/' . $this->_params['controller'] . '/?pageid=' . $this->_params['pageid'] . '\');'; $this->_boot->jquery->addOnload($js); } /** * Grid */ $this->view->assign('PagesDataTable', $this->view->DataGrid('PagesDataTable', $grid_options)); }
/** * Текст статьи * * @return void */ public function viewAction() { if (isset($this->_params['pageuid']) && ($PageInfo = $this->Page->getPageInfo($this->_params['pageuid']))) { $this->view->headTitle($PageInfo['pagename'], 'SET'); $this->view->assign('PageInfo', $PageInfo); $this->view->assign('PageList', $this->Page->getPageList(array('rowsperpage' => 0))); } else { return $this->_forward('notfound', 'error', null, array('controller' => 'error', 'action' => 'notfound')); } }