選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

111 行
4.5KB

  1. <?php
  2. use backend\assets\AppAsset;
  3. use yii\helpers\Html;
  4. use yii\bootstrap\Nav;
  5. use yii\bootstrap\NavBar;
  6. use yii\widgets\Breadcrumbs;
  7. /* @var $this \yii\web\View */
  8. /* @var $content string */
  9. AppAsset::register($this);
  10. ?>
  11. <?php $this->beginPage() ?>
  12. <!DOCTYPE html>
  13. <html lang="<?= Yii::$app->language ?>">
  14. <head>
  15. <meta charset="<?= Yii::$app->charset ?>">
  16. <meta name="viewport" content="width=device-width, initial-scale=1">
  17. <link rel="icon" type="image/png" href="<?php echo Yii::$app->urlManager->getBaseUrl(); ?>/img/favicon3.png" />
  18. <?= Html::csrfMetaTags() ?>
  19. <title><?= Html::encode($this->title) ?> - Réservation de pain</title>
  20. <?php $this->head() ?>
  21. </head>
  22. <body>
  23. <?php $this->beginBody() ?>
  24. <div class="wrap">
  25. <?php
  26. NavBar::begin([
  27. 'brandLabel' => '<img class="logo" src="'.Yii::$app->urlManager->getBaseUrl().'/img/laboulange2.png" />',
  28. 'brandUrl' => Yii::$app->homeUrl,
  29. 'innerContainerOptions' => ['class'=>'container-fluid'],
  30. 'options' => [
  31. 'class' => 'navbar-inverse navbar-fixed-top nav-header',
  32. ],
  33. ]);
  34. $menuItems = [
  35. ['label' => '<span class="glyphicon glyphicon-calendar"></span> Production', 'url' => ['/commande/index'], 'visible'=> !Yii::$app->user->isGuest],
  36. ['label' => '<span class="glyphicon glyphicon-grain"></span> Produits', 'url' => ['/produit/index'], 'visible'=> !Yii::$app->user->isGuest],
  37. ['label' => '<span class="glyphicon glyphicon-map-marker"></span> Points de vente', 'url' => ['/point-vente/index'], 'visible'=> !Yii::$app->user->isGuest],
  38. ['label' => '<span class="glyphicon glyphicon-user"></span> Utilisateurs', 'url' => ['/user/index'], 'visible'=> !Yii::$app->user->isGuest],
  39. ['label' => '<span class="glyphicon glyphicon-cog"></span> Paramètres', 'url' => ['/etablissement/update'], 'visible'=> !Yii::$app->user->isGuest],
  40. //['label' => 'Statistiques', 'url' => ['/stats/index'], 'visible'=> !Yii::$app->user->isGuest],
  41. ];
  42. if (Yii::$app->user->isGuest) {
  43. $menuItems[] = ['label' => 'Connexion', 'url' => ['/site/login']];
  44. } else {
  45. $menuItems[] = [
  46. 'label' => '<span class="glyphicon glyphicon-off"></span> Déconnexion',
  47. 'url' => ['/site/logout'],
  48. 'linkOptions' => ['data-method' => 'post']
  49. ];
  50. if(Yii::$app->getRequest()->serverName == 'localhost')
  51. $url = '../../frontend/web/' ;
  52. else
  53. $url = 'http://www.laboiteapain.net/' ;
  54. $menuItems[] = [
  55. 'label' => '<span class="retour-site">Retour sur le site</span>',
  56. 'url' => $url,
  57. ];
  58. }
  59. echo Nav::widget([
  60. 'options' => ['class' => 'navbar-nav navbar-right'],
  61. 'items' => $menuItems,
  62. 'encodeLabels' => false
  63. ]);
  64. NavBar::end();
  65. ?>
  66. <div class="container-fluid container-body">
  67. <?php if(!Yii::$app->user->isGuest): ?>
  68. <div class="nom-boulange">
  69. <span><?= Html::encode(Yii::$app->user->identity->getNomMagasin()) ; ?></span>
  70. </div>
  71. <?php endif; ?>
  72. <?= Breadcrumbs::widget([
  73. 'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [],
  74. ]) ?>
  75. <?= $content ?>
  76. </div>
  77. </div>
  78. <footer class="footer">
  79. <div class="container">
  80. <p class="pull-left"></p>
  81. <p class="pull-right"><?= Yii::powered() ?></p>
  82. </div>
  83. </footer>
  84. <?php $this->endBody() ?>
  85. <!-- chat -->
  86. <script src="//code.tidio.co/gngxwpdobb64cpvhd8patajpurs5feom.js"></script>
  87. <!-- analytics -->
  88. <script>
  89. (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  90. (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  91. m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  92. })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
  93. ga('create', 'UA-86917043-1', 'auto');
  94. ga('send', 'pageview');
  95. </script>
  96. </body>
  97. </html>
  98. <?php $this->endPage() ?>