@@ -27,7 +27,43 @@ body.skin-black { | |||
background-color: white ; | |||
.producer-panel { | |||
position: relative; | |||
float: left; | |||
padding: 15px; | |||
padding-left: 50px; | |||
margin-left: 7px; | |||
&.without-logo { | |||
padding-left: 10px; | |||
} | |||
.logo { | |||
position: absolute; | |||
top: 5px; | |||
left: 0px; | |||
background-color: white; | |||
width: 40px; | |||
height: 40px; | |||
@include border-radius(50px); | |||
border: solid 1px #e0e0e0; | |||
text-align: center; | |||
overflow: hidden; | |||
.img-logo { | |||
position: absolute; | |||
top: 50%; | |||
left: 50%; | |||
transform: translate(-50%, -50%); | |||
max-width: 35px; | |||
max-height: 35px; | |||
} | |||
} | |||
.title { | |||
position: relative; | |||
top: 2px; | |||
text-transform: uppercase; | |||
} | |||
} | |||
.sidebar-toggle { |
@@ -37,7 +37,7 @@ termes. | |||
@media screen and (max-width: 768px) { | |||
.main-header { | |||
.wrapper .main-header { | |||
.logo { | |||
color: #333 !important; | |||
@@ -47,7 +47,7 @@ termes. | |||
border-top: solid 1px #e0e0e0; | |||
border-bottom: solid 1px #e0e0e0; | |||
.producer { | |||
.producer-panel { | |||
display: none; | |||
} | |||
} |
@@ -40,6 +40,7 @@ $dir-fonts: '../fonts/' ; | |||
@import "_fonts.scss" ; | |||
$color1: #FF7F00 ; | |||
//$color1: #F39C12; | |||
$color2: white ; | |||
.clr { |
@@ -0,0 +1,101 @@ | |||
<?php | |||
use common\helpers\GlobalParam; | |||
use common\logic\Producer\Producer\Model\Producer; | |||
use common\logic\User\User\Wrapper\UserManager; | |||
use yii\bootstrap\Nav; | |||
use yii\helpers\Html; | |||
$userManager = UserManager::getInstance(); | |||
?> | |||
<section class="nav-user-top"> | |||
<nav class="navbar navbar-default"> | |||
<div class="container"> | |||
<?php | |||
$producersArray = Producer::find() | |||
->joinWith(['userProducer user_producer']) | |||
->where([ | |||
'user_producer.id_user' => GlobalParam::getCurrentUserId(), | |||
'user_producer.bookmark' => 1, | |||
]) | |||
->all(); | |||
$itemsProducersArray = []; | |||
if (count($producersArray)) { | |||
$itemsProducersArray[] = [ | |||
'options' => ['class' => 'dropdown-header'], | |||
'label' => 'Mes favoris', | |||
]; | |||
foreach($producersArray as $producerItem) { | |||
$itemsProducersArray[] = [ | |||
'label' => Html::encode($producerItem->name), | |||
'url' => $this->getUrlManagerProducer()->createAbsoluteUrl(['site/index', 'slug_producer' => $producerItem->slug]), | |||
]; | |||
} | |||
} | |||
$itemsProducersArray[] = [ | |||
'options' => ['class' => 'divider'], | |||
'label' => '' | |||
]; | |||
$itemsProducersArray[] = [ | |||
'label' => '<span class="glyphicon glyphicon-search"></span> Rechercher un producteur', | |||
'url' => $this->getUrlManagerFrontend()->createAbsoluteUrl(['site/producers']) | |||
]; | |||
echo Nav::widget([ | |||
'encodeLabels' => false, | |||
'options' => ['class' => 'nav nav-pills navbar-nav navbar-right'], | |||
'items' => [ | |||
[ | |||
'label' => '<span class="glyphicon glyphicon-cog"></span> <span class="link-text">Administration</span>', | |||
'url' => $this->getUrlManagerBackend()->createAbsoluteUrl(['site/index']), | |||
'visible' => $userManager->isCurrentProducer() | |||
], | |||
[ | |||
'label' => '<span class="glyphicon glyphicon-star"></span> <span class="link-text">Producteurs</span>', | |||
'url' => '#', | |||
'items' => $itemsProducersArray, | |||
'visible' => !Yii::$app->user->isGuest | |||
], | |||
[ | |||
'label' => '<span class="glyphicon glyphicon-user"></span> <span class="link-text">' . ((!Yii::$app->user->isGuest) ? Html::encode(Yii::$app->user->identity->name . ' ' . strtoupper(substr(Yii::$app->user->identity->lastname, 0, 1))) : '') . '. </span>', | |||
'options' => ['id' => 'label1'], | |||
'url' => '#', | |||
'items' => [ | |||
[ | |||
'label' => '<span class="glyphicon glyphicon-chevron-left"></span> Retour à l\'accueil', | |||
'url' => $this->getUrlManagerFrontend()->createUrl(['site/index']), | |||
], | |||
[ | |||
'label' => '<span class="glyphicon glyphicon-user"></span> Mon profil', | |||
'url' => $this->getUrlManagerFrontend()->createUrl(['user/update']), | |||
], | |||
[ | |||
'label' => '<span class="glyphicon glyphicon-off"></span> Déconnexion', | |||
'url' => $this->getUrlManagerFrontend()->createUrl(['site/logout']), | |||
] | |||
], | |||
'visible' => !Yii::$app->user->isGuest | |||
], | |||
[ | |||
'label' => '<span class="glyphicon glyphicon-log-in"></span> Connexion', | |||
'url' => $this->getUrlManagerFrontend()->createUrl(['site/login']), | |||
'visible' => \Yii::$app->user->isGuest, | |||
'active' => $this->getControllerAction() == 'site/login' | |||
], | |||
[ | |||
'label' => '<span class="glyphicon glyphicon-user"></span> Inscription', | |||
'url' => $this->getUrlManagerFrontend()->createUrl(['site/signup']), | |||
'visible' => \Yii::$app->user->isGuest, | |||
'active' => $this->getControllerAction() == 'site/signup' | |||
], | |||
]]); | |||
?> | |||
</div> | |||
</nav> | |||
</section> |
@@ -83,78 +83,72 @@ termes. | |||
font-weight: normal; | |||
font-style: normal; | |||
} | |||
/* line 4, ../sass/_common.scss */ | |||
.producer-panel { | |||
position: relative; | |||
float: left; | |||
padding: 15px; | |||
padding-left: 50px; | |||
/* Navigation utilisateur en haut du site */ | |||
/* line 6, ../sass/_common.scss */ | |||
.nav-user-top .navbar { | |||
-moz-border-radius: 0px; | |||
-webkit-border-radius: 0px; | |||
border-radius: 0px; | |||
margin-bottom: 0px; | |||
} | |||
/* line 10, ../sass/_common.scss */ | |||
.producer-panel.without-logo { | |||
padding-left: 10px; | |||
.nav-user-top .navbar .border-left { | |||
border-left: solid 1px #e0e0e0; | |||
} | |||
/* line 14, ../sass/_common.scss */ | |||
.producer-panel .logo { | |||
position: absolute; | |||
top: 5px; | |||
left: 0px; | |||
background-color: white; | |||
width: 40px; | |||
height: 40px; | |||
-moz-border-radius: 50px; | |||
-webkit-border-radius: 50px; | |||
border-radius: 50px; | |||
border: solid 1px #e0e0e0; | |||
text-align: center; | |||
overflow: hidden; | |||
} | |||
/* line 26, ../sass/_common.scss */ | |||
.producer-panel .logo .img-logo { | |||
position: absolute; | |||
top: 50%; | |||
left: 50%; | |||
transform: translate(-50%, -50%); | |||
max-width: 35px; | |||
max-height: 35px; | |||
} | |||
/* line 36, ../sass/_common.scss */ | |||
.producer-panel .title { | |||
position: relative; | |||
top: 2px; | |||
text-transform: uppercase; | |||
/* line 16, ../sass/_common.scss */ | |||
.nav-user-top .dropdown-menu .divider.dropdown-header { | |||
padding: 0px; | |||
} | |||
/* line 43, ../sass/_common.scss */ | |||
@media screen and (max-width: 768px) { | |||
/* line 25, ../sass/_common.scss */ | |||
.nav-user-top .navbar ul { | |||
float: right; | |||
} | |||
/* line 28, ../sass/_common.scss */ | |||
.nav-user-top .navbar .link-text { | |||
display: none; | |||
} | |||
/* line 31, ../sass/_common.scss */ | |||
.nav-user-top .navbar .dropdown-menu { | |||
position: absolute; | |||
right: 5%; | |||
left: auto; | |||
border: 1px solid #ddd; | |||
background: #fff; | |||
-moz-box-shadow: 0px 0px 4px gray; | |||
-webkit-box-shadow: 0px 0px 4px gray; | |||
box-shadow: 0px 0px 4px gray; | |||
} | |||
/* line 40, ../sass/_common.scss */ | |||
.nav-user-top .navbar .dropdown-menu li a { | |||
padding-left: 15px; | |||
} | |||
} | |||
/* Block de date */ | |||
/* line 50, ../sass/_common.scss */ | |||
.block-date { | |||
margin: 0px auto; | |||
padding-top: 0px; | |||
text-align: center; | |||
} | |||
/* line 48, ../sass/_common.scss */ | |||
/* line 55, ../sass/_common.scss */ | |||
.block-date .day { | |||
text-transform: capitalize; | |||
line-height: 15px; | |||
font-size: 13px; | |||
text-transform: uppercase; | |||
} | |||
/* line 55, ../sass/_common.scss */ | |||
/* line 62, ../sass/_common.scss */ | |||
.block-date .num { | |||
font-size: 30px; | |||
line-height: 35px; | |||
font-weight: bold; | |||
} | |||
/* line 61, ../sass/_common.scss */ | |||
/* line 68, ../sass/_common.scss */ | |||
.block-date .month { | |||
text-transform: uppercase; | |||
line-height: 15px; | |||
font-size: 13px; | |||
color: #e67200; | |||
} | |||
/* line 73, ../sass/_common.scss */ | |||
#footer #code-source img, | |||
#footer #social-mastodon img, | |||
#footer #social-diaspora img { | |||
height: 20px; | |||
} |
@@ -1,45 +1,52 @@ | |||
@import "compass"; | |||
.producer-panel { | |||
position: relative; | |||
float: left; | |||
padding: 15px; | |||
padding-left: 50px; | |||
/* Navigation utilisateur en haut du site */ | |||
.nav-user-top { | |||
.navbar { | |||
@include border-radius(0px); | |||
margin-bottom: 0px; | |||
&.without-logo { | |||
padding-left: 10px; | |||
.border-left { | |||
border-left: solid 1px #e0e0e0; | |||
} | |||
} | |||
.logo { | |||
position: absolute; | |||
top: 5px; | |||
left: 0px; | |||
background-color: white; | |||
width: 40px; | |||
height: 40px; | |||
@include border-radius(50px); | |||
border: solid 1px #e0e0e0; | |||
text-align: center; | |||
overflow: hidden; | |||
.img-logo { | |||
position: absolute; | |||
top: 50%; | |||
left: 50%; | |||
transform: translate(-50%, -50%); | |||
max-width: 35px; | |||
max-height: 35px; | |||
.dropdown-menu { | |||
.divider.dropdown-header { | |||
padding: 0px; | |||
} | |||
} | |||
} | |||
.title { | |||
position: relative; | |||
top: 2px; | |||
text-transform: uppercase; | |||
@media screen and (max-width: 768px) { | |||
.nav-user-top { | |||
.navbar { | |||
ul { | |||
float: right; | |||
} | |||
.link-text { | |||
display: none; | |||
} | |||
.dropdown-menu { | |||
position: absolute; | |||
right: 5%; | |||
left: auto; | |||
border: 1px solid #ddd; | |||
background: #fff; | |||
@include box-shadow(0px 0px 4px gray); | |||
li { | |||
a { | |||
padding-left: 15px; | |||
} | |||
} | |||
} | |||
} | |||
} | |||
} | |||
/* Block de date */ | |||
.block-date { | |||
margin: 0px auto ; | |||
padding-top: 0px ; | |||
@@ -64,14 +71,4 @@ | |||
font-size: 13px ; | |||
color: darken($color1, 5) ; | |||
} | |||
} | |||
#footer { | |||
#code-source, | |||
#social-mastodon, | |||
#social-diaspora { | |||
img { | |||
height: 20px ; | |||
} | |||
} | |||
} | |||
} |
@@ -40,18 +40,13 @@ use common\helpers\GlobalParam; | |||
use common\logic\User\User\Wrapper\UserManager; | |||
use yii\helpers\Html; | |||
use yii\bootstrap\Nav; | |||
use common\helpers\Url; | |||
use common\logic\Producer\Producer\Model\Producer; | |||
/* @var $this \yii\web\View */ | |||
/* @var $content string */ | |||
$userManager = UserManager::getInstance(); | |||
$isHome = (Yii::$app->controller->id == 'site' && \Yii::$app->controller->action->id == 'index'); | |||
\common\assets\CommonAsset::register($this); | |||
\frontend\assets\AppAsset::register($this); | |||
$userManager = UserManager::getInstance(); | |||
$isHome = (Yii::$app->controller->id == 'site' && \Yii::$app->controller->action->id == 'index'); | |||
$producer = null; | |||
if ($userManager->isCurrentProducer()) { | |||
$producer = Producer::searchOne(['id' => \Yii::$app->user->identity->id_producer]); | |||
@@ -81,80 +76,14 @@ if ($userManager->isCurrentProducer()) { | |||
<?php $this->beginBody() ?> | |||
<div id="back"></div> | |||
<section id="section-user-top"> | |||
<nav class="navbar navbar-default"> | |||
<div class="container"> | |||
<?php if ($userManager->isCurrentProducer() && false): ?> | |||
<div class="navbar-header"> | |||
<span class="producer-panel<?php if (!$producer->logo): ?> without-logo<?php endif; ?>"> | |||
<?php if ($producer->logo): ?> | |||
<span class="logo"> | |||
<img class="img-logo" | |||
src="<?= \Yii::$app->urlManagerProducer->baseUrl; ?>/uploads/<?= $producer->logo; ?>" | |||
alt="Logo <?= Html::encode($producer->name) ?>"/> | |||
</span> | |||
<?php endif; ?> | |||
<span class="title"><?= Html::encode($producer->name); ?></span> | |||
</span> | |||
</div> | |||
<?php endif; ?> | |||
<?php | |||
echo Nav::widget([ | |||
'encodeLabels' => false, | |||
'options' => ['class' => 'nav nav-pills navbar-nav navbar-right'], | |||
'items' => [ | |||
[ | |||
'label' => '<span class="glyphicon glyphicon-cog"></span> Administration', | |||
'url' => $this->getUrlManagerBackend()->createAbsoluteUrl(['site/index']), | |||
'visible' => $userManager->isCurrentProducer() | |||
], | |||
[ | |||
'label' => '<span class="glyphicon glyphicon-grain"></span> Espace producteur', | |||
'url' => $this->getUrlManagerProducer()->createAbsoluteUrl(['site/index', 'slug_producer' => $producer ? $producer->slug : '']), | |||
'visible' => $userManager->isCurrentProducer() | |||
], | |||
[ | |||
'label' => '<span class="glyphicon glyphicon-user"></span> ' . ((!Yii::$app->user->isGuest) ? Html::encode(Yii::$app->user->identity->name . ' ' . strtoupper(substr(Yii::$app->user->identity->lastname, 0, 1))) : '') . '. ', | |||
'options' => ['id' => 'label1'], | |||
'url' => '#', | |||
'items' => [ | |||
[ | |||
'label' => '<span class="glyphicon glyphicon-user"></span> Profil', | |||
'url' => $this->getUrlManager()->createUrl(['user/update']), | |||
], | |||
[ | |||
'label' => '<span class="glyphicon glyphicon-off"></span> Déconnexion', | |||
'url' => $this->getUrlManager()->createUrl(['site/logout']), | |||
] | |||
], | |||
'visible' => !Yii::$app->user->isGuest | |||
], | |||
[ | |||
'label' => '<span class="glyphicon glyphicon-log-in"></span> Connexion', | |||
'url' => $this->getUrlManager()->createUrl(['site/login']), | |||
'visible' => \Yii::$app->user->isGuest, | |||
'active' => $this->getControllerAction() == 'site/login' | |||
], | |||
[ | |||
'label' => '<span class="glyphicon glyphicon-user"></span> Inscription', | |||
'url' => $this->getUrlManager()->createUrl(['site/signup']), | |||
'visible' => \Yii::$app->user->isGuest, | |||
'active' => $this->getControllerAction() == 'site/signup' | |||
], | |||
]]); | |||
?> | |||
</div> | |||
</nav> | |||
</section> | |||
<?= $this->render('@common/views/nav_user_top'); ?> | |||
<header id="header"> | |||
<nav class="navbar navbar-default"> | |||
<div id="the-header" class="container"> | |||
<div class="navbar-header"> | |||
<a id="link-home" href="<?= $this->getUrlManager()->createUrl('site/index'); ?>"> | |||
<!--<img src="<?php echo $this->getUrlManager()->getBaseUrl(); ?>/img/logo-distrib.png" alt=""/>--> | |||
Open<span>distrib</span> | |||
Opendistrib | |||
</a> | |||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#w0-collapse"><span | |||
class="sr-only">Toggle navigation</span> | |||
@@ -201,41 +130,6 @@ if ($userManager->isCurrentProducer()) { | |||
</nav> | |||
</header> | |||
<?php if (!Yii::$app->user->isGuest && false): ?> | |||
<section id="bookmarked-producers"> | |||
<div class="container"> | |||
<?php | |||
$producersArray = Producer::find() | |||
->joinWith(['userProducer user_producer']) | |||
->where([ | |||
'user_producer.id_user' => GlobalParam::getCurrentUserId(), | |||
'user_producer.bookmark' => 1, | |||
]) | |||
->all(); | |||
?> | |||
<?php if (count($producersArray)): ?> | |||
<h2>Mes producteurs ></h2> | |||
<div id="producers"> | |||
<?php foreach ($producersArray as $producer): ?> | |||
<a class="btn btn-xs btn-default" | |||
href="<?= \Yii::$app->urlManagerProducer->createAbsoluteUrl(['site/index', 'slug_producer' => $producer->slug]); ?>"><?= Html::encode($producer->name); ?></a> | |||
<?php endforeach; ?> | |||
</div> | |||
<?php else: ?> | |||
<div id="discover"> | |||
<p>Vous n'avez aucun producteur dans vos favoris : </p> | |||
<a class="btn btn-default btn-lg" | |||
href="<?= $this->getUrlManager()->createUrl(['site/producers']); ?>"><span | |||
class="glyphicon glyphicon-grain"></span> Découvrez les producteurs</a> | |||
</div> | |||
<?php endif; ?> | |||
<div class="clr"></div> | |||
</div> | |||
</section> | |||
<?php endif; ?> | |||
<div id="main"> | |||
<section class="container" id="content"> | |||
<?php if (Yii::$app->session->hasFlash('error')): ?> |
@@ -1824,87 +1824,91 @@ termes. | |||
padding-top: 0px; | |||
} | |||
/* line 75, ../sass/_responsive.scss */ | |||
/* line 74, ../sass/_responsive.scss */ | |||
#main { | |||
padding-top: 30px; | |||
} | |||
/* line 77, ../sass/_responsive.scss */ | |||
#main .container { | |||
padding-left: 15px; | |||
padding-right: 15px; | |||
} | |||
/* line 82, ../sass/_responsive.scss */ | |||
/* line 84, ../sass/_responsive.scss */ | |||
#header { | |||
position: relative; | |||
} | |||
/* line 85, ../sass/_responsive.scss */ | |||
/* line 87, ../sass/_responsive.scss */ | |||
#header #link-home { | |||
padding-left: 15px; | |||
} | |||
/* line 89, ../sass/_responsive.scss */ | |||
/* line 91, ../sass/_responsive.scss */ | |||
#header .navbar-collapse { | |||
border: 0px none; | |||
} | |||
/* line 93, ../sass/_responsive.scss */ | |||
/* line 95, ../sass/_responsive.scss */ | |||
#header nav { | |||
width: 100%; | |||
} | |||
/* line 95, ../sass/_responsive.scss */ | |||
/* line 97, ../sass/_responsive.scss */ | |||
#header nav ul { | |||
position: relative; | |||
display: block; | |||
float: none; | |||
margin: 0px none; | |||
margin-top: 0px; | |||
border: 0px none; | |||
} | |||
/* line 102, ../sass/_responsive.scss */ | |||
/* line 104, ../sass/_responsive.scss */ | |||
#header nav ul li { | |||
display: block; | |||
float: none; | |||
} | |||
/* line 105, ../sass/_responsive.scss */ | |||
/* line 107, ../sass/_responsive.scss */ | |||
#header nav ul li a { | |||
display: block; | |||
padding: 10px; | |||
} | |||
/* line 113, ../sass/_responsive.scss */ | |||
/* line 115, ../sass/_responsive.scss */ | |||
#header nav ul li#logo { | |||
display: block; | |||
} | |||
/* line 120, ../sass/_responsive.scss */ | |||
/* line 122, ../sass/_responsive.scss */ | |||
#header a#link-commander { | |||
display: none; | |||
} | |||
/* line 125, ../sass/_responsive.scss */ | |||
/* line 127, ../sass/_responsive.scss */ | |||
#content #points-sale .content { | |||
padding-left: 10px; | |||
margin-top: 30px; | |||
} | |||
/* line 130, ../sass/_responsive.scss */ | |||
/* line 132, ../sass/_responsive.scss */ | |||
#menu-user { | |||
position: relative; | |||
top: 0px; | |||
} | |||
/* line 135, ../sass/_responsive.scss */ | |||
/* line 137, ../sass/_responsive.scss */ | |||
.connected #content { | |||
padding-top: 0px; | |||
} | |||
/* line 142, ../sass/_responsive.scss */ | |||
/* line 144, ../sass/_responsive.scss */ | |||
.home #content #presentation-distrib h3 { | |||
color: #323232; | |||
} | |||
/* line 146, ../sass/_responsive.scss */ | |||
/* line 148, ../sass/_responsive.scss */ | |||
.home #main { | |||
background-image: none; | |||
background-color: #FFF8DC; | |||
} | |||
/* line 150, ../sass/_responsive.scss */ | |||
/* line 152, ../sass/_responsive.scss */ | |||
.home #main #row-users-producers { | |||
display: block; | |||
margin-bottom: 20px; | |||
} | |||
/* line 154, ../sass/_responsive.scss */ | |||
/* line 156, ../sass/_responsive.scss */ | |||
.home #main #row-users-producers .col-md-6 { | |||
float: left; | |||
display: block; |
@@ -72,6 +72,8 @@ termes. | |||
} | |||
#main { | |||
padding-top: 30px; | |||
.container { | |||
padding-left: 15px ; | |||
padding-right: 15px ; | |||
@@ -96,7 +98,7 @@ termes. | |||
position: relative ; | |||
display: block ; | |||
float: none ; | |||
margin: 0px none ; | |||
margin-top: 0px; | |||
border: 0px none ; | |||
li { |
@@ -37,6 +37,7 @@ | |||
*/ | |||
use common\logic\Order\Order\Model\Order; | |||
use common\logic\Producer\Producer\Model\Producer; | |||
use common\logic\Producer\Producer\Wrapper\ProducerManager; | |||
use common\logic\User\User\Wrapper\UserManager; | |||
use common\logic\User\UserProducer\Model\UserProducer; | |||
@@ -78,137 +79,7 @@ if (!Yii::$app->user->isGuest) { | |||
<body class="<?= \Yii::$app->controller->id . '-' . \Yii::$app->controller->action->id ?>"> | |||
<?php $this->beginBody() ?> | |||
<section id="section-user-top"> | |||
<nav class="navbar navbar-default"> | |||
<div class="container"> | |||
<?php if ($userManager->isCurrentProducer() && false): ?> | |||
<div class="navbar-header"> | |||
<span class="producer-panel<?php if (!$producerUser->logo): ?> without-logo<?php endif; ?>"> | |||
<?php if ($producerUser->logo): ?> | |||
<span class="logo"> | |||
<img class="img-logo" | |||
src="<?= \Yii::$app->urlManagerProducer->baseUrl; ?>/uploads/<?= $producerUser->logo; ?>" | |||
alt="Logo <?= Html::encode($producerUser->name) ?>"/> | |||
</span> | |||
<?php endif; ?> | |||
<span class="title"><?= Html::encode($producerUser->name); ?></span> | |||
</span> | |||
</div> | |||
<?php endif; ?> | |||
<?php | |||
echo Nav::widget([ | |||
'encodeLabels' => false, | |||
'options' => ['class' => 'nav nav-pills navbar-nav navbar-right'], | |||
'items' => [ | |||
[ | |||
//'linkOptions' => ['class' => 'btn btn-default btn-outline btn-circle'], | |||
'label' => '<span class="glyphicon glyphicon-cog"></span> Administration', | |||
'url' => $this->getUrlManagerBackend()->createAbsoluteUrl(['site/index']), | |||
'visible' => $userManager->isCurrentProducer() | |||
], | |||
[ | |||
'label' => '<span class="glyphicon glyphicon-search"></span> Producteurs', | |||
'url' => $this->getUrlManagerFrontend()->createAbsoluteUrl(['site/producers']), | |||
'visible' => !$userManager->isCurrentProducer() | |||
], | |||
[ | |||
'label' => '<span class="glyphicon glyphicon-user"></span> ' . ((!Yii::$app->user->isGuest) ? Html::encode(Yii::$app->user->identity->name . ' ' . strtoupper(substr(Yii::$app->user->identity->lastname, 0, 1))) : '') . '. ', | |||
'options' => ['id' => 'label1'], | |||
'url' => '#', | |||
'items' => [ | |||
/*[ | |||
'label' => '<span class="glyphicon glyphicon-search"></span> Producteurs', | |||
'url' => $this->getUrlManagerFrontend()->createUrl(['site/producers']), | |||
],*/ | |||
[ | |||
'label' => '<span class="glyphicon glyphicon-chevron-left"></span> Retour à l\'accueil', | |||
'url' => $this->getUrlManagerFrontend()->createUrl(['site/index']), | |||
], | |||
[ | |||
'label' => '<span class="glyphicon glyphicon-user"></span> Mon profil', | |||
'url' => $this->getUrlManagerFrontend()->createUrl(['user/update']), | |||
], | |||
[ | |||
'label' => '<span class="glyphicon glyphicon-off"></span> Déconnexion', | |||
'url' => $this->getUrlManagerFrontend()->createUrl(['site/logout']), | |||
] | |||
], | |||
'visible' => !Yii::$app->user->isGuest | |||
], | |||
[ | |||
'label' => '<span class="glyphicon glyphicon-log-in"></span> Connexion', | |||
'url' => $this->getUrlManagerFrontend()->createUrl(['site/login']), | |||
'visible' => \Yii::$app->user->isGuest, | |||
'active' => $this->getControllerAction() == 'site/login' | |||
], | |||
[ | |||
'label' => '<span class="glyphicon glyphicon-user"></span> Inscription', | |||
'url' => $this->getUrlManagerFrontend()->createUrl(['site/signup']), | |||
'visible' => \Yii::$app->user->isGuest, | |||
'active' => $this->getControllerAction() == 'site/signup' | |||
], | |||
]]); | |||
?> | |||
</div> | |||
</nav> | |||
</section> | |||
<!-- | |||
<div id="header-bap"> | |||
<?php | |||
echo Nav::widget([ | |||
'encodeLabels' => false, | |||
'items' => [ | |||
[ | |||
'label' => '<span class="glyphicon glyphicon-menu-hamburger"></span>', | |||
'options' => ['id' => 'label1'], | |||
'url' => '#', | |||
'items' => [ | |||
[ | |||
'label' => '<span class="glyphicon glyphicon-chevron-left"></span> Retour à l\'accueil', | |||
'url' => \Yii::$app->urlManagerFrontend->createAbsoluteUrl(['site/index']), | |||
'visible' => \Yii::$app->user->isGuest | |||
], | |||
[ | |||
'label' => '<span class="glyphicon glyphicon-user"></span> Inscription', | |||
'url' => \Yii::$app->urlManagerFrontend->createAbsoluteUrl(['site/signup']), | |||
'visible' => \Yii::$app->user->isGuest | |||
], | |||
[ | |||
'label' => '<span class="glyphicon glyphicon-log-in"></span> Connexion', | |||
'url' => \Yii::$app->urlManagerFrontend->createAbsoluteUrl(['site/login', 'return_url' => \Yii::$app->urlManager->createAbsoluteUrl(['site/index'])]), | |||
'visible' => \Yii::$app->user->isGuest | |||
], | |||
], | |||
'visible' => \Yii::$app->user->isGuest | |||
], | |||
[ | |||
'label' => '<span class="glyphicon glyphicon-menu-hamburger"></span>', | |||
'options' => ['id' => 'label1'], | |||
'url' => '#', | |||
'items' => [ | |||
[ | |||
'label' => '<span class="glyphicon glyphicon-chevron-left"></span> Retour à l\'accueil', | |||
'url' => \Yii::$app->urlManagerFrontend->createAbsoluteUrl(['site/index']), | |||
], | |||
[ | |||
'label' => '<span class="glyphicon glyphicon-user"></span> Profil', | |||
'url' => \Yii::$app->urlManagerFrontend->createAbsoluteUrl(['user/update']), | |||
], | |||
[ | |||
'label' => '<span class="glyphicon glyphicon-off"></span> Déconnexion<br /><small>' . (!Yii::$app->user->isGuest ? Html::encode(Yii::$app->user->identity->name . ' ' . strtoupper(substr(Yii::$app->user->identity->lastname, 0, 1))) : '') . '.</small>', | |||
'url' => \Yii::$app->urlManagerFrontend->createAbsoluteUrl(['site/logout']), | |||
] | |||
], | |||
'visible' => !Yii::$app->user->isGuest | |||
], | |||
], | |||
'options' => ['id' => 'nav-bap'], | |||
]); | |||
?> | |||
</div> | |||
--> | |||
<?= $this->render('@common/views/nav_user_top'); ?> | |||
<div class="container"> | |||
<div id="left" class="col-md-3"> | |||
@@ -402,7 +273,7 @@ echo Nav::widget([ | |||
<footer id="footer" class="container"> | |||
<div class="content"> | |||
<a href="<?php echo \Yii::$app->urlManagerFrontend->createAbsoluteUrl(['site/index']); ?>">distrib</a> • | |||
<a href="<?php echo \Yii::$app->urlManagerFrontend->createAbsoluteUrl(['site/index']); ?>">Opendistrib</a> • | |||
<a href="<?php echo \Yii::$app->urlManagerFrontend->createAbsoluteUrl(['site/mentions']); ?>">Mentions | |||
légales</a> • | |||
<a href="<?php echo \Yii::$app->urlManagerFrontend->createAbsoluteUrl(['site/cgv']); ?>">CGS</a> • |
@@ -141,7 +141,7 @@ | |||
} | |||
#order-date-color { | |||
background-color: #FF7F00 ; | |||
background-color: $color1 ; | |||
} | |||
#distribution-date-color { | |||
background-color: #5cb85c ; | |||
@@ -159,7 +159,7 @@ | |||
.c-day:hover { | |||
.c-day-background { | |||
background-color: #FF7F00 !important ; | |||
background-color: $color1 !important ; | |||
color: white !important ; | |||
} | |||
} |