Kaynağa Gözat

Header : intégration menu utilisateur

dev
Guillaume Bourgeois 6 yıl önce
ebeveyn
işleme
9b9c46e060
5 değiştirilmiş dosya ile 22 ekleme ve 53 silme
  1. +0
    -1
      backend/controllers/SiteController.php
  2. +1
    -0
      backend/views/layouts/content.php
  3. +19
    -50
      backend/views/layouts/header.php
  4. +1
    -1
      backend/web/css/screen.css
  5. +1
    -1
      backend/web/sass/_adminlte.scss

+ 0
- 1
backend/controllers/SiteController.php Dosyayı Görüntüle

@@ -90,7 +90,6 @@ class SiteController extends BackendController
'verbs' => [
'class' => VerbFilter::className(),
'actions' => [
'logout' => ['post'],
],
],
];

+ 1
- 0
backend/views/layouts/content.php Dosyayı Görüntüle

@@ -69,6 +69,7 @@ use dmstr\widgets\Alert;
<section class="content">
<?= Alert::widget() ?>
<?= $content ?>
<div class="clr"></div>
</section>
</div>


+ 19
- 50
backend/views/layouts/header.php Dosyayı Görüntüle

@@ -266,61 +266,12 @@ use yii\helpers\ArrayHelper;
</li>
</ul>
</li>
<!-- User Account: style can be found in dropdown.less -->

<li class="dropdown user user-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<img src="<?= $directoryAsset ?>/img/user2-160x160.jpg" class="user-image" alt="User Image"/>
<span class="hidden-xs">Alexander Pierce</span>
</a>
<ul class="dropdown-menu">
<!-- User image -->
<li class="user-header">
<img src="<?= $directoryAsset ?>/img/user2-160x160.jpg" class="img-circle"
alt="User Image"/>

<p>
Alexander Pierce - Web Developer
<small>Member since Nov. 2012</small>
</p>
</li>
<!-- Menu Body -->
<li class="user-body">
<div class="col-xs-4 text-center">
<a href="#">Followers</a>
</div>
<div class="col-xs-4 text-center">
<a href="#">Sales</a>
</div>
<div class="col-xs-4 text-center">
<a href="#">Friends</a>
</div>
</li>
<!-- Menu Footer-->
<li class="user-footer">
<div class="pull-left">
<a href="#" class="btn btn-default btn-flat">Profile</a>
</div>
<div class="pull-right">
<?= Html::a(
'Sign out',
['/site/logout'],
['data-method' => 'post', 'class' => 'btn btn-default btn-flat']
) ?>
</div>
</li>
</ul>
</li>

<!-- User Account: style can be found in dropdown.less -->
<li class="link-control-sidebar">
<a href="#" data-toggle="control-sidebar"><i class="fa fa-gears"></i></a>
</li>
<?php if (User::isCurrentProducer() || User::isCurrentAdmin()): ?>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-home"></i>
<span><?= Html::encode(Yii::$app->user->identity->getNameProducer()); ?></span>
</a>
<?php if(User::isCurrentAdmin()): ?>
@@ -333,6 +284,24 @@ use yii\helpers\ArrayHelper;
<?php endif; ?>
</li>
<?php endif; ?>
<!-- User Account: style can be found in dropdown.less -->
<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(User::getCurrent()->name.' '.User::getCurrent()->lastname) ; ?></span>
</a>
<ul class="dropdown-menu">
<li><a href="<?= Yii::$app->urlManagerFrontend->createAbsoluteUrl(['user/update']); ?>"><i class="fa fa-user"></i> Profil</a></li>
<li><a href="<?= Yii::$app->urlManagerBackend->createUrl(['site/logout']); ?>"><i class="fa fa-sign-out"></i> Déconnexion</a></li>
</ul>
</li>

<!-- User Account: style can be found in dropdown.less -->
<li class="link-control-sidebar">
<a href="#" data-toggle="control-sidebar"><i class="fa fa-gears"></i></a>
</li>
</ul>
</div>
</nav>

+ 1
- 1
backend/web/css/screen.css Dosyayı Görüntüle

@@ -1389,6 +1389,6 @@ a:hover, a:focus, a:active {
}

/* line 3, ../sass/_adminlte.scss */
.main-header .messages-menu, .main-header .notifications-menu, .main-header .tasks-menu, .main-header .user-menu, .main-header .link-control-sidebar {
.main-header .messages-menu, .main-header .notifications-menu, .main-header .tasks-menu, .main-header .link-control-sidebar {
display: none;
}

+ 1
- 1
backend/web/sass/_adminlte.scss Dosyayı Görüntüle

@@ -1,6 +1,6 @@

.main-header {
.messages-menu, .notifications-menu, .tasks-menu, .user-menu, .link-control-sidebar {
.messages-menu, .notifications-menu, .tasks-menu, .link-control-sidebar {
display: none ;
}
}

Yükleniyor…
İptal
Kaydet