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

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

$dataProvider, 'columns' => [ 'nom', 'localite', [ 'attribute' => 'point_fabrication', 'format' => 'raw', 'value' => function($model) { if($model->point_fabrication) { return 'Oui' ; } else { return 'Non' ; } } ], [ 'label' => 'Livraison', 'value' => function($model) { return $model->strJoursLivraison() ; } ], [ 'attribute' => 'acces_restreint', 'format' => 'raw', 'value' => function($model) { $count = PointVenteUser::find()->where(['id_point_vente' => $model->id])->count(); $html = '' ; if($model->acces_restreint) { $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_pain', 'label' => 'Crédit pain', 'format' => 'raw', 'value' => function($model) { if($model->credit_pain) 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' ]); } ], ], ], ]); ?>