<?php
/* @var $this SliderController */
/* @var $model Slider */
$this->breadcrumbs = array(
    'Sliders' => array('admin'),
    'Manage',
);
$this->menu = array(
    array('label' => 'Create Slider', 'url' => array('create')),
);
Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$('#slider-grid').yiiGridView('update', {
		data: $(this).serialize()
	});
	return false;
});
");
?>
<div class="page-header"><h1>Manage Sliders</h1></div>
<?php
$this->widget('ext.widgets.FGridView', array(
    'id' => 'slider-grid',
    'dataProvider' => $model->search(),
    'filter' => $model,
    'columns' => array(
        array(
            'name' => 'id',
            'htmlOptions' => array('style' => 'width:50px;'),
            'filter' => false,
        ),
        array(
            'name' => 'title',
            'value' => 'CHtml::link($data->title,array("update","id"=>$data->id))',
            'type' => 'raw',
        ),
//        'options',
        array(
            'header' => '',
            'value' => 'CHtml::link(Yii::t("admin", "Upload Image"), array("sliderImages/create", "slider_id" => $data->id,), array("class" => "btn btn-xs btn-info"))." ".'
            . 'CHtml::link(Yii::t("admin", "Reorder Item"), array("view", "id" => $data->id,), array("class" => "btn btn-xs"))." ".'
          //  . 'CHtml::link(Yii::t("admin", "Manage Images"), array("sliderImages/admin", "slider_id" => $data->id,), array("class" => "btn btn-xs"))." ".'
            . 'CHtml::link(Yii::t("admin", "Add Video"), array("sliderImages/addVideo", "slider_id" => $data->id,), array("class" => "btn btn-xs btn-info"))." ".'
            . 'CHtml::link(Yii::t("admin", "Upload Flash"), array("sliderImages/uploadFlash", "slider_id" => $data->id,), array("class" => "btn btn-xs btn-info"))',
            'type' => 'html',
        ),
        array(
            'class' => 'CButtonColumn',
        ),
    ),
));
