Commit 7ffe17b9 by Скуратович Александр

правильный просмотр статусов

1 parent 01b11978
...@@ -57,7 +57,7 @@ class Host extends \yii\db\ActiveRecord ...@@ -57,7 +57,7 @@ class Host extends \yii\db\ActiveRecord
{ {
return [ return [
[['domain'], 'required'], [['domain'], 'required'],
['status_id', 'in', 'range' => array_keys(self::getWisStatus())], ['wis_status', 'in', 'range' => array_keys(self::getWisStatus())],
[['created_at', 'csv_date', 'wis_date','domain_expire'], 'safe'], [['created_at', 'csv_date', 'wis_date','domain_expire'], 'safe'],
[['wis_status', 'tix', 'status'], 'integer'], [['wis_status', 'tix', 'status'], 'integer'],
[['domain'], 'string', 'max' => 256], [['domain'], 'string', 'max' => 256],
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
use yii\helpers\Html; use yii\helpers\Html;
use yii\widgets\DetailView; use yii\widgets\DetailView;
use app\models\Host;
/* @var $this yii\web\View */ /* @var $this yii\web\View */
/* @var $model app\models\Host */ /* @var $model app\models\Host */
...@@ -34,9 +35,24 @@ $this->params['breadcrumbs'][] = $this->title; ...@@ -34,9 +35,24 @@ $this->params['breadcrumbs'][] = $this->title;
'created_at', 'created_at',
'csv_date', 'csv_date',
'wis_date', 'wis_date',
'wis_status', [
'attribute' => 'wis_status',
'filter' => Host::getWisStatus(),
'format' => 'raw',
'value' => function ($model) {
return $model::getWisStatus($model->wis_status);
},
],
'tix', 'tix',
'status' [
'attribute' => 'status',
'filter' => Host::getStatus(),
'format' => 'raw',
'value' => function ($model) {
return $model::getStatus($model->status);
},
],
], ],
]) ?> ]) ?>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!