|
- <?php
- use yii\helpers\Html;
- use yii\bootstrap\Nav;
- use yii\bootstrap\NavBar;
- use yii\widgets\Breadcrumbs;
- use frontend\assets\AppAsset;
- use frontend\widgets\Alert;
- use common\helpers\Url ;
-
- /* @var $this \yii\web\View */
- /* @var $content string */
-
- $is_home = (Yii::$app->controller->id == 'site' && Yii::$app->controller->action->id == 'index') ;
-
- AppAsset::register($this);
- ?>
- <?php $this->beginPage() ?>
- <!DOCTYPE html>
- <head>
- <title><?php if($is_home): ?>La boîte à pain • <?= Html::encode($this->title) ?> <?php else: ?><?= Html::encode($this->title) ?> • La boîte à pain<?php endif; ?></title>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <?= Html::csrfMetaTags() ?>
- <link rel="icon" type="image/png" href="<?php echo Yii::$app->urlManager->getBaseUrl(); ?>/img/favicon4.png" />
- <!--[if IE]><link rel="shortcut icon" type="image/x-icon" href="./img/favicon.ico" /><![endif]-->
- <?php $this->head() ?>
- <!--[if lt IE 9]>
- <script src="<?php echo Yii::$app->urlManager->getBaseUrl(); ?>/js/html5shiv.min.js"></script>
- <link href="<?php echo Yii::$app->urlManager->getBaseUrl(); ?>/css/ie.css" rel="stylesheet">
- <![endif]-->
- <!--[if IE 7]>
- <link href="<?php echo Yii::$app->urlManager->getBaseUrl(); ?>/css/ie7.css" rel="stylesheet">
- <![endif]-->
- </head>
- <body class="<?php if($is_home): echo 'home' ; endif; ?><?php if(!Yii::$app->user->isGuest): ?> connected<?php endif; ?>">
- <?php $this->beginBody() ?>
- <div id="back"></div>
- <?php if(YII_ENV == 'demo'): ?>
- <div id="block-demo">
- <div class="container">
- <span class="glyphicon glyphicon-eye-open"></span> <strong>Espace de démonstration</strong> :
- Testez la plateforme sans avoir à vous inscrire. Les données sont réinitialisées quotidiennement • <?= Html::a('Retour', Url::env('prod', 'frontend')) ?>
- </div>
- </div>
- <?php endif; ?>
- <header id="header">
- <div class="container">
- <?php if(YII_ENV == 'dev' || YII_ENV == 'demo'): ?>
- <div id="env-dev"><?php if(YII_ENV == 'dev'): ?>Dév.<?php elseif(YII_ENV == 'demo'): ?>Démo<?php endif; ?></div>
- <?php endif; ?>
- <a id="link-home" href="<?php if(Yii::$app->user->isGuest): echo Yii::$app->urlManager->createUrl('site/index') ; else: echo Yii::$app->urlManager->createUrl('commande/index') ; endif; ?>">
- <img class="icon" src="<?php echo Yii::$app->urlManager->getBaseUrl(); ?>/img/laboulange3.png" alt="" />
- </a>
- <nav class="">
- <ul class="nav nav-pills">
- <?php if(!Yii::$app->user->isGuest):?>
- <li><a <?php if(Yii::$app->controller->id == 'commande' && Yii::$app->controller->action->id == 'index'): ?>class="active" <?php endif; ?>href="<?php echo Yii::$app->urlManager->createUrl('commande/index') ; ?>"><span class="glyphicon glyphicon-th-list"></span> Tableau de bord</a></li>
- <li><a <?php if(Yii::$app->controller->id == 'commande' && Yii::$app->controller->action->id == 'create'): ?>class="active" <?php endif; ?>href="<?php echo Yii::$app->urlManager->createUrl('commande/create') ; ?>"><span class="glyphicon glyphicon-plus"></span> Commander</a></li>
- <li><a <?php if(Yii::$app->controller->id == 'user' && Yii::$app->controller->action->id == 'update'): ?>class="active" <?php endif; ?>href="<?php echo Yii::$app->urlManager->createUrl('user/update') ; ?>"><span class="glyphicon glyphicon-user"></span> Profil</a></li>
- <li><a id="link-logout" href="<?php echo Yii::$app->urlManager->createUrl('site/logout') ; ?>"><span class="glyphicon glyphicon-off"></span> Déconnexion<br /><span class="nom"><?php echo Html::encode(Yii::$app->user->identity->prenom .' '. substr(strtoupper(Yii::$app->user->identity->nom), 0, 1).'.') ; ?></span></a></li>
- <?php if(Yii::$app->user->identity->isBoulanger()): ?><li><a class="" id="link-espace-boulanger" href="<?php echo Url::backend(); ?>"><span class="glyphicon glyphicon-grain"></span> Espace boulanger</a></li><?php endif; ?>
- <?php else: ?>
- <li><a <?php if(Yii::$app->controller->id == 'site' && Yii::$app->controller->action->id == 'login'): ?>class="active" <?php endif; ?>href="<?php echo Yii::$app->urlManager->createUrl('site/login') ; ?>"><span class="glyphicon glyphicon-log-in"></span> Connexion</a></li>
- <li><a <?php if(Yii::$app->controller->id == 'site' && Yii::$app->controller->action->id == 'signup'): ?>class="active" <?php endif; ?>href="<?php echo Yii::$app->urlManager->createUrl('site/signup') ; ?>"><span class="glyphicon glyphicon-user"></span> Inscription</a></li>
- <?php endif;?>
- </ul>
- </nav>
- </div>
- </header>
- <div id="main">
- <section class="<?php if(!$is_home): ?>container<?php endif;?>" id="content">
- <?php if(Yii::$app->session->hasFlash('error')): ?>
- <div class="alert alert-danger" role="alert">
- <?= Yii::$app->session->getFlash('error') ?>
- </div>
- <?php endif; ?>
- <?php if(Yii::$app->session->hasFlash('success')): ?>
- <div class="alert alert-success" role="alert">
- <?= Yii::$app->session->getFlash('success') ?>
- </div>
- <?php endif; ?>
-
- <?= $content ?>
- </section>
- </div>
- <footer id="footer">
- <div class="container">
- <a href="<?php echo Yii::$app->urlManager->createUrl('site/contact') ; ?>">Contact</a>
- <a href="<?php echo Yii::$app->urlManager->createUrl('site/mentions') ; ?>">Mentions légales</a>
- <a href="<?php echo Yii::$app->urlManager->createUrl('site/cgv') ; ?>">CGS</a>
- </div>
- </footer>
-
- <?php $this->endBody() ?>
-
- <!-- chat -->
- <?php if(!Yii::$app->user->isGuest && Yii::$app->user->identity->isBoulanger()): ?>
- <script src="//code.tidio.co/gngxwpdobb64cpvhd8patajpurs5feom.js"></script>
- <?php endif; ?>
-
- <!-- 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() ?>
|