<?php
Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
    $('.search-form').toggle();
    return false;
});
$('.search-form form').submit(function(){
    $('#parametros-unidades-grid').yiiGridView('update', {
        data: $(this).serialize()
    });
    return false;
});
");
?>

<h3>Cuentas auxiliares de escenario: <?= $escenario->descripcion ?></h3>

<?php $this->widget('bootstrap.widgets.TbGridView', array(
    'id' => 'parametros-unidades-grid',
    'dataProvider' => $model->searchPorEscenario($escenario->id_escenario, $clave),
    'filter' => $model,
    'columns' => array(
        array(
            'name' => 'clave',
            'value' => '$data->clave',
            'htmlOptions' => array('style' => 'text-align: justify'),
        ),
        array(
            'name' => 'id_tipo_parametro',
            'value' => '$data->nombre_tipo_parametro',
            'filter' => TipoParametro::getAll(),
            'htmlOptions' => array('style' => 'text-align: justify'),
        ),
        array(
            'name' => 'id_proceso',
            'value' => '$data->proceso',
            // 'filter' => CHtml::listData(ParamEscenarios::model()->findAll(array('order' => 'descripcion')), 'id_escenario', 'descripcion'),
            'htmlOptions' => array('style' => 'text-align: justify'),
        ),
        array(
            'name' => 'id_cuenta',
            'value' => '$data->cuenta',
            'htmlOptions' => array('style' => 'text-align: left'),
        ),
        array(
            'name' => 'id_escenario',
            'value' => '$data->nombre_escenario',
            'filter' => CHtml::listData(ParamEscenarios::model()->findAll(array('order' => 'descripcion')), 'id_escenario', 'descripcion'),
            'htmlOptions' => array('style' => 'text-align: left'),
        ),
        array(
            'class' => 'bootstrap.widgets.TbButtonColumn',
            'template' => '{view} {delete}',
        ),
    ),
)); ?>
