TbExtendedGridView
Добавлено: 2014.06.03, 22:33
Делаю Drag'n'Drop с помощью YiiBooster.
Код виджета брал тут.
Вот что я зделал:
S:\home\example\www\protected\views\post\admin:
Открываю http://example/index.php?r=post/admin и вижу вот такую штуку:
Manage Posts
You may optionally enter a comparison operator (<, <=, >, >=, <> or =) at the beginning of each of your search values to specify how the comparison should be done.
Advanced Search
Parse error: syntax error, unexpected '[' in S:\home\example\www\protected\extensions\booster\widgets\TbExtendedGridView.php on line 495
Что мне делать?
Код виджета брал тут.
Вот что я зделал:
S:\home\example\www\protected\views\post\admin:
Код: Выделить всё
<?php
/* @var $this PostController */
/* @var $model Post */
<h1>Manage Posts</h1>
<p>
You may optionally enter a comparison operator (<b><</b>, <b><=</b>, <b>></b>, <b>>=</b>, <b><></b>
or <b>=</b>) at the beginning of each of your search values to specify how the comparison should be done.
</p>
<?php echo CHtml::link('Advanced Search','#',array('class'=>'search-button')); ?>
<div class="search-form" style="display:none">
<?php $this->renderPartial('_search',array(
'model'=>$model,
));
</div><!-- search-form -->
$this->widget('booster.widgets.TbExtendedGridView', array(
'sortableRows'=>true,
'afterSortableUpdate' => 'js:function(id, position){ console.log("id: "+id+", position:"+position);}',
'type'=>'striped bordered',
'dataProvider' => $model->search(),
'template' => "{items}",
'columns'=>array(
'id',
'title',
'content',
'tags',
'status',
'create_time',
'update_time',
'author_id',
array(
'class'=>'CButtonColumn',
),
),
));
?>
Manage Posts
You may optionally enter a comparison operator (<, <=, >, >=, <> or =) at the beginning of each of your search values to specify how the comparison should be done.
Advanced Search
Parse error: syntax error, unexpected '[' in S:\home\example\www\protected\extensions\booster\widgets\TbExtendedGridView.php on line 495
Что мне делать?