|
- <?php
- use backend\assets\AppAsset;
- use yii\helpers\Html;
- use yii\bootstrap\Nav;
- use yii\bootstrap\NavBar;
- use yii\widgets\Breadcrumbs;
- use common\models\Etablissement ;
-
- /* @var $this \yii\web\View */
- /* @var $content string */
-
- AppAsset::register($this);
- ?>
- <?php $this->beginPage() ?>
- <!DOCTYPE html>
- <html lang="<?= Yii::$app->language ?>">
- <head>
- <meta charset="<?= Yii::$app->charset ?>">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <link rel="icon" type="image/png" href="<?php echo Yii::$app->urlManager->getBaseUrl(); ?>/img/favicon3.png" />
- <?= Html::csrfMetaTags() ?>
- <title><?= Html::encode($this->title) ?> - La boîte à pain</title>
- <?php $this->head() ?>
- </head>
- <body>
- <?php $this->beginBody() ?>
- <div class="wrap">
- <?php
- NavBar::begin([
- 'brandLabel' => '<img class="logo" src="'.Yii::$app->urlManager->getBaseUrl().'/img/laboulange3.png" />',
- 'brandUrl' => Yii::$app->homeUrl,
- 'innerContainerOptions' => ['class'=>'container-fluid'],
- 'options' => [
- 'class' => 'navbar-inverse navbar-fixed-top nav-header',
-
- ],
- ]);
- $menuItems = [
- ['label' => '<span class="glyphicon glyphicon-calendar"></span> Commandes', 'url' => ['/commande/index'], 'visible'=> !Yii::$app->user->isGuest],
- ['label' => '<span class="glyphicon glyphicon-grain"></span> Produits', 'url' => ['/produit/index'], 'visible'=> !Yii::$app->user->isGuest],
- ['label' => '<span class="glyphicon glyphicon-map-marker"></span> Points de vente', 'url' => ['/point-vente/index'], 'visible'=> !Yii::$app->user->isGuest],
- ['label' => '<span class="glyphicon glyphicon-user"></span> Utilisateurs', 'url' => ['/user/index'], 'visible'=> !Yii::$app->user->isGuest],
- ['label' => '<span class="glyphicon glyphicon-cog"></span> Paramètres', 'url' => ['/etablissement/update'], 'visible'=> !Yii::$app->user->isGuest],
- ['label' => '<span class="glyphicon glyphicon-bullhorn"></span> Communiquer', 'url' => ['/communiquer/index'], 'visible'=> !Yii::$app->user->isGuest],
- ];
- if (Yii::$app->user->isGuest) {
- $menuItems[] = ['label' => 'Connexion', 'url' => ['/site/login']];
- } else {
- $menuItems[] = [
- 'label' => '<span class="glyphicon glyphicon-off"></span> Déconnexion',
- 'url' => ['/site/logout'],
- 'linkOptions' => ['data-method' => 'post']
- ];
-
- if(Yii::$app->getRequest()->serverName == 'localhost')
- $url = '../../frontend/web/' ;
- else
- $url = 'http://www.laboiteapain.net/' ;
-
- $menuItems[] = [
- 'label' => '<span class="retour-site">Retour sur le site</span>',
- 'url' => $url,
- ];
- }
- echo Nav::widget([
- 'options' => ['class' => 'navbar-nav navbar-right'],
- 'items' => $menuItems,
- 'encodeLabels' => false
- ]);
- NavBar::end();
- ?>
-
- <div class="container-fluid container-body">
- <?php if(!Yii::$app->user->isGuest): ?>
- <div class="nom-boulange">
- <span><?= Html::encode(Yii::$app->user->identity->getNomMagasin()) ; ?></span>
- <?php $etat_paiement_etablissement = Yii::$app->user->identity->etatPaiementEtablissement(); ?>
- <?php if($etat_paiement_etablissement == 'essai'): ?>
- <span id="etat-paiement-etablissement">Période d'essai gratuite
- <span class="strong"><?php echo Yii::$app->user->identity->periodeEssai(); ?> jours</span> <a class="btn btn-success" href="<?php echo Yii::$app->urlManager->createUrl(['paiement/index']) ?>">S'abonner</a>
- </span>
- <?php elseif($etat_paiement_etablissement == Etablissement::PAIEMENT_ESSAI_TERMINE || $etat_paiement_etablissement == Etablissement::PAIEMENT_RETARD): ?>
- <span id="etat-paiement-etablissement">
- <span class="strong">
- <?php if($etat_paiement_etablissement == Etablissement::PAIEMENT_ESSAI_TERMINE): ?>Période d'essai gratuite terminée
- <?php elseif($etat_paiement_etablissement == Etablissement::PAIEMENT_RETARD): ?>Retard de paiement
- <?php endif; ?>
- </span>
- </span>
- <?php endif; ?>
- </div>
- <?php endif; ?>
- <?= Breadcrumbs::widget([
- 'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [],
- ]) ?>
- <?= $content ?>
- </div>
- </div>
-
- <div id="alerts-fixed"></div>
-
- <footer class="footer">
- <div class="container">
- <p class="pull-left"></p>
- <p class="pull-right"><?= Yii::powered() ?></p>
- </div>
- </footer>
-
- <?php $this->endBody() ?>
-
- <!-- chat -->
- <script src="//code.tidio.co/gngxwpdobb64cpvhd8patajpurs5feom.js"></script>
-
- <!-- analytics -->
- <script>
- (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
- (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
- m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
- })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
-
- ga('create', 'UA-86917043-1', 'auto');
- ga('send', 'pageview');
- </script>
- </body>
- </html>
- <?php $this->endPage() ?>
|