Sfoglia il codice sorgente

Si producteur : lien vers son espace et l'administration

dev
parent
commit
ba61d366ba
2 ha cambiato i file con 22 aggiunte e 2 eliminazioni
  1. +21
    -1
      frontend/views/layouts/main.php
  2. +1
    -1
      frontend/views/site/producers.php

+ 21
- 1
frontend/views/layouts/main.php Vedi File

@@ -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']),
],
[

+ 1
- 1
frontend/views/site/producers.php Vedi File

@@ -40,7 +40,7 @@ $this->setTitle('Producteurs') ;

?>

<h1 class="title-system-order"><span class="glyphicon glyphicon-grain"></span>&nbsp;&nbsp;<?= Html::encode($this->title) ?></h1>
<h1 class="title-system-order"><span class="glyphicon glyphicon-search"></span>&nbsp;&nbsp;<?= Html::encode($this->title) ?></h1>

<?=


Loading…
Annulla
Salva