|
- <?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;
-
- /* @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">
- <?php if($is_home): ?><meta name="description" content="Pains sur levain, à la farine de meule et au sel de Salins, cuits au feu de bois, à Déservillers." /><?php endif; ?>
- <?= Html::csrfMetaTags() ?>
- <link rel="icon" type="image/png" href="<?php echo Yii::$app->urlManager->getBaseUrl(); ?>/img/favicon3.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>
- <header id="header">
- <div class="container">
- <a id="link-home" href="<?= Yii::$app->urlManager->createUrl('site/index') ; ?>">
- <img class="icon" src="<?php echo Yii::$app->urlManager->getBaseUrl(); ?>/img/laboulange3.png" alt="" />
- <!--La boîte à pain-->
- </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 if(Yii::$app->getRequest()->serverName == 'localhost'): ?>../../backend/web/<?php else: ?>http://boulanger.laboiteapain.net<?php endif; ?>"><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">
- <?= $content ?>
- </section>
- </div>
- <footer id="footer">
- <div class="container">
- <a href="<?php echo Yii::$app->urlManager->createUrl('site/mentions') ; ?>">Mentions légales</a>
- <a href="<?php echo Yii::$app->urlManager->createUrl('site/contact') ; ?>">Contact</a>
- </div>
- </footer>
-
- <?php $this->endBody() ?>
-
- <!-- chat -->
- <script src="//code.tidio.co/gngxwpdobb64cpvhd8patajpurs5feom.js"></script>
- </body>
- </html>
- <?php $this->endPage() ?>
|