瀏覽代碼

Adaptations backend/development

dev
Guillaume Bourgeois 6 年之前
父節點
當前提交
435dcdc038
共有 5 個檔案被更改,包括 12 行新增12 行删除
  1. +2
    -2
      backend/controllers/DevelopmentController.php
  2. +1
    -1
      backend/views/development/_form.php
  3. +6
    -6
      backend/views/development/index.php
  4. +2
    -2
      common/models/Development.php
  5. +1
    -1
      common/models/DevelopmentPriority.php

+ 2
- 2
backend/controllers/DevelopmentController.php 查看文件

@@ -78,7 +78,7 @@ class DevelopmentController extends Controller
*
* @return mixed
*/
public function actionIndex($status = Development::STATUT_OPEN)
public function actionIndex($status = Development::STATUS_OPEN)
{
$dataProvider = new ActiveDataProvider([
'query' => Development::find()
@@ -171,7 +171,7 @@ class DevelopmentController extends Controller
DevelopmentPriority::PRIORITY_LOW])) {

if ($develpmentPriority) {
$develpmentPriority->priority = $priorite;
$develpmentPriority->priority = $priority;
$develpmentPriority->id_producer = Producer::getId();
} else {
$develpmentPriority = new DevelopmentPriority;

+ 1
- 1
backend/views/development/_form.php 查看文件

@@ -54,7 +54,7 @@ use common\models\Developpement ;
Development::TYPE_BUG => 'Anomalie',
]) ?>
<?= $form->field($model, 'statut')->dropDownList([
<?= $form->field($model, 'status')->dropDownList([
Development::STATUS_OPEN => 'Ouvert',
Development::STATUS_CLOSED => 'Fermé',
]) ?>

+ 6
- 6
backend/views/development/index.php 查看文件

@@ -83,7 +83,7 @@ $this->params['breadcrumbs'][] = $this->title;
'header' => 'Type',
'format' => 'raw',
'value' => function($model) {
if($model->type == Develoement::TYPE_EVOLUTION) {
if($model->type == Development::TYPE_EVOLUTION) {
return '<span class="label label-success">Évolution</span>' ;
}
else {
@@ -143,17 +143,17 @@ $this->params['breadcrumbs'][] = $this->title;
'.$currentPriority.' <span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li><a href="'.Yii::$app->urlManager->createUrl(['development/priority','id_development' => $model->id]).'">Non</a></li>
<li><a href="'.Yii::$app->urlManager->createUrl(['development/priority','id_development' => $model->id, 'priorite' => DevelopmentPriority::PRIORITY_LOW]).'">Basse</a></li>
<li><a href="'.Yii::$app->urlManager->createUrl(['development/priority','id_development' => $model->id, 'priorite' => DevelopmentPriority::PRIORITY_NORMAL]).'">Normale</a></li>
<li><a href="'.Yii::$app->urlManager->createUrl(['development/priority','id_development' => $model->id, 'priorite' => DevelopmentPriority::PRIORITY_HIGH]).'">Haute</a></li>
<li><a href="'.Yii::$app->urlManager->createUrl(['development/priority','idDevelopment' => $model->id]).'">Non</a></li>
<li><a href="'.Yii::$app->urlManager->createUrl(['development/priority','idDevelopment' => $model->id, 'priority' => DevelopmentPriority::PRIORITY_LOW]).'">Basse</a></li>
<li><a href="'.Yii::$app->urlManager->createUrl(['development/priority','idDevelopment' => $model->id, 'priority' => DevelopmentPriority::PRIORITY_NORMAL]).'">Normale</a></li>
<li><a href="'.Yii::$app->urlManager->createUrl(['development/priority','idDevelopment' => $model->id, 'priority' => DevelopmentPriority::PRIORITY_HIGH]).'">Haute</a></li>
</ul>
</div><br />' ;
if(isset($model->developmentPriority) && count($model->developmentPriority)) {
foreach($model->developmentPriority as $developmentPriority) {
if($developmentPriority->id_producer != Producer::getId())
$html .= '<div class="label label-priorite label-sm label-'.$developmentPriority->getClassCssStyleButton().'">'.Html::encode($developmentPriority->etablissement->name).'</div> ' ;
$html .= '<div class="label label-priorite label-sm label-'.$developmentPriority->getClassCssStyleButton().'">'.Html::encode($developmentPriority->producer->name).'</div> ' ;
}
}

+ 2
- 2
common/models/Development.php 查看文件

@@ -79,8 +79,8 @@ class Development extends ActiveRecordCommon
[['id', 'progress'], 'integer'],
[['description'], 'string'],
[['date', 'date_delivery'], 'safe'],
[['tie_estimate'], 'number'],
[['objet', 'status', 'type'], 'string', 'max' => 255],
[['time_estimate'], 'number'],
[['subject', 'status', 'type'], 'string', 'max' => 255],
];
}


+ 1
- 1
common/models/DevelopmentPriority.php 查看文件

@@ -79,7 +79,7 @@ class DevelopmentPriority extends ActiveRecordCommon
* Relations
*/

public function getProducert()
public function getProducer()
{
return $this->hasOne(Producer::className(), ['id' => 'id_producer']);
}

Loading…
取消
儲存