소스 검색

Si producteur : lien vers son espace et l'administration

refactoring
부모
커밋
ba61d366ba
2개의 변경된 파일22개의 추가작업 그리고 2개의 파일을 삭제
  1. +21
    -1
      frontend/views/layouts/main.php
  2. +1
    -1
      frontend/views/site/producers.php

+ 21
- 1
frontend/views/layouts/main.php 파일 보기

@@ -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 파일 보기

@@ -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…
취소
저장