视图文件<?php
$add_drop = CHtml::dropDownList('catlist','',CmpCat::model()->getCmpCat('移动到分类'),array('class'=>'s_ipt w_120 removedropcatbatch'));
$remove_drop = CHtml::dropDownList('catlist','',CmpCat::model()->getCmpCat('添加到分类'),array('class'=>'s_ipt w_120 adddropcatbatch'));
?>
<?php
$this->widget('zii.widgets.CListView', array(
'dataProvider'=>$model->search(),
'itemView'=>'_view',
'emptyText'=>'暂时没有数据',
'selectAll'=>array('ids[]','id[]'),
'pagerTemplate'=>'onlyPager',//底部不显示操作按钮
'pagerClass'=>'list_page f_r',//底部分类样式
'itemsTagName'=>'table',
'itemsOptions'=>array('class'=>'list_table list_table2','width'=>'100%','cellpadding'=>0,'cellspacing'=>0),
'artLink'=>array(
//设为头条
array(Yii::t('adm','Focus Set'),'/manage/news/refocus','确认将选中项目设为头条!'),
//取消头条
array(Yii::t('adm','Focus UnSet'),'/manage/news/unfocus','确认将选中项目取消头条!'),
//信息推荐
array(Yii::t('adm','Commend News'),'/manage/news/recommend','确认将选中项目推荐到信息首页!'),
//取消推荐
array(Yii::t('adm','Del Recommend'),'/manage/news/uncommend','确认选中项目取消推荐!'),
//批量删除
array(Yii::t('adm','Delete All'),'/manage/news/delete','确认批量删除选中项目!'),
),
'batchItem'=>array(
//移动到分类
$add_drop,
//添加到分类
$remove_drop,
),
));
?>