|
|
|
|
|
|
|
|
<?php |
|
|
<?php |
|
|
|
|
|
|
|
|
use yii\helpers\Html ; |
|
|
use yii\helpers\Html ; |
|
|
|
|
|
use common\helpers\Url ; |
|
|
|
|
|
|
|
|
?> |
|
|
?> |
|
|
<div class="liste-etablissements"> |
|
|
<div class="liste-etablissements"> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<?php if($context == 'index'): ?> |
|
|
<?php if($context == 'index'): ?> |
|
|
<a class="btn btn-primary" <?= $disabled; ?> href="<?= Yii::$app->urlManager->createUrl(['commande/create', 'id_etablissement' => $e['id']]) ?>">Commander</a> |
|
|
<a class="btn btn-primary" <?= $disabled; ?> href="<?= Yii::$app->urlManager->createUrl(['commande/create', 'id_etablissement' => $e['id']]) ?>">Commander</a> |
|
|
|
|
|
<?php if($e['id'] == Yii::$app->user->identity->id_etablissement): ?> |
|
|
|
|
|
<a class="btn btn-default" href="<?= Url::backend(); ?>" data-toggle="tooltip" data-placement="bottom" title="Accédez au panneau d'administration de votre boulangerie"><span class="glyphicon glyphicon-cog"></span> Gérer ma boulangerie</a> |
|
|
|
|
|
<?php endif; ?> |
|
|
<?php elseif($context == 'commande'): ?> |
|
|
<?php elseif($context == 'commande'): ?> |
|
|
<a class="btn btn-primary" <?= $disabled; ?> href="<?= Yii::$app->urlManager->createUrl(['commande/create', 'id_etablissement' => $e['id']]) ?>">Sélectionner</a> |
|
|
<a class="btn btn-primary" <?= $disabled; ?> href="<?= Yii::$app->urlManager->createUrl(['commande/create', 'id_etablissement' => $e['id']]) ?>">Sélectionner</a> |
|
|
<?php endif; ?> |
|
|
<?php endif; ?> |