function list4Action()
 {
     $catalogGuid = $this->_getParam('guid') ? $this->_getParam('guid') : '';
     $page = $this->_getParam('page') ? $this->_getParam('page') : 1;
     //$limit = 25;
     //$start = $limit * ($page - 1);
     //sleep(2);
     //$modelCatalog = new Pandamp_Modules_Dms_Catalog_Model_Catalog();
     //$decorator = new Pandamp_BeanContext_Decorator($modelCatalog);
     //$rowset = $decorator->getCatalogByGuidAsEntity($catalogGuid);
     //$st = $rowset->getShortTitle();
     $modelComment = new Pandamp_Modules_Extension_Comment_Model_Comment();
     $decorator = new Pandamp_BeanContext_Decorator($modelComment);
     $rows = $decorator->getCommentParentByGuidwAjaxAsEntity($catalogGuid, $page);
     $num_rows = $modelComment->getParentCommentCount($catalogGuid);
     //$numPage = ceil($num_rows/$limit);
     //$pagination = '';
     //for ($i=1;$i<=$numPage;$i++)
     //$pagination .= "<li><a href='/berita/baca/$catalogGuid/$st/p/$i' title='Halaman $i' rev='$i'>$i</a></li>";
     // check is AJAX request or not
     //if (!$this->getRequest() -> isXmlHttpRequest()) {
     //$this->view->pagination = $pagination;
     //}
     $paginator = Zend_Paginator::factory($rows);
     $paginator->setItemCountPerPage(10);
     $paginator->setCurrentPageNumber($page);
     $this->view->paginator = $paginator;
     //$this->view->catalogGuid = $catalogGuid;
     $this->view->rows = $rows;
     $this->view->numrows = $num_rows;
     //$this->view->limit = $limit;
 }
 function detailIndexWartaAction()
 {
     $this->_helper->layout->disableLayout();
     $folderGuid = $this->_getParam('folderGuid') ? $this->_getParam('folderGuid') : '';
     $start = $this->_getParam('start') ? $this->_getParam('start') : 0;
     $limit = $this->_getParam('limit') ? $this->_getParam('limit') : 0;
     $a = array();
     $modelCatalog = new Pandamp_Modules_Dms_Catalog_Model_Catalog();
     $decorator = new Pandamp_BeanContext_Decorator($modelCatalog);
     //$rowset = $decorator->fetchFromFolderAsEntity($folderGuid,$start,$limit,'fg_'.$folderGuid.'_detail_warta_s_'.$start.'_e_'.$limit);
     $rowset = $decorator->fetchFromFolderAsEntity($folderGuid, $start, $limit);
     $a['folderGuid'] = $folderGuid;
     $a['totalCount'] = $modelCatalog->getWartaCount($folderGuid);
     $ii = 0;
     if ($a['totalCount'] != 0) {
         foreach ($rowset as $row) {
             $modelCatalogAttribute = new Pandamp_Modules_Dms_Catalog_Model_CatalogAttribute();
             //$tblRelatedItem = new Pandamp_Modules_Dms_Catalog_Model_RelatedItem();
             //$rowSumComment = $tblRelatedItem->getSumComment($row->getId(), "RELATED_COMMENT");
             $modelComment = new Pandamp_Modules_Extension_Comment_Model_Comment();
             $rowSumComment = $modelComment->getParentCommentCount($row->getId());
             $a['index'][$ii]['title'] = $modelCatalogAttribute->getCatalogAttributeValue($row->getId(), 'fixedTitle');
             $a['index'][$ii]['shortTitle'] = $row->getShortTitle();
             $a['index'][$ii]['createdDate'] = date("d/m/y", strtotime($row->getCreatedDate()));
             $a['index'][$ii]['guid'] = $row->getId();
             $a['index'][$ii]['comment'] = $rowSumComment != 0 ? '(' . $rowSumComment . '&nbsp;tanggapan)' : '';
             $ii++;
         }
     }
     if ($a['totalCount'] == 0) {
         $a['index'][0]['title'] = "-";
         $a['index'][0]['shortTitle'] = "-";
         $a['index'][0]['createdDate'] = "-";
         $a['index'][0]['guid'] = "-";
         $a['index'][0]['comment'] = "-";
     }
     echo Zend_Json::encode($a);
 }