background-color: white ; | background-color: white ; | ||||
.producer-panel { | .producer-panel { | ||||
position: relative; | |||||
float: left; | |||||
padding: 15px; | |||||
padding-left: 50px; | |||||
margin-left: 7px; | 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 { | .sidebar-toggle { |
@media screen and (max-width: 768px) { | @media screen and (max-width: 768px) { | ||||
.main-header { | |||||
.wrapper .main-header { | |||||
.logo { | .logo { | ||||
color: #333 !important; | color: #333 !important; | ||||
border-top: solid 1px #e0e0e0; | border-top: solid 1px #e0e0e0; | ||||
border-bottom: solid 1px #e0e0e0; | border-bottom: solid 1px #e0e0e0; | ||||
.producer { | |||||
.producer-panel { | |||||
display: none; | display: none; | ||||
} | } | ||||
} | } |
@import "_fonts.scss" ; | @import "_fonts.scss" ; | ||||
$color1: #FF7F00 ; | $color1: #FF7F00 ; | ||||
//$color1: #F39C12; | |||||
$color2: white ; | $color2: white ; | ||||
.clr { | .clr { |
<?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> |
font-weight: normal; | font-weight: normal; | ||||
font-style: 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 */ | /* 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 { | .block-date { | ||||
margin: 0px auto; | margin: 0px auto; | ||||
padding-top: 0px; | padding-top: 0px; | ||||
text-align: center; | text-align: center; | ||||
} | } | ||||
/* line 48, ../sass/_common.scss */ | |||||
/* line 55, ../sass/_common.scss */ | |||||
.block-date .day { | .block-date .day { | ||||
text-transform: capitalize; | text-transform: capitalize; | ||||
line-height: 15px; | line-height: 15px; | ||||
font-size: 13px; | font-size: 13px; | ||||
text-transform: uppercase; | text-transform: uppercase; | ||||
} | } | ||||
/* line 55, ../sass/_common.scss */ | |||||
/* line 62, ../sass/_common.scss */ | |||||
.block-date .num { | .block-date .num { | ||||
font-size: 30px; | font-size: 30px; | ||||
line-height: 35px; | line-height: 35px; | ||||
font-weight: bold; | font-weight: bold; | ||||
} | } | ||||
/* line 61, ../sass/_common.scss */ | |||||
/* line 68, ../sass/_common.scss */ | |||||
.block-date .month { | .block-date .month { | ||||
text-transform: uppercase; | text-transform: uppercase; | ||||
line-height: 15px; | line-height: 15px; | ||||
font-size: 13px; | font-size: 13px; | ||||
color: #e67200; | color: #e67200; | ||||
} | } | ||||
/* line 73, ../sass/_common.scss */ | |||||
#footer #code-source img, | |||||
#footer #social-mastodon img, | |||||
#footer #social-diaspora img { | |||||
height: 20px; | |||||
} |
@import "compass"; | @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 { | .block-date { | ||||
margin: 0px auto ; | margin: 0px auto ; | ||||
padding-top: 0px ; | padding-top: 0px ; | ||||
font-size: 13px ; | font-size: 13px ; | ||||
color: darken($color1, 5) ; | color: darken($color1, 5) ; | ||||
} | } | ||||
} | |||||
#footer { | |||||
#code-source, | |||||
#social-mastodon, | |||||
#social-diaspora { | |||||
img { | |||||
height: 20px ; | |||||
} | |||||
} | |||||
} | |||||
} |
use common\logic\User\User\Wrapper\UserManager; | use common\logic\User\User\Wrapper\UserManager; | ||||
use yii\helpers\Html; | use yii\helpers\Html; | ||||
use yii\bootstrap\Nav; | use yii\bootstrap\Nav; | ||||
use common\helpers\Url; | |||||
use common\logic\Producer\Producer\Model\Producer; | 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); | \common\assets\CommonAsset::register($this); | ||||
\frontend\assets\AppAsset::register($this); | \frontend\assets\AppAsset::register($this); | ||||
$userManager = UserManager::getInstance(); | |||||
$isHome = (Yii::$app->controller->id == 'site' && \Yii::$app->controller->action->id == 'index'); | |||||
$producer = null; | $producer = null; | ||||
if ($userManager->isCurrentProducer()) { | if ($userManager->isCurrentProducer()) { | ||||
$producer = Producer::searchOne(['id' => \Yii::$app->user->identity->id_producer]); | $producer = Producer::searchOne(['id' => \Yii::$app->user->identity->id_producer]); | ||||
<?php $this->beginBody() ?> | <?php $this->beginBody() ?> | ||||
<div id="back"></div> | <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"> | <header id="header"> | ||||
<nav class="navbar navbar-default"> | <nav class="navbar navbar-default"> | ||||
<div id="the-header" class="container"> | <div id="the-header" class="container"> | ||||
<div class="navbar-header"> | <div class="navbar-header"> | ||||
<a id="link-home" href="<?= $this->getUrlManager()->createUrl('site/index'); ?>"> | <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> | </a> | ||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#w0-collapse"><span | <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#w0-collapse"><span | ||||
class="sr-only">Toggle navigation</span> | class="sr-only">Toggle navigation</span> | ||||
</nav> | </nav> | ||||
</header> | </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"> | <div id="main"> | ||||
<section class="container" id="content"> | <section class="container" id="content"> | ||||
<?php if (Yii::$app->session->hasFlash('error')): ?> | <?php if (Yii::$app->session->hasFlash('error')): ?> |
padding-top: 0px; | padding-top: 0px; | ||||
} | } | ||||
/* line 75, ../sass/_responsive.scss */ | |||||
/* line 74, ../sass/_responsive.scss */ | |||||
#main { | |||||
padding-top: 30px; | |||||
} | |||||
/* line 77, ../sass/_responsive.scss */ | |||||
#main .container { | #main .container { | ||||
padding-left: 15px; | padding-left: 15px; | ||||
padding-right: 15px; | padding-right: 15px; | ||||
} | } | ||||
/* line 82, ../sass/_responsive.scss */ | |||||
/* line 84, ../sass/_responsive.scss */ | |||||
#header { | #header { | ||||
position: relative; | position: relative; | ||||
} | } | ||||
/* line 85, ../sass/_responsive.scss */ | |||||
/* line 87, ../sass/_responsive.scss */ | |||||
#header #link-home { | #header #link-home { | ||||
padding-left: 15px; | padding-left: 15px; | ||||
} | } | ||||
/* line 89, ../sass/_responsive.scss */ | |||||
/* line 91, ../sass/_responsive.scss */ | |||||
#header .navbar-collapse { | #header .navbar-collapse { | ||||
border: 0px none; | border: 0px none; | ||||
} | } | ||||
/* line 93, ../sass/_responsive.scss */ | |||||
/* line 95, ../sass/_responsive.scss */ | |||||
#header nav { | #header nav { | ||||
width: 100%; | width: 100%; | ||||
} | } | ||||
/* line 95, ../sass/_responsive.scss */ | |||||
/* line 97, ../sass/_responsive.scss */ | |||||
#header nav ul { | #header nav ul { | ||||
position: relative; | position: relative; | ||||
display: block; | display: block; | ||||
float: none; | float: none; | ||||
margin: 0px none; | |||||
margin-top: 0px; | |||||
border: 0px none; | border: 0px none; | ||||
} | } | ||||
/* line 102, ../sass/_responsive.scss */ | |||||
/* line 104, ../sass/_responsive.scss */ | |||||
#header nav ul li { | #header nav ul li { | ||||
display: block; | display: block; | ||||
float: none; | float: none; | ||||
} | } | ||||
/* line 105, ../sass/_responsive.scss */ | |||||
/* line 107, ../sass/_responsive.scss */ | |||||
#header nav ul li a { | #header nav ul li a { | ||||
display: block; | display: block; | ||||
padding: 10px; | padding: 10px; | ||||
} | } | ||||
/* line 113, ../sass/_responsive.scss */ | |||||
/* line 115, ../sass/_responsive.scss */ | |||||
#header nav ul li#logo { | #header nav ul li#logo { | ||||
display: block; | display: block; | ||||
} | } | ||||
/* line 120, ../sass/_responsive.scss */ | |||||
/* line 122, ../sass/_responsive.scss */ | |||||
#header a#link-commander { | #header a#link-commander { | ||||
display: none; | display: none; | ||||
} | } | ||||
/* line 125, ../sass/_responsive.scss */ | |||||
/* line 127, ../sass/_responsive.scss */ | |||||
#content #points-sale .content { | #content #points-sale .content { | ||||
padding-left: 10px; | padding-left: 10px; | ||||
margin-top: 30px; | margin-top: 30px; | ||||
} | } | ||||
/* line 130, ../sass/_responsive.scss */ | |||||
/* line 132, ../sass/_responsive.scss */ | |||||
#menu-user { | #menu-user { | ||||
position: relative; | position: relative; | ||||
top: 0px; | top: 0px; | ||||
} | } | ||||
/* line 135, ../sass/_responsive.scss */ | |||||
/* line 137, ../sass/_responsive.scss */ | |||||
.connected #content { | .connected #content { | ||||
padding-top: 0px; | padding-top: 0px; | ||||
} | } | ||||
/* line 142, ../sass/_responsive.scss */ | |||||
/* line 144, ../sass/_responsive.scss */ | |||||
.home #content #presentation-distrib h3 { | .home #content #presentation-distrib h3 { | ||||
color: #323232; | color: #323232; | ||||
} | } | ||||
/* line 146, ../sass/_responsive.scss */ | |||||
/* line 148, ../sass/_responsive.scss */ | |||||
.home #main { | .home #main { | ||||
background-image: none; | background-image: none; | ||||
background-color: #FFF8DC; | background-color: #FFF8DC; | ||||
} | } | ||||
/* line 150, ../sass/_responsive.scss */ | |||||
/* line 152, ../sass/_responsive.scss */ | |||||
.home #main #row-users-producers { | .home #main #row-users-producers { | ||||
display: block; | display: block; | ||||
margin-bottom: 20px; | margin-bottom: 20px; | ||||
} | } | ||||
/* line 154, ../sass/_responsive.scss */ | |||||
/* line 156, ../sass/_responsive.scss */ | |||||
.home #main #row-users-producers .col-md-6 { | .home #main #row-users-producers .col-md-6 { | ||||
float: left; | float: left; | ||||
display: block; | display: block; |
} | } | ||||
#main { | #main { | ||||
padding-top: 30px; | |||||
.container { | .container { | ||||
padding-left: 15px ; | padding-left: 15px ; | ||||
padding-right: 15px ; | padding-right: 15px ; | ||||
position: relative ; | position: relative ; | ||||
display: block ; | display: block ; | ||||
float: none ; | float: none ; | ||||
margin: 0px none ; | |||||
margin-top: 0px; | |||||
border: 0px none ; | border: 0px none ; | ||||
li { | li { |
*/ | */ | ||||
use common\logic\Order\Order\Model\Order; | use common\logic\Order\Order\Model\Order; | ||||
use common\logic\Producer\Producer\Model\Producer; | |||||
use common\logic\Producer\Producer\Wrapper\ProducerManager; | use common\logic\Producer\Producer\Wrapper\ProducerManager; | ||||
use common\logic\User\User\Wrapper\UserManager; | use common\logic\User\User\Wrapper\UserManager; | ||||
use common\logic\User\UserProducer\Model\UserProducer; | use common\logic\User\UserProducer\Model\UserProducer; | ||||
<body class="<?= \Yii::$app->controller->id . '-' . \Yii::$app->controller->action->id ?>"> | <body class="<?= \Yii::$app->controller->id . '-' . \Yii::$app->controller->action->id ?>"> | ||||
<?php $this->beginBody() ?> | <?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 class="container"> | ||||
<div id="left" class="col-md-3"> | <div id="left" class="col-md-3"> | ||||
<footer id="footer" class="container"> | <footer id="footer" class="container"> | ||||
<div class="content"> | <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 | <a href="<?php echo \Yii::$app->urlManagerFrontend->createAbsoluteUrl(['site/mentions']); ?>">Mentions | ||||
légales</a> • | légales</a> • | ||||
<a href="<?php echo \Yii::$app->urlManagerFrontend->createAbsoluteUrl(['site/cgv']); ?>">CGS</a> • | <a href="<?php echo \Yii::$app->urlManagerFrontend->createAbsoluteUrl(['site/cgv']); ?>">CGS</a> • |
} | } | ||||
#order-date-color { | #order-date-color { | ||||
background-color: #FF7F00 ; | |||||
background-color: $color1 ; | |||||
} | } | ||||
#distribution-date-color { | #distribution-date-color { | ||||
background-color: #5cb85c ; | background-color: #5cb85c ; | ||||
.c-day:hover { | .c-day:hover { | ||||
.c-day-background { | .c-day-background { | ||||
background-color: #FF7F00 !important ; | |||||
background-color: $color1 !important ; | |||||
color: white !important ; | color: white !important ; | ||||
} | } | ||||
} | } |