Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

8 anos atrás
8 anos atrás
8 anos atrás
8 anos atrás
8 anos atrás
8 anos atrás
8 anos atrás
8 anos atrás
8 anos atrás
8 anos atrás
8 anos atrás
8 anos atrás
8 anos atrás
8 anos atrás
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  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. use common\models\Etablissement ;
  8. use common\models\User ;
  9. use yii\widgets\ActiveForm;
  10. use yii\helpers\ArrayHelper ;
  11. /* @var $this \yii\web\View */
  12. /* @var $content string */
  13. AppAsset::register($this);
  14. ?>
  15. <?php $this->beginPage() ?>
  16. <!DOCTYPE html>
  17. <html lang="<?= Yii::$app->language ?>">
  18. <head>
  19. <meta charset="<?= Yii::$app->charset ?>">
  20. <meta name="viewport" content="width=device-width, initial-scale=1">
  21. <link rel="icon" type="image/png" href="<?php echo Yii::$app->urlManager->getBaseUrl(); ?>/img/favicon3.png" />
  22. <?= Html::csrfMetaTags() ?>
  23. <title><?= Html::encode($this->title) ?> - La boîte à pain</title>
  24. <?php $this->head() ?>
  25. </head>
  26. <body>
  27. <?php $this->beginBody() ?>
  28. <div class="wrap">
  29. <?php
  30. NavBar::begin([
  31. 'brandLabel' => '<img class="logo" src="'.Yii::$app->urlManager->getBaseUrl().'/img/laboulange3.png" />',
  32. 'brandUrl' => Yii::$app->homeUrl,
  33. 'innerContainerOptions' => ['class'=>'container-fluid'],
  34. 'options' => [
  35. 'class' => 'navbar-inverse navbar-fixed-top nav-header',
  36. ],
  37. ]);
  38. $menuItems = [
  39. ['label' => '<span class="glyphicon glyphicon-calendar"></span> Commandes', 'url' => ['/commande/index'], 'visible'=> !Yii::$app->user->isGuest],
  40. ['label' => '<span class="glyphicon glyphicon-grain"></span> Produits', 'url' => ['/produit/index'], 'visible'=> !Yii::$app->user->isGuest],
  41. ['label' => '<span class="glyphicon glyphicon-map-marker"></span> Points de vente', 'url' => ['/point-vente/index'], 'visible'=> !Yii::$app->user->isGuest],
  42. ['label' => '<span class="glyphicon glyphicon-user"></span> Utilisateurs', 'url' => ['/user/index'], 'visible'=> !Yii::$app->user->isGuest],
  43. ['label' => '<span class="glyphicon glyphicon-cog"></span> Paramètres', 'url' => ['/etablissement/update'], 'visible'=> !Yii::$app->user->isGuest],
  44. ['label' => '<span class="glyphicon glyphicon-bullhorn"></span> Communiquer', 'url' => ['/communiquer/index'], 'visible'=> !Yii::$app->user->isGuest],
  45. ];
  46. if (Yii::$app->user->isGuest) {
  47. $menuItems[] = ['label' => 'Connexion', 'url' => ['/site/login']];
  48. } else {
  49. $menuItems[] = [
  50. 'label' => '<span class="glyphicon glyphicon-off"></span> Déconnexion',
  51. 'url' => ['/site/logout'],
  52. 'linkOptions' => ['data-method' => 'post']
  53. ];
  54. if(Yii::$app->getRequest()->serverName == 'localhost')
  55. $url = '../../frontend/web/' ;
  56. else
  57. $url = 'http://www.laboiteapain.net/' ;
  58. $menuItems[] = [
  59. 'label' => '<span class="retour-site">Retour sur le site</span>',
  60. 'url' => $url,
  61. ];
  62. }
  63. echo Nav::widget([
  64. 'options' => ['class' => 'navbar-nav navbar-right'],
  65. 'items' => $menuItems,
  66. 'encodeLabels' => false
  67. ]);
  68. NavBar::end();
  69. ?>
  70. <div class="container-fluid container-body">
  71. <?php if(!Yii::$app->user->isGuest): ?>
  72. <div class="nom-boulange">
  73. <?php if(Yii::$app->user->identity->status == User::STATUS_BOULANGER): ?>
  74. <span><?= Html::encode(Yii::$app->user->identity->getNomMagasin()) ; ?></span>
  75. <?php elseif(Yii::$app->user->identity->status == User::STATUS_ADMIN): ?>
  76. <?php $form = ActiveForm::begin() ; ?>
  77. <?= Html::dropDownList('select_etablissement', Yii::$app->user->identity->id_etablissement, ArrayHelper::map(Etablissement::find()->orderBy('nom ASC')->all(), 'id', function($model, $defaultValue) {
  78. return Html::encode($model->nom) ;
  79. })) ; ?>
  80. <?php ActiveForm::end(); ?>
  81. <?php endif; ?>
  82. <?php $etat_paiement_etablissement = Yii::$app->user->identity->etatPaiementEtablissement(); ?>
  83. <?php if($etat_paiement_etablissement == 'essai'): ?>
  84. <span id="etat-paiement-etablissement">Période d'essai gratuite
  85. <span class="strong"><?php echo Yii::$app->user->identity->periodeEssai(); ?> jours</span> <a class="btn btn-success" href="<?php echo Yii::$app->urlManager->createUrl(['paiement/index']) ?>">S'abonner</a>
  86. </span>
  87. <?php elseif($etat_paiement_etablissement == Etablissement::PAIEMENT_ESSAI_TERMINE || $etat_paiement_etablissement == Etablissement::PAIEMENT_RETARD): ?>
  88. <span id="etat-paiement-etablissement">
  89. <span class="strong">
  90. <?php if($etat_paiement_etablissement == Etablissement::PAIEMENT_ESSAI_TERMINE): ?>Période d'essai gratuite terminée
  91. <?php elseif($etat_paiement_etablissement == Etablissement::PAIEMENT_RETARD): ?>Retard de paiement
  92. <?php endif; ?>
  93. </span>
  94. </span>
  95. <?php endif; ?>
  96. </div>
  97. <?php endif; ?>
  98. <?= Breadcrumbs::widget([
  99. 'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [],
  100. ]) ?>
  101. <?= $content ?>
  102. </div>
  103. </div>
  104. <div id="alerts-fixed"></div>
  105. <footer class="footer">
  106. <div class="container">
  107. <p class="pull-left"></p>
  108. <p class="pull-right"><?= Yii::powered() ?></p>
  109. </div>
  110. </footer>
  111. <?php $this->endBody() ?>
  112. <!-- chat -->
  113. <script src="//code.tidio.co/gngxwpdobb64cpvhd8patajpurs5feom.js"></script>
  114. <!-- analytics -->
  115. <script>
  116. (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  117. (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  118. m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  119. })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
  120. ga('create', 'UA-86917043-1', 'auto');
  121. ga('send', 'pageview');
  122. </script>
  123. </body>
  124. </html>
  125. <?php $this->endPage() ?>