<?php
$this->widget('zii.widgets.CMenu', array(
    'items' => array(

        array(
            'label' => 'Добавить событие',
            'url' => Yii::app()->controller->createUrl("",array("crudAction"=>"create")+$_GET),
            'icon'=>'icon-plus'),
    ),
    'htmlOptions' => array(
        'class' => 'nav nav-pills',
    ),
));
?>

<h1>Управление списком событий</h1>
<br/>
<?php $this->widget('BGridView', array(
    'id' => 'sport-event-grid',
    'dataProvider' => $model->search(),
    'filter' => $model,
    'columns' => array(
        array(
            'name' => 'start_date',
            'value' => '$data->startDateRu',
            'filter' => false,
        ),
        array(
            'name' => 'end_date',
            'value' => '$data->endDateRu',
            'filter' => false,
        ),
        array(
            'name' => 'sport_event_category_id',
            'value' => '$data->sportEventCategory->i18n->name',
            'filter' => CHtml::activeDropDownList($model, 'sport_event_category_id', array('' => 'Все') + $model->getSportEventCategories())
        ),
        array(
            'name' => 'country_id',
            'value' => '$data->country',
            'filter' => CHtml::activeDropDownList($model, 'country_id', array('' => 'Все') + $model->countries)
        ),
        'i18n.description',
        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;'),
        ),
    ),
)); ?>
