Replace logout link by a dropdown menu

This commit is contained in:
Frederic Guillot
2016-01-21 20:58:12 -05:00
parent f3e5fdb137
commit fcdfdeabfa
7 changed files with 32 additions and 43 deletions

View File

@@ -1,6 +1,12 @@
<header>
<nav>
<h1><?= $this->url->link('K<span>B</span>', 'app', 'index', array(), false, 'logo', t('Dashboard')).' '.$this->e($title) ?>
<h1>
<span class="logo">
<?= $this->url->link('K<span>B</span>', 'app', 'index', array(), false, '', t('Dashboard')) ?>
</span>
<span class="title">
<?= $this->e($title) ?>
</span>
<?php if (! empty($description)): ?>
<span class="tooltip" title='<?= $this->e($this->text->markdown($description)) ?>'>
<i class="fa fa-info-circle"></i>
@@ -26,11 +32,20 @@
<?php endif ?>
<li>
<?php if ($this->user->hasNotifications()): ?>
<?= $this->url->link('<i class="fa fa-bell web-notification-icon"></i>', 'app', 'notifications', array('user_id' => $this->user->getId()), false, '', t('Unread notifications')) ?>
<span class="notification">
<?= $this->url->link('<i class="fa fa-bell web-notification-icon"></i>', 'app', 'notifications', array('user_id' => $this->user->getId()), false, '', t('Unread notifications')) ?>
</span>
<?php endif ?>
<?= $this->url->link(t('Logout'), 'auth', 'logout') ?>
<span class="username hide-tablet">(<?= $this->user->getProfileLink() ?>)</span>
<span class="dropdown">
<a href="#" class="dropdown-menu dropdown-menu-link-icon"><i class="fa fa-user fa-fw"></i><i class="fa fa-caret-down"></i></a>
<ul>
<li class="no-hover"><strong><?= $this->e($this->user->getFullname()) ?></strong></li>
<li><?= $this->url->link(t('My dashboard'), 'app', 'index', array('user_id' => $this->user->getId())) ?></li>
<li><?= $this->url->link(t('My profile'), 'user', 'show', array('user_id' => $this->user->getId())) ?></li>
<li><?= $this->url->link(t('Logout'), 'auth', 'logout') ?></li>
</ul>
</span>
</li>
</ul>
</nav>