add_status_to_project_index
This commit is contained in:
@ -2,6 +2,7 @@
|
||||
|
||||
namespace backend\modules\project\models;
|
||||
|
||||
use common\classes\Debug;
|
||||
use Yii;
|
||||
use yii\base\Model;
|
||||
use yii\data\ActiveDataProvider;
|
||||
|
@ -30,6 +30,16 @@ use yii\widgets\ActiveForm;
|
||||
]
|
||||
); ?>
|
||||
|
||||
<?= $form->field($model, 'status')
|
||||
->dropDownList(\yii\helpers\ArrayHelper::map(
|
||||
\common\models\Status::find()
|
||||
->joinWith('useStatuses')
|
||||
->where(['`use_status`.`use`' => \common\models\UseStatus::USE_PROJECT])->all(), 'id', 'name'),
|
||||
[
|
||||
'prompt' => 'Выберите'
|
||||
]
|
||||
) ?>
|
||||
|
||||
<?= $form->field($model, 'hh_id')->widget(Select2::class,
|
||||
[
|
||||
'data' => \yii\helpers\ArrayHelper::map(\common\models\Hh::find()->all(),'id', 'title'),
|
||||
|
@ -1,6 +1,8 @@
|
||||
<?php
|
||||
|
||||
use common\models\Project;
|
||||
use common\models\UseStatus;
|
||||
use kartik\select2\Select2;
|
||||
use yii\helpers\Html;
|
||||
use yii\grid\GridView;
|
||||
|
||||
@ -46,6 +48,21 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
return implode(', ', $model->getUsersNameList());
|
||||
}
|
||||
],
|
||||
[
|
||||
'attribute' => 'status',
|
||||
'value' => function($model){
|
||||
return $model->status0['name'];
|
||||
},
|
||||
'filter' => kartik\select2\Select2::widget([
|
||||
'model' => $searchModel,
|
||||
'attribute' => 'status',
|
||||
'data' => \common\models\Status::getStatusesArray(\common\models\UseStatus::USE_PROJECT),
|
||||
'options' => ['placeholder' => 'Начните вводить...','class' => 'form-control'],
|
||||
'pluginOptions' => [
|
||||
'allowClear' => true
|
||||
],
|
||||
]),
|
||||
],
|
||||
//'created_at',
|
||||
//'updated_at',
|
||||
|
||||
|
@ -35,6 +35,7 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
'attribute' => 'hh.url'
|
||||
],
|
||||
'description:ntext',
|
||||
'status',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
],
|
||||
|
Reference in New Issue
Block a user