示例#1
0
文件: News.php 项目: paShaman/Scala
 public function action_index()
 {
     if ($this->_isPost()) {
         $params = ['offset' => $this->request->post('offset'), 'pagination' => true];
         list($news, $more) = Model_News::getList($params);
         if (empty($news)) {
             $this->jsonResult(false);
         }
         $this->jsonResult(true, ['items' => $news, 'more' => $more]);
     }
     $popupNewsAdd = Common::popupForm('Добавление новости', 'news/edit');
     $this->_initWYSIWYG();
     $this->_initDropZone();
     $this->tpl->bind('popupNewsAdd', $popupNewsAdd);
 }