title = 'Points de vente'; $this->params['breadcrumbs'][] = $this->title; ?>

title) ?> 'btn btn-success']) ?>

$dataProvider, 'columns' => [ 'name', 'locality', [ 'attribute' => 'point_production', 'format' => 'raw', 'value' => function($model) { if($model->point_production) { return 'Oui' ; } else { return 'Non' ; } } ], [ 'label' => 'Livraison', 'value' => function($model) { return $model->getStrDeliveryDays() ; } ], [ 'attribute' => 'acces_restreint', 'format' => 'raw', 'value' => function($model) { $count = UserPointSale::find()->where(['id_point_sale' => $model->id])->count(); $html = '' ; if($model->restricted_access) { $html .= ' ' ; if($count == 1) { $html .= '1 utilisateur' ; } else { $html .= $count.' utilisateurs' ; } } if(strlen($model->code)) { if(strlen($html)) $html .= '
' ; $html .= 'Code : '.Html::encode($model->code).'' ; } return $html ; } ], [ 'attribute' => 'credit', 'label' => 'Crédit', 'format' => 'raw', 'value' => function($model) { if($model->credit) { return '' ; } return '' ; } ], [ 'class' => 'yii\grid\ActionColumn', 'template' => '{update} {delete}', 'headerOptions' => ['class' => 'actions'], 'buttons' => [ 'update' => function ($url, $model) { return Html::a(' Modifier', $url, [ 'title' => Yii::t('app', 'Modifier'), 'class' => 'btn btn-default' ]); }, 'delete' => function ($url, $model) { return Html::a(' Suprimer', $url, [ 'title' => Yii::t('app', 'Supprimer'), 'class' => 'btn btn-default' ]); } ], ], ], ]); ?>