<?php
/* @var $this SliderImagesController */
/* @var $model SliderImages */
$this->breadcrumbs = array(
    'Sliders' => array('slider/admin'),
    $model->slider->title => array('slider/view', 'id' => $model->slider->id),
    'Manage Images',
);
$this->menu = array(
    array('label' => 'Create SliderImages', 'url' => array('create')),
);
Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$('#slider-images-grid').yiiGridView('update', {
		data: $(this).serialize()
	});
	return false;
});
");
?>
<div class="page-header"><h1>Manage Slider Images</h1></div>
<?php
$this->widget('ext.widgets.FGridView', array(
    'id' => 'slider-images-grid',
    'dataProvider' => $model->search(),
    'filter' => $model,
    'columns' => array(
        array(
            'name' => 'id',
            'htmlOptions' => array('style' => 'width:50px;'),
        ),
        array(
            'name' => 'image',
            'value' => 'CHtml::image(Yii::app()->params["uploadUrl"] . get_class($data) . "/" . $data->image,$data->title,array("style"=>"width:100px"))',
            'type' => 'html',
        ),
        array(
            'class' => 'editable.EditableColumn',
            'name' => 'title',
            'headerHtmlOptions' => array('style' => 'width: 150px'),
            'editable' => array(//editable section
                'url' => $this->createUrl('quickUpdate'),
                'placement' => 'right',
            ),
            'htmlOptions' => array('width' => '300px'),
        ),
        array(
            'class' => 'editable.EditableColumn',
            'name' => 'link',
            'headerHtmlOptions' => array('style' => 'width: 150px'),
            'editable' => array(//editable section
                'url' => $this->createUrl('quickUpdate'),
                'placement' => 'right',
            ),
            'htmlOptions' => array('width' => '300px'),
        ),
        array(
            'class' => 'editable.EditableColumn',
            'name' => 'description',
            'headerHtmlOptions' => array('style' => 'width: 150px'),
            'editable' => array(//editable section
                'url' => $this->createUrl('quickUpdate'),
                'placement' => 'right',
            ),
            'htmlOptions' => array('width' => '300px'),
        ),
//        array(
//            'header' => '',
//            'name' => 'slider.title',
//        ),
        array(
            'class' => 'CButtonColumn',
//            'updateButtonUrl' => 'Yii::app()->controller->createUrl("update", array("id" => $data->id, "slider_id" => $data->slider_id))',
            'template' => '{delete}',
        ),
    ),
));
