2018-10-11 11:15:09 +03:00
|
|
|
<?php
|
|
|
|
|
2019-07-02 16:51:33 +03:00
|
|
|
use yii\data\ActiveDataProvider;
|
2018-10-11 11:15:09 +03:00
|
|
|
use yii\helpers\Html;
|
|
|
|
use yii\grid\GridView;
|
2019-07-02 16:51:33 +03:00
|
|
|
use yii\widgets\ListView;
|
2018-10-11 11:15:09 +03:00
|
|
|
|
|
|
|
/* @var $this yii\web\View */
|
|
|
|
/* @var $searchModel backend\modules\status\models\StatusSearch */
|
|
|
|
/* @var $dataProvider yii\data\ActiveDataProvider */
|
|
|
|
|
2018-10-12 14:52:08 +03:00
|
|
|
$this->title = 'Статусы';
|
2018-10-11 11:15:09 +03:00
|
|
|
$this->params['breadcrumbs'][] = $this->title;
|
|
|
|
?>
|
|
|
|
<div class="status-index">
|
|
|
|
|
|
|
|
<?php // echo $this->render('_search', ['model' => $searchModel]); ?>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
<?= Html::a('Create Status', ['create'], ['class' => 'btn btn-success']) ?>
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<?= GridView::widget([
|
|
|
|
'dataProvider' => $dataProvider,
|
|
|
|
'filterModel' => $searchModel,
|
|
|
|
'columns' => [
|
|
|
|
['class' => 'yii\grid\SerialColumn'],
|
|
|
|
|
|
|
|
'name',
|
2019-07-02 16:51:33 +03:00
|
|
|
[
|
|
|
|
'label' => 'Доп. информация',
|
|
|
|
'format' => 'raw',
|
|
|
|
'value' => function ($model) {
|
|
|
|
$dataProvider = new ActiveDataProvider([
|
|
|
|
'query' => $model->getUseStatuses(),
|
|
|
|
]);
|
|
|
|
return ListView::widget([
|
|
|
|
'dataProvider' => $dataProvider,
|
|
|
|
'itemView' => '_additional',
|
|
|
|
'layout' => "{items}",
|
|
|
|
|
|
|
|
]);
|
|
|
|
},
|
|
|
|
'headerOptions' => ['width' => '300'],
|
|
|
|
],
|
2018-10-11 11:15:09 +03:00
|
|
|
['class' => 'yii\grid\ActionColumn'],
|
|
|
|
],
|
|
|
|
]); ?>
|
|
|
|
</div>
|