Yii View UGridView, Action Bar

1. Display operation:

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' => '确定弃用?'
                        ),
                ),
            ),

This just generates:

'template' => '{changCode} {active}',

action button below.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325159996&siteId=291194637