1、显示操作:
array(
'header' => Yii::t('system', 'Operation'),
'class' => 'CButtonColumn',
'headerHtmlOptions' => array('width' => '150px', 'align' => 'center'),
'htmlOptions' => array('align' => 'center',),
'template' => '{changCode} {active}',
'buttons' => array(
'changCode' => array(
'label' => '[编辑]',
'url' => 'Yii::app()->createUrl("/systems/ebayaccountnotice/update", array("userids" => $data->user_id,"noticetype"=>$data->notice_type))',
'title' => Yii::t('system', 'Edit'),
'options' => array('target' => 'dialog', 'width' => 600, 'height' => 400),
),
'active' => array(
'label' => '[启用]',
'url' => 'Yii::app()->createUrl("/systems/ebayaccountnotice/isactive", array("userids" => $data->user_id,"do"=>1))',
'options' => array(
'target' => 'ajaxTodo', 'title' => '确定启用?'
),
),
'deprecated' => array(
'label' => '[弃用]',
'url' => 'Yii::app()->createUrl("/systems/ebayaccountnotice/isactive", array("userids" => $data->user_id,"do"=>0))',
'options' => array(
'target' => 'ajaxTodo', 'title' => '确定弃用?'
),
),
),
这样只是生成:
'template' => '{changCode} {active}',
下的操作按钮。