Files
SmartHomePHP/modules/admin/views/board/index.php
Alex Solomaha c021d959dd Refactor
2016-10-21 16:03:14 +03:00

42 lines
1.1 KiB
PHP

<?php
/* @var $this yii\web\View */
/* @var $searchModel app\models\BoardSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
use yii\helpers\Html;
use yii\grid\GridView;
use yii\widgets\Pjax;
$this->title = 'Устройства';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="board-index">
<p>
<?= Html::a('Добавить', ['create'], ['class' => 'btn btn-success']) ?>
</p>
<?php // echo $this->render('_search', ['model' => $searchModel]); ?>
<?php Pjax::begin(); ?>
<?= GridView::widget([
'dataProvider' => $dataProvider,
'summaryOptions' => ['class' => 'alert alert-info'],
'layout' => '{summary}<div class="table-responsive">{items}</div>{pager}',
'filterModel' => $searchModel,
'columns' => [
'id',
'name',
[
'attribute' => 'type',
'value' => function (\app\models\Board $model) {
return $model->getTypeLabel();
}
],
['class' => 'app\components\ActionButtonColumn'],
],
]); ?>
<?php Pjax::end(); ?>
</div>