title = 'Старые фоторепортажи'; $this->params['breadcrumbs'][] = $this->title; $dataProvider->getPagination()->pageSize = 50; ?>
= Html::a('Create Report Topic', ['create'], ['class' => 'btn btn-success']) ?>
= GridView::widget([ 'dataProvider' => $dataProvider, 'columns' => [ 'id', [ 'class' => 'yii\grid\DataColumn', 'format' => 'raw', 'value' => function ($data) { return Html::a(Html::encode(strip_tags($data->title)),["/photo/".$data->id]); }, 'attribute' => 'Заголовок', ], [ 'class' => 'yii\grid\DataColumn', 'format' => 'raw', 'value' => function ($data) { $imgFileShort = "/images/report_photo/"; return ''; }, 'attribute' => 'img', ], [ 'class' => 'yii\grid\DataColumn', 'value' => function ($data) { return $data->parent_id?'Вложенная папка в: '.$data->parent_id:''; }, 'attribute' => 'Вложенные', ], [ 'class' => 'yii\grid\DataColumn', 'format' => 'raw', 'value' => function ($data, $key, $index, $column) { return $data->active?' Вкл.':' Выкл.'; }, 'attribute' => 'Статус', ], [ 'class' => ActionColumn::className(), 'header' => 'Управление', 'template' => '{view} {update}', 'buttonOptions' => ['class' => 'btn btn-default'], 'urlCreator' => function ($action, $model, $key, $index, $column) { return Url::toRoute([$action, 'id' => $model->id]); }, ], ], 'layout' => "{errors}\n{pager}\n{items}\n{pager}\n{summary}", 'pager' => [ 'prevPageCssClass' => 'page-item', 'firstPageLabel' => 'Начало', 'lastPageLabel' => 'Конец', 'linkOptions' => [ 'class'=>'page-link'], 'pageCssClass' => 'page-item', 'disabledListItemSubTagOptions' => ['tag' => 'a', 'class' => 'page-link'], ], ]); ?>