user->isGuest) { $producer = Producer::findOne(Producer::getId()) ; } ?> beginPage() ?> <?= Html::encode($this->title) ?> - distrib 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' => ['/order/index'], 'visible' => !Yii::$app->user->isGuest, 'items' => [ [ 'label' => ' Toutes les commandes', 'url' => ['/order/index'], 'visible' => !Yii::$app->user->isGuest ], [ 'label' => ' Abonnements', 'url' => ['/subscription/index'], 'visible' => !Yii::$app->user->isGuest ], ] ], [ 'label' => ' Produits', 'url' => ['/product/index'], 'visible' => !Yii::$app->user->isGuest ], [ 'label' => ' Points de vente', 'url' => ['/point-sale/index'], 'visible' => !Yii::$app->user->isGuest ], [ 'label' => ' Clients', 'url' => ['/user/index'], 'visible' => !Yii::$app->user->isGuest ], [ 'label' => '', 'url' => ['/producer/update'], 'visible' => !Yii::$app->user->isGuest, 'items' => [ [ 'label' => ' Paramètres', 'url' => ['/producer/update'], 'visible' => !Yii::$app->user->isGuest ], [ 'label' => ' Communiquer', 'url' => ['/communicate/index'], 'visible' => !Yii::$app->user->isGuest ], [ 'label' => ' Mon abonnement', 'url' => ['/producer/billing'], 'visible' => !Yii::$app->user->isGuest, ], [ 'label' => ' Statistiques', 'url' => ['/stats/index'], 'visible' => !Yii::$app->user->isGuest, ], [ 'label' => ' Statistiques produits', 'url' => ['/stats/products'], 'visible' => !Yii::$app->user->isGuest, ], [ 'label' => ' Développement', 'url' => ['/development/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' => ['producer-admin/index'], 'visible' => !Yii::$app->user->isGuest, ], [ 'label' => ' Facturation', 'url' => ['producer-admin/billing'], 'visible' => false, ], ] ]; } $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->getNameProducer()); ?> 'select-producer']); ?> orderBy('name ASC')->all(), 'id', function($model, $defaultValue) { return $model->name; })); ?> active): ?>
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() ?>