|
- <?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->getPageTitle()) ?> <?php else: ?><?= Html::encode($this->getPageTitle()) ?> • 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() ?>
-
- <?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; ?>
-
- <div id="main">
- <div class="col-md-3" id="col-left">
- <div class="affix">
- <section id="logo">
- <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="" />
- <div class="text">
- <div class="bap">La boîte à pain</div>
- <div class="plateforme">Plateforme de réservation
- <?php if(YII_ENV == 'dev' || YII_ENV == 'demo'): ?><?php if(YII_ENV == 'dev'): ?><?php elseif(YII_ENV == 'demo'): ?><?php endif; ?></div><?php endif; ?>
- </div>
- <div class="clr"></div>
- </a>
- </section>
-
- <section id="links">
- <nav>
- <ul class="">
- <?php if(!Yii::$app->user->isGuest):?>
- <li class="col-md-3"><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><span class="libelle">Tableau de bord</span></a></li>
- <li class="col-md-3"><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><span class="libelle">Profil</span></a></li>
- <?php if(Yii::$app->user->identity->isBoulanger()): ?><li class="col-md-3"><a class="" id="link-espace-boulanger" href="<?php echo Url::backend(); ?>"><span class="glyphicon glyphicon-grain"></span> <span class="libelle">Espace boulanger</span></a></li><?php endif; ?>
- <li class="col-md-3"><a id="link-logout" href="<?php echo Yii::$app->urlManager->createUrl('site/logout') ; ?>"><span class="glyphicon glyphicon-off"></span> <span class="libelle">Déconnexion</span><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 else: ?>
- <li class="col-md-6"><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 class="col-md-6"><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 class="clr"></div>
- </section>
-
- <?php if(Yii::$app->user->isGuest):?>
- <p>➥ Connectez-vous ou créez un compte pour passer commande chez votre producteur.</p>
-
- <p>➥ Producteurs, vous pouvez tester l'outil avant de créer votre compte : <a class="btn btn-default btn-xs" id="btn-demo" href="http://demo.laboiteapain.net/"><span class="glyphicon glyphicon-eye-open"></span> Espace de démo</a>
- </p>
- <?php else: ?>
- <section id="producteurs">
- <h2>Producteurs</h2>
- <nav class="nav-producteurs">
- <ul>
- <li>
- <a href="<?= Yii::$app->urlManager->createUrl(['etablissement/index']) ; ?>">
- <span class="name">Le Chat des Noisettes</span>
- </a>
- </li>
- <li><a href="<?= Yii::$app->urlManager->createUrl(['etablissement/index']) ; ?>">Ferme de Coucourdon</a></li>
- <li><a href="<?= Yii::$app->urlManager->createUrl(['etablissement/index']) ; ?>">Terre de Pains</a></li>
- <li><a href="#"><span class="glyphicon glyphicon-plus"></span> Ajouter un producteur</a></li>
- </ul>
- </nav>
- </section>
- <?php endif; ?>
-
- <footer id="footer">
- <div class="">
- <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>
- </div>
- </div>
- <section class="col-md-9 col-lg-offset-3" id="content">
- <?php if(strlen($this->getTitle())): ?>
- <div class="header-title">
- <h1><?php if(strlen($this->getTitleIcon())): ?><span class="glyphicon <?= $this->getTitleIcon(); ?>"></span><?php endif; ?> <?= $this->getTitle(); ?></h1>
- <?php if(strlen($this->getSubtitle())): ?><h2><?= $this->getSubtitle(); ?></h2><?php endif; ?>
- </div>
- <?php endif; ?>
-
- <div id="the-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 ?>
- </div>
- </section>
- <div class="clr"></div>
- </div>
-
- <?php $this->endBody() ?>
-
- <!-- 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() ?>
|