Browse Source

Mes commandes : ajout d'un lien au niveau des commandes permettant aux utilisateurs de modifier leur abonnement (si la commande est rattachée à un abonnement).

refactoring
Guillaume Bourgeois 5 years ago
parent
commit
43e17eedbf
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      producer/views/order/history.php

+ 6
- 1
producer/views/order/history.php View File

$html .= 'En préparation' ; $html .= 'En préparation' ;
} }
elseif($c->getState() == Order::STATE_OPEN) { elseif($c->getState() == Order::STATE_OPEN) {
$link_subscription = ($c->id_subscription) ? '<li><a href="'.Yii::$app->urlManagerProducer->createUrl(['subscription/form','id'=>$c->id_subscription]).'"><span class="glyphicon glyphicon-repeat"></span> Modifier mon abonnement</a></li>' : '' ;
$html .= '<div class="btn-group"> $html .= '<div class="btn-group">
<a href="'.Yii::$app->urlManager->createUrl(['order/order','id'=>$c->id]).'" class="btn btn-default"><span class="glyphicon glyphicon-pencil"></span> Modifier</a> <a href="'.Yii::$app->urlManager->createUrl(['order/order','id'=>$c->id]).'" class="btn btn-default"><span class="glyphicon glyphicon-pencil"></span> Modifier</a>
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false"> <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
<span class="sr-only">Toggle Dropdown</span> <span class="sr-only">Toggle Dropdown</span>
</button> </button>
<ul class="dropdown-menu" role="menu"> <ul class="dropdown-menu" role="menu">
<li><a href="'.Yii::$app->urlManager->createUrl(['order/cancel','id'=>$c->id]).'"><span class="glyphicon glyphicon-trash"></span> Annuler la commande</a></li>
'.$link_subscription.'
<li><a href="'.Yii::$app->urlManager->createUrl(['order/cancel','id'=>$c->id]).'"><span class="glyphicon glyphicon-trash"></span> Annuler la commande</a></li>
</ul> </ul>
</div>' ; </div>' ;
} }

Loading…
Cancel
Save