Skip to content

Latest commit

 

History

History
54 lines (35 loc) · 774 Bytes

File metadata and controls

54 lines (35 loc) · 774 Bytes

CButtonColumnEx

CButtonColumnEx - extended CButtonColumn, in which template and button options can be php expressions.

Installation

  1. Copy ButtonColumnEx directory to Yii components directory

  2. Add import path

'import'=>array(

    ...

    'application.components.ButtonColumnEx.CButtonColumnEx',

    ...

)
  1. Use component in CGridView columns configuration
'columns'=>array(

	...

	array(
		'class' => 'CButtonColumnEx',
		'template' => '"{view}" . ($data->isCancelable() ? " / {cancel}" : "")',
		'buttons' => array(
			'cancel' => array(

				...

				'options' => array(
					'data-title'=>'$data->title',
				),

				...

			),
		),
	),

	...

),