Hello, I’m new in Yii, so I want to have a column where there’re buttons, e.g: Button1. So I want to when you clic on Button1 open booster.widgets.TbModal (the definition is below).
Thankss.
$this->widget(‘booster.widgets.TbExtendedGridView’, array(
'id' => 'dispositivo-grid',
'dataProvider' => $model->search(),
'filter' => $model,
'columns' => array(
array(
'name' => 'mac',
),
array(
'name' => 'modelo',
),
array(
'class' => 'CButtonColumn',
'htmlOptions' => array('width' => '10'), //ancho de la columna
[<img src='http://www.yiiframework.com/forum/public/style_emoticons/default/huh.gif' class='bbc_emoticon' alt='???' />?]
);
my modal:
<?php $this->beginWidget(
'booster.widgets.TbModal',
array('id' => 'myModal')
); ?>
<div class="modal-header">
<a class="close" data-dismiss="modal">×</a>
<h4>Actualizar datos</h4>
</div>
<div class="modal-body">
<p>Formulario de actulizacion</p>
</div>
<div class="modal-footer">
<?php $this->widget(
'booster.widgets.TbButton',
array(
'context' => 'primary',
'label' => 'Save changes',
'url' => '#',
'htmlOptions' => array('data-dismiss' => 'modal'),
)
); ?>
<?php $this->widget(
'booster.widgets.TbButton',
array(
'label' => 'Close',
'url' => '#',
'htmlOptions' => array('data-dismiss' => 'modal'),
)
); ?>
</div>
<?php $this->endWidget(); ?>