Add execution_priority to task
This commit is contained in:
@ -62,6 +62,7 @@ class ProjectTaskSearch extends ProjectTask
|
||||
'id' => $this->id,
|
||||
'project_task.project_id' => $this->project_id,
|
||||
'project_task.status' => $this->status,
|
||||
'project_task.execution_priority' => $this->execution_priority,
|
||||
'project_task.created_at' => $this->created_at,
|
||||
'project_task.updated_at' => $this->updated_at,
|
||||
]);
|
||||
|
@ -60,12 +60,12 @@ use yii\widgets\ActiveForm;
|
||||
|
||||
<?= $form->field($model, 'priority')->input('number') ?>
|
||||
|
||||
<!-- --><?//= $form->field($model, 'priority')->dropDownList(
|
||||
// ProjectTask::priorityList(),
|
||||
// [
|
||||
// 'prompt' => 'Выберите'
|
||||
// ]
|
||||
// ) ?>
|
||||
<?= $form->field($model, 'execution_priority')->dropDownList(
|
||||
ProjectTask::priorityList(),
|
||||
[
|
||||
'prompt' => 'Выберите'
|
||||
]
|
||||
) ?>
|
||||
|
||||
<div class="form-group">
|
||||
<?= Html::submitButton('Создать', ['class' => 'btn btn-success']) ?>
|
||||
|
@ -58,14 +58,14 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
return StatusHelper::statusLabel($model->status);
|
||||
}
|
||||
],
|
||||
// [
|
||||
// 'attribute' => 'priority',
|
||||
// 'format' => 'raw',
|
||||
// 'filter' => ProjectTask::priorityList(),
|
||||
// 'value' => function($model){
|
||||
// return ProjectTask::getPriority($model->status);
|
||||
// }
|
||||
// ],
|
||||
[
|
||||
'attribute' => 'execution_priority',
|
||||
'format' => 'raw',
|
||||
'filter' => ProjectTask::priorityList(),
|
||||
'value' => function($model){
|
||||
return ProjectTask::getPriority($model->status);
|
||||
}
|
||||
],
|
||||
[
|
||||
'attribute' => 'created_at',
|
||||
'format' => ['datetime', 'php:d.m.Y H:i']
|
||||
|
@ -61,12 +61,12 @@ YiiAsset::register($this);
|
||||
],
|
||||
'description',
|
||||
'priority',
|
||||
// [
|
||||
// 'attribute' => 'priority',
|
||||
// 'value' => function($model){
|
||||
// return ProjectTask::getPriority($model->status);
|
||||
// }
|
||||
// ],
|
||||
[
|
||||
'attribute' => 'execution_priority',
|
||||
'value' => function($model){
|
||||
return ProjectTask::getPriority($model->status);
|
||||
}
|
||||
],
|
||||
],
|
||||
]) ?>
|
||||
|
||||
|
Reference in New Issue
Block a user