Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

80 rindas
5.0KB

  1. <?php
  2. use yii\helpers\Html;
  3. use yii\bootstrap\Nav;
  4. use yii\bootstrap\NavBar;
  5. use yii\widgets\Breadcrumbs;
  6. use frontend\assets\AppAsset;
  7. use frontend\widgets\Alert;
  8. /* @var $this \yii\web\View */
  9. /* @var $content string */
  10. $is_home = (Yii::$app->controller->id == 'site' && Yii::$app->controller->action->id == 'index') ;
  11. AppAsset::register($this);
  12. ?>
  13. <?php $this->beginPage() ?>
  14. <!DOCTYPE html>
  15. <head>
  16. <title><?php if($is_home): ?>La boîte à pain &bull; <?= Html::encode($this->title) ?> <?php else: ?><?= Html::encode($this->title) ?> &bull; La boîte à pain<?php endif; ?></title>
  17. <meta charset="utf-8">
  18. <meta name="viewport" content="width=device-width, initial-scale=1">
  19. <?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; ?>
  20. <?= Html::csrfMetaTags() ?>
  21. <link rel="icon" type="image/png" href="<?php echo Yii::$app->urlManager->getBaseUrl(); ?>/img/favicon3.png" />
  22. <!--[if IE]><link rel="shortcut icon" type="image/x-icon" href="./img/favicon.ico" /><![endif]-->
  23. <?php $this->head() ?>
  24. <!--[if lt IE 9]>
  25. <script src="<?php echo Yii::$app->urlManager->getBaseUrl(); ?>/js/html5shiv.min.js"></script>
  26. <link href="<?php echo Yii::$app->urlManager->getBaseUrl(); ?>/css/ie.css" rel="stylesheet">
  27. <![endif]-->
  28. <!--[if IE 7]>
  29. <link href="<?php echo Yii::$app->urlManager->getBaseUrl(); ?>/css/ie7.css" rel="stylesheet">
  30. <![endif]-->
  31. </head>
  32. <body class="<?php if($is_home): echo 'home' ; endif; ?><?php if(!Yii::$app->user->isGuest): ?> connected<?php endif; ?>">
  33. <?php $this->beginBody() ?>
  34. <div id="back"></div>
  35. <header id="header">
  36. <div class="container">
  37. <a id="link-home" href="<?= Yii::$app->urlManager->createUrl('site/index') ; ?>">
  38. <img class="icon" src="<?php echo Yii::$app->urlManager->getBaseUrl(); ?>/img/laboulange3.png" alt="" />
  39. <!--La boîte à pain-->
  40. </a>
  41. <nav class="">
  42. <ul class="nav nav-pills">
  43. <?php if(!Yii::$app->user->isGuest): ?>
  44. <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>
  45. <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>
  46. <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>
  47. <li><a id="link-logout" href="<?php echo Yii::$app->urlManager->createUrl('site/logout') ; ?>"><span class="glyphicon glyphicon-off"></span> Déconnexion<!-- <span class="nom">(<?php echo Html::encode(Yii::$app->user->identity->prenom .' '. substr(strtoupper(Yii::$app->user->identity->nom), 0, 1).'.') ; ?>)</span>--></a></li>
  48. <?php if(Yii::$app->user->identity->isBoulanger()): ?><li><a class="" id="link-espace-boulanger" href="../../backend/web/"><span class="glyphicon glyphicon-grain"></span> Espace boulanger</a></li><?php endif; ?>
  49. <?php else: ?>
  50. <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>
  51. <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>
  52. <?php endif;?>
  53. </ul>
  54. </nav>
  55. </div>
  56. </header>
  57. <div id="main">
  58. <section class="<?php if(!$is_home): ?>container<?php endif;?>" id="content">
  59. <?= $content ?>
  60. </section>
  61. </div>
  62. <footer id="footer">
  63. <div class="container">
  64. <a href="<?php echo Yii::$app->urlManager->createUrl('site/mentions') ; ?>">Mentions légales</a>
  65. <a href="<?php echo Yii::$app->urlManager->createUrl('site/contact') ; ?>">Contact</a>
  66. </div>
  67. </footer>
  68. <?php $this->endBody() ?>
  69. </body>
  70. </html>
  71. <?php $this->endPage() ?>