|
|
@@ -51,6 +51,11 @@ $isHome = (Yii::$app->controller->id == 'site' && Yii::$app->controller->action- |
|
|
|
\common\assets\CommonAsset::register($this); |
|
|
|
\frontend\assets\AppAsset::register($this); |
|
|
|
|
|
|
|
$producer = null ; |
|
|
|
if(!Yii::$app->user->isGuest && Yii::$app->user->identity->id_producer > 0) { |
|
|
|
$producer = Producer::searchOne(['id' => Yii::$app->user->identity->id_producer]) ; |
|
|
|
} |
|
|
|
|
|
|
|
?> |
|
|
|
<?php $this->beginPage() ?> |
|
|
|
<!DOCTYPE html> |
|
|
@@ -112,6 +117,21 @@ $isHome = (Yii::$app->controller->id == 'site' && Yii::$app->controller->action- |
|
|
|
'active' => $this->getControllerAction() == 'site/producers', |
|
|
|
'options' => ['id' => 'li-producteurs'] |
|
|
|
], |
|
|
|
[ |
|
|
|
'label' => '<span class="glyphicon glyphicon-flag"></span> Le Chat des Noisettes', |
|
|
|
'url' => '#', |
|
|
|
'items' => [ |
|
|
|
[ |
|
|
|
'label' => '<span class="glyphicon glyphicon-th-large"></span> Mon espace', |
|
|
|
'url' => Yii::$app->urlManagerProducer->createAbsoluteUrl(['site/index', 'slug_producer' => $producer ? $producer->slug : '']), |
|
|
|
], |
|
|
|
[ |
|
|
|
'label' => '<span class="glyphicon glyphicon-cog"></span> Administration', |
|
|
|
'url' => Yii::$app->urlManagerBackend->createAbsoluteUrl(['site/index']), |
|
|
|
] |
|
|
|
], |
|
|
|
'visible' => !Yii::$app->user->isGuest && $producer |
|
|
|
], |
|
|
|
[ |
|
|
|
'label' => '<span class="glyphicon glyphicon-log-in"></span> Connexion', |
|
|
|
'url' => Yii::$app->urlManager->createUrl(['site/login']), |
|
|
@@ -130,7 +150,7 @@ $isHome = (Yii::$app->controller->id == 'site' && Yii::$app->controller->action- |
|
|
|
'url' => '#', |
|
|
|
'items' => [ |
|
|
|
[ |
|
|
|
'label' => 'Profil', |
|
|
|
'label' => '<span class="glyphicon glyphicon-user"></span> Profil', |
|
|
|
'url' => Yii::$app->urlManager->createUrl(['user/update']), |
|
|
|
], |
|
|
|
[ |