浏览代码

Amélioration navigation frontend/producer/backend

feature/souke
Guillaume Bourgeois 1年前
父节点
当前提交
b6ffd4c569
共有 3 个文件被更改,包括 20 次插入11 次删除
  1. +4
    -2
      backend/views/layouts/header.php
  2. +1
    -1
      frontend/views/layouts/main.php
  3. +15
    -8
      producer/views/layouts/main.php

+ 4
- 2
backend/views/layouts/header.php 查看文件

@@ -274,12 +274,14 @@ $producer = GlobalParam::getCurrentProducer();
<li class="dropdown user user-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-user"></i>
<span class="hidden-xs"><?= Html::encode(GlobalParam::getCurrentUser()->name . ' ' . GlobalParam::getCurrentUser()->lastname); ?></span>
<span class="hidden-xs"><?= Html::encode(GlobalParam::getCurrentUser()->name . ' ' . substr(GlobalParam::getCurrentUser()->lastname, 0, 1) .'.'); ?></span>
<i class="fa fa-caret-down"></i>
</a>
<ul class="dropdown-menu">
<li><a href="<?= Yii::$app->urlManagerFrontend->createAbsoluteUrl(['site/index']); ?>"><i
class="fa fa-chevron-left"></i> Retour à l'accueil</a></li>
<li><a href="<?= Yii::$app->urlManagerFrontend->createAbsoluteUrl(['user/update']); ?>"><i
class="fa fa-user"></i> Profil</a></li>
class="fa fa-user"></i> Mon profil</a></li>
<li><a href="<?= Yii::$app->urlManagerBackend->createUrl(['site/logout']); ?>"><i
class="fa fa-sign-out"></i> Déconnexion</a></li>
</ul>

+ 1
- 1
frontend/views/layouts/main.php 查看文件

@@ -84,7 +84,7 @@ if ($userManager->isCurrentProducer()) {
<section id="section-user-top">
<nav class="navbar navbar-default">
<div class="container">
<?php if ($userManager->isCurrentProducer()): ?>
<?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): ?>

+ 15
- 8
producer/views/layouts/main.php 查看文件

@@ -81,7 +81,7 @@ if (!Yii::$app->user->isGuest) {
<section id="section-user-top">
<nav class="navbar navbar-default">
<div class="container">
<?php if ($userManager->isCurrentProducer()): ?>
<?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): ?>
@@ -107,18 +107,26 @@ if (!Yii::$app->user->isGuest) {
'url' => $this->getUrlManagerBackend()->createAbsoluteUrl(['site/index']),
'visible' => $userManager->isCurrentProducer()
],
/*[
[
'label' => '<span class="glyphicon glyphicon-search"></span> Producteurs',
'url' => $this->getUrlManagerFrontend()->createAbsoluteUrl(['site/producers']),
'visible' => true
],*/
'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> Profil',
'label' => '<span class="glyphicon glyphicon-user"></span> Mon profil',
'url' => $this->getUrlManagerFrontend()->createUrl(['user/update']),
],
[
@@ -175,7 +183,6 @@ echo Nav::widget([
],
'visible' => \Yii::$app->user->isGuest
],

[
'label' => '<span class="glyphicon glyphicon-menu-hamburger"></span>',
'options' => ['id' => 'label1'],
@@ -293,12 +300,12 @@ echo Nav::widget([
'url' => $this->getUrlManagerProducer()->createUrl(['site/contact']),
'active' => $this->getControllerAction() == 'site/contact',
],
[
/*[
'label' => '<span class="glyphicon glyphicon-cog"></span> Administration',
'url' => $this->getUrlManagerBackend()->createAbsoluteUrl(['site/index']),
'visible' => isset(Yii::$app->user->identity) && $this->getUserManager()->isProducer(\Yii::$app->user->identity),
'options' => ['id' => 'btn-administration']
],
],*/
],
]);
?>

正在加载...
取消
保存