user->isGuest) $producer = Etablissement::findOne(Yii::$app->user->identity->id_etablissement) ; ?> beginPage() ?> <?= Html::encode($this->title) ?> - La boîte à pain head() ?> beginBody() ?>
'', 'brandUrl' => Yii::$app->homeUrl, 'innerContainerOptions' => ['class' => 'container-fluid'], 'options' => [ 'class' => 'navbar-inverse navbar-fixed-top nav-header', ], ]); $menuItems = [ [ 'label' => ' Tableau de bord', 'url' => ['/site/index'], 'visible' => !Yii::$app->user->isGuest ], [ 'label' => ' Commandes', 'url' => ['/commande/index'], 'visible' => !Yii::$app->user->isGuest, 'items' => [ [ 'label' => ' Toutes les commandes', 'url' => ['/commande/index'], 'visible' => !Yii::$app->user->isGuest ], [ 'label' => ' Commandes récurrentes', 'url' => ['/commandeauto/index'], 'visible' => !Yii::$app->user->isGuest ], ] ], [ 'label' => ' Produits', 'url' => ['/produit/index'], 'visible' => !Yii::$app->user->isGuest ], [ 'label' => ' Points de vente', 'url' => ['/point-vente/index'], 'visible' => !Yii::$app->user->isGuest ], [ 'label' => ' Clients', 'url' => ['/user/index'], 'visible' => !Yii::$app->user->isGuest ], [ 'label' => '', 'url' => ['/etablissement/update'], 'visible' => !Yii::$app->user->isGuest, 'items' => [ [ 'label' => ' Paramètres', 'url' => ['/etablissement/update'], 'visible' => !Yii::$app->user->isGuest ], [ 'label' => ' Communiquer', 'url' => ['/communiquer/index'], 'visible' => !Yii::$app->user->isGuest ], [ 'label' => ' Mon abonnement', 'url' => ['/etablissement/facturation'], 'visible' => !Yii::$app->user->isGuest, ], [ 'label' => ' Statistiques', 'url' => ['/stats/index'], 'visible' => !Yii::$app->user->isGuest, ], [ 'label' => ' Statistiques produits', 'url' => ['/stats/produits'], 'visible' => !Yii::$app->user->isGuest, ], [ 'label' => ' Développement', 'url' => ['/developpement/index'], 'visible' => !Yii::$app->user->isGuest ], ], ] ]; if (Yii::$app->user->isGuest) { $menuItems[] = ['label' => 'Connexion', 'url' => ['/site/login']]; } else { if (Yii::$app->user->identity->status == USER::STATUS_ADMIN) { $menuItems[] = [ 'label' => '', 'url' => '#', 'items' => [ [ 'label' => ' Producteurs', 'url' => ['etablissement-admin/index'], 'visible' => !Yii::$app->user->isGuest, ], [ 'label' => ' Facturation', 'url' => ['etablissement-admin/facturation'], 'visible' => !Yii::$app->user->isGuest, ], ] ]; } $menuItems[] = [ 'label' => '', 'url' => ['/site/logout'], 'linkOptions' => ['data-method' => 'post', 'title' => 'Déconnexion'] ]; $menuItems[] = [ 'label' => 'Retour sur le site', 'url' => Yii::$app->urlManagerProducer->createAbsoluteUrl(['site/index','slug_producer' => $producer->slug]), ]; } echo Nav::widget([ 'options' => ['class' => 'navbar-nav navbar-right'], 'items' => $menuItems, 'encodeLabels' => false ]); NavBar::end(); ?>
Dév.Démo
user->isGuest): ?>
user->identity->status == User::STATUS_BOULANGER): ?> user->identity->getNomMagasin()); ?> user->identity->status == User::STATUS_ADMIN): ?> 'select-etablissement']); ?> user->identity->id_etablissement, ArrayHelper::map(Etablissement::find()->orderBy('nom ASC')->all(), 'id', function($model, $defaultValue) { return $model->nom; })); ?> user->identity->id_etablissement); if (!$etablissement->actif): ?>
user->identity->etatPaiementEtablissement(); ?> Période d'essai gratuite user->identity->periodeEssai(); ?> jours S'abonner Période d'essai gratuite terminée Retard de paiement
Espace de démonstration : Testez la plateforme sans avoir à vous inscrire. Les données sont réinitialisées quotidiennement •
isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [], ]) ?>
endBody() ?> endPage() ?>