<?php
$this->widget('zii.widgets.CMenu', array(
    'items' => array(
        array('label' => 'Добавить модель авто',
            'url' => Yii::app()->controller->createUrl("", array("crudAction" => "create") + $_GET),
            'icon' => 'icon-plus', 'active' => false),
    ),
    'htmlOptions' => array(
        'class' => 'nav nav-pills',
    ),
));
?>

<h1>Управление моделями авто</h1>
<br/>
<?php $this->widget('BGridView', array(
    'id' => 'work-model-grid',
    'dataProvider' => $model->search(),
    'filter' => $model,
    'columns' => array(
//        'id',

        array(
            'name' => 'work_brand_id',
            'value' => '$data->workBrand->i18n->name',
            'filter' => CHtml::activeDropDownList($model, 'work_brand_id', $model->getWorkBrands())
        ),

        'i18n.name',
//        'link',
//        'contacts_data',
        array(
            'class' => 'CButtonColumn',
            'template' => '{update} {delete}',
            'updateButtonUrl' => 'Yii::app()->controller->createUrl("",array("crudAction"=>"update", "id"=>$data->primaryKey)+$_GET)',
            'deleteButtonUrl' => 'Yii::app()->controller->createUrl("",array("crudAction"=>"delete", "id"=>$data->primaryKey)+$_GET)',
            'htmlOptions' => array('style' => 'width:50px !important;'),
        ),
    ),
)); ?>
