setTitle('Commandes ' . Html::encode($user->getUsername()) . '', 'Commandes de ' . Html::encode($user->getUsername()));
$this->addBreadcrumb(['label' => 'Utilisateurs', 'url' => ['index']]);
$this->addBreadcrumb(['label' => Html::encode($user->lastname . ' ' . $user->name)]);
$this->addBreadcrumb('Commandes');
?>
= GridView::widget([
'filterModel' => $searchModel,
'dataProvider' => $dataProvider,
'columns' => [
[
'attribute' => 'distribution.date',
'label' => 'Date de livraison',
'value' => function ($model) {
return date('d/m/Y',strtotime($model->distribution->date));
}
],
[
'label' => 'Historique',
'format' => 'raw',
'value' => function ($model) {
return $model->getStrHistory();
}
],
[
'label' => 'Résumé',
'format' => 'raw',
'value' => function ($model) {
return $model->getCartSummary();
}
],
[
'label' => 'Point de vente',
'format' => 'raw',
'value' => function ($model) {
return $model->getPointSaleSummary();
}
],
[
'label' => 'Montant',
'format' => 'raw',
'value' => function ($model) {
$model->init();
return $model->getAmountSummary();
}
],
[
'class' => 'yii\grid\ActionColumn',
'template' => '{update}',
'headerOptions' => ['class' => 'column-actions'],
'contentOptions' => ['class' => 'column-actions'],
'buttons' => [
'update' => function ($url, $model) {
$url = Yii::$app->urlManager->createUrl(['distribution/index', 'idOrderUpdate' => $model->id]);
return Html::a('', $url, [
'title' => 'Modifier', 'class' => 'btn btn-default'
]);
},
],
]
],
]); ?>