Beispiel #1
0
 public function listApprobationRequestAction()
 {
     if ($this->view->aclIsAllowed('news', 'publish')) {
         $tables = array('NewsData' => array('ND_ID', 'ND_CategoryID', 'ND_ReleaseDate'), 'NewsIndex' => array('NI_NewsDataID', 'NI_LanguageID', 'NI_Title', 'NI_Status'), 'CategoriesIndex' => array('CI_Title'));
         $field_list = array('NI_Title' => array('width' => '400px'), 'CI_Title' => array(), 'ND_ReleaseDate' => array('width' => '120px'));
         $news = new NewsData();
         $select = $news->select()->from('NewsData')->setIntegrityCheck(false)->join('NewsIndex', 'NewsData.ND_ID = NewsIndex.NI_NewsDataID')->joinRight('CategoriesIndex', 'NewsData.ND_CategoryID = CategoriesIndex.CI_CategoryID')->joinRight('Languages', 'Languages.L_ID = NewsIndex.NI_LanguageID')->where('NewsData.ND_ToApprove = ?', 1)->where('NewsIndex.NI_LanguageID = CategoriesIndex.CI_LanguageID')->order('NI_Title');
         $options = array('disable-export-to-excel' => 'true', 'filters' => array('filter_1' => array('default_value' => null, 'associatedTo' => 'CI_Title', 'choices' => Cible_FunctionsCategories::getFilterCategories($this->_moduleID)), 'filter_2' => array('default_value' => null, 'associatedTo' => 'CI_LanguageID', 'choices' => Cible_FunctionsGeneral::getFilterLanguages())), 'action_panel' => array('width' => '50', 'actions' => array('edit' => array('label' => $this->view->getCibleText('button_edit'), 'url' => "{$this->view->baseUrl()}/news/index/edit/newsID/%ID%/lang/%LANG%/approbation/true", 'findReplace' => array(array('search' => '%ID%', 'replace' => 'ND_ID'), array('search' => '%LANG%', 'replace' => 'L_Suffix'))))));
         $mylist = new Cible_Paginator($select, $tables, $field_list, $options);
         $this->view->assign('mylist', $mylist);
     }
 }