Commit 36a11839 by san58

сортировка результирующего списка

+отобразил доп поля
1 parent a4a3044d
......@@ -48,6 +48,12 @@ class HostFreeController extends Controller
{
$searchModel = new HostSearch(['wis_status' => Host::STATUS_WIS_FREE, 'status' => Filter::STATUS_ON, 'f1_status' => Filter::STATUS_ON]);
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
$dataProvider->setSort([
'defaultOrder' => [
'date' => SORT_DESC
]
]);
return $this->render('index', [
'searchModel' => $searchModel,
......
......@@ -31,7 +31,25 @@ $this->params['breadcrumbs'][] = $this->title;
'domain',
'wis_date',
'tix',
'tix_date'
'tix_date',
'f2_status' =>
[
'attribute' => 'f2_status',
'filter' => \app\models\Host::getFStatus(),
'format' => 'raw',
'value' => function ($model) {
return $model::getFStatus($model->f2_status);
},
],
'f3_status' =>
[
'attribute' => 'f3_status',
'filter' => \app\models\Host::getFStatus(),
'format' => 'raw',
'value' => function ($model) {
return $model::getFStatus($model->f3_status);
},
],
],
]); ?>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!