|
|
|
|
|
|
|
|
\common\assets\CommonAsset::register($this); |
|
|
\common\assets\CommonAsset::register($this); |
|
|
\frontend\assets\AppAsset::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() ?> |
|
|
<?php $this->beginPage() ?> |
|
|
<!DOCTYPE html> |
|
|
<!DOCTYPE html> |
|
|
|
|
|
|
|
|
'active' => $this->getControllerAction() == 'site/producers', |
|
|
'active' => $this->getControllerAction() == 'site/producers', |
|
|
'options' => ['id' => 'li-producteurs'] |
|
|
'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', |
|
|
'label' => '<span class="glyphicon glyphicon-log-in"></span> Connexion', |
|
|
'url' => Yii::$app->urlManager->createUrl(['site/login']), |
|
|
'url' => Yii::$app->urlManager->createUrl(['site/login']), |
|
|
|
|
|
|
|
|
'url' => '#', |
|
|
'url' => '#', |
|
|
'items' => [ |
|
|
'items' => [ |
|
|
[ |
|
|
[ |
|
|
'label' => 'Profil', |
|
|
|
|
|
|
|
|
'label' => '<span class="glyphicon glyphicon-user"></span> Profil', |
|
|
'url' => Yii::$app->urlManager->createUrl(['user/update']), |
|
|
'url' => Yii::$app->urlManager->createUrl(['user/update']), |
|
|
], |
|
|
], |
|
|
[ |
|
|
[ |