You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

95 line
7.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): ?>Le Chat des Noisettes &bull; <?= Html::encode($this->title) ?> <?php else: ?><?= Html::encode($this->title) ?> &bull; Le Chat des Noisettes<?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/favicon2.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. <nav class="">
  38. <ul>
  39. <? //if($is_home): ?>
  40. <li class="contact"><a href="<?php if(!$is_home): echo Yii::$app->urlManager->createUrl(['site/index']); endif; ?>#contact" data-toggle="tooltip" data-placement="bottom" title="Contact"><img class="icon" src="<?php echo Yii::$app->urlManager->getBaseUrl(); ?>/img/icon_53324.png" alt="" /><span>Contact</span></a></li>
  41. <li class="fournisseurs"><a href="<?php if(!$is_home): echo Yii::$app->urlManager->createUrl(['site/index']); endif; ?>#fournisseurs" data-toggle="tooltip" data-placement="bottom" title="Fournisseurs"><img class="icon" src="<?php echo Yii::$app->urlManager->getBaseUrl(); ?>/img/fournisseurs.png" alt="" /><span>Fournisseurs</span></a></li>
  42. <li class="methode"><a href="<?php if(!$is_home): echo Yii::$app->urlManager->createUrl(['site/index']); endif; ?>#methode" data-toggle="tooltip" data-placement="bottom" title="Méthode"><img class="icon" src="<?php echo Yii::$app->urlManager->getBaseUrl(); ?>/img/methode.png" alt="" /><span>Méthode</span></a></li>
  43. <li class="vrac"><a href="<?php if(!$is_home): echo Yii::$app->urlManager->createUrl(['site/index']); endif; ?>#vrac" data-toggle="tooltip" data-placement="bottom" title="Vrac"><img class="icon" src="<?php echo Yii::$app->urlManager->getBaseUrl(); ?>/img/vrac.png" alt="" /><span>Vrac</span></a></li>
  44. <li class="gamme"><a href="<?php if(!$is_home): echo Yii::$app->urlManager->createUrl(['site/index']); endif; ?>#gamme" data-toggle="tooltip" data-placement="bottom" title="Pains"><img class="icon" src="<?php echo Yii::$app->urlManager->getBaseUrl(); ?>/img/icon_67951.png" alt="" /><span>Gamme</span></a></li>
  45. <li class="points-vente"><a href="<?php if(!$is_home): echo Yii::$app->urlManager->createUrl(['site/index']); endif; ?>#points-vente" data-toggle="tooltip" data-placement="bottom" title="Points de vente"><img class="icon" src="<?php echo Yii::$app->urlManager->getBaseUrl(); ?>/img/icon_9667.png" alt="" /><span>Points de vente</span></a></li>
  46. <li class="first horaires"><a href="<?php if(!$is_home): echo Yii::$app->urlManager->createUrl(['site/index']); endif; ?>#horaires" data-toggle="tooltip" data-placement="bottom" title="Horaires"><img class="icon" src="<?php echo Yii::$app->urlManager->getBaseUrl(); ?>/img/icon_3020.png" alt="" /><span>Horaires</span></a></li>
  47. <? //endif; ?>
  48. <li class="presentation" id="logo"><a href="<?php if(!$is_home): echo Yii::$app->urlManager->createUrl('site/index') ; else: echo '#presentation'; endif;?>"></a></li>
  49. <!-- <li class="first"><a href="#presentation">Présentation</a></li> -->
  50. </ul>
  51. </nav>
  52. <a href="<?php echo Yii::$app->urlManager->createUrl('commande/index'); ?>" id="link-commander" data-toggle="tooltip" data-placement="bottom" title="Commander">
  53. <img class="icon" src="<?php echo Yii::$app->urlManager->getBaseUrl(); ?>/img/order.png" alt="" />
  54. <!--<span class="glyphicon glyphicon-user"></span>-->
  55. </a>
  56. </div>
  57. </header>
  58. <div id="main">
  59. <?php if(!Yii::$app->user->isGuest): ?>
  60. <div id="menu-user">
  61. <div class="container">
  62. <ul class="nav nav-pills">
  63. <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> Historique des commandes</a></li>
  64. <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> Passer une commande</a></li>
  65. <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> Modifier mon profil</a></li>
  66. <!--<li><a <?php if(Yii::$app->controller->id == 'user' && Yii::$app->controller->action->id == 'credit'): ?>class="active" <?php endif; ?>href="<?php echo Yii::$app->urlManager->createUrl('user/credit') ; ?>"><span class="glyphicon glyphicon-euro"></span> Créditer mon compte</a></li>-->
  67. <li><a href="<?php echo Yii::$app->urlManager->createUrl('site/logout') ; ?>"><span class="glyphicon glyphicon-off"></span> Déconnexion (<?php echo Html::encode(Yii::$app->user->identity->prenom .' '.Yii::$app->user->identity->nom) ; ?>)</a></li>
  68. </ul>
  69. </div>
  70. </div>
  71. <?php endif;?>
  72. <section class="<?php if(!$is_home): ?>container<?php endif;?>" id="content">
  73. <?= $content ?>
  74. </section>
  75. </div>
  76. <footer id="footer">
  77. <div class="container">
  78. <a href="<?php echo Yii::$app->urlManager->createUrl('site/mentions') ; ?>">Mentions légales</a>
  79. </div>
  80. </footer>
  81. <?php $this->endBody() ?>
  82. </body>
  83. </html>
  84. <?php $this->endPage() ?>