我正在使用带有 YiiBooster 扩展的 Yii。我想要一个像这样的弹出窗口:
array(
'header' => '',
'value' => function($data)
{
$this->widget('bootstrap.widgets.TbButton', array(
'label'=>'Inne',
'type'=>'primary',
'size' => 'mini',
'htmlOptions'=>array(
'data-placement'=>'right',
'data-content'=> "Controller::renderPartial('_statButtons',
array('data' => $data->idProject));",
'rel'=>'popover'
),
));
}
),
这是gridview的单元格内。我想renderPartial
用一些内容来渲染一个文件,但上面的代码不起作用。我怎样才能实现它?
编辑:如果代码执行(我的代码或@Ruslans 代码)它是结果:
Here is the text from the _statButtons partial file. End of this file.
<a id="yw2" class="btn btn-primary btn-mini" rel="popover"
data-placement="right" data-original-title="" title="">Inne</a>