Commit 12d4e73c authored by Fabrice Gangler's avatar Fabrice Gangler 🎨
Browse files

FIX(ux): improve user menu

Refs: #930
parent ec7e73a8
Pipeline #10108 passed with stage
in 4 minutes and 2 seconds
......@@ -54,6 +54,10 @@ msgstr ""
msgid "Sign in"
msgstr ""
#: Template/Element/Navigation/navbarFixedTop.ctp:120
msgid "nav.profile"
msgstr ""
#: Template/Element/Navigation/navbarFixedTop.ctp:120
msgid "Profile setting"
msgstr ""
......
......@@ -54,13 +54,17 @@ msgstr ""
msgid "Sign in"
msgstr ""
#: Template/Element/Navigation/navbarFixedTop.ctp:120
msgid "nav.profile"
msgstr "Profil"
#: Template/Element/Navigation/navbarFixedTop.ctp:120
msgid "Profile setting"
msgstr ""
#: Template/Element/Navigation/navbarFixedTop.ctp:125
msgid "Logout"
msgstr ""
msgstr "Logout"
#: Template/Element/Pages/header.ctp:40
msgid "Comptoir du libre"
......
......@@ -61,12 +61,16 @@ msgid "Sign in"
msgstr "Se connecter"
#: Template/Element/Navigation/navbarFixedTop.ctp:120
msgid "Profile setting"
msgid "nav.profile"
msgstr "Profil"
#: Template/Element/Navigation/navbarFixedTop.ctp:120
msgid "Profile setting"
msgstr "Paramètres"
#: Template/Element/Navigation/navbarFixedTop.ctp:125
msgid "Logout"
msgstr "Deconnexion"
msgstr "Se déconnecter"
#: Template/Element/Pages/header.ctp:40
msgid "Comptoir du libre"
......
......@@ -174,20 +174,28 @@
<li class="mainSearchElement">
<?= $this->element("Pages/SearchForm") ?>
</li>
<li class="clean-nav">
<li class="clean-nav" id="userProfil-nav">
<?= $this->Html->link($this->request->session()->read('Auth.User.username').'<span class ="caret"></span>',
["prefix"=>false,'controller' => 'Users', 'action' => $this->request->session()->read('Auth.User.id')],
[
// 'class'=>"btn btn-default",
'escape' => false]) ?>
<ul class = "">
<li class = "">
<li class="">
<?= $this->Html->link(
__d("Layout","nav.profile"),
["prefix"=>false,'controller' => 'Users', 'action' => $this->request->session()->read('Auth.User.id')],
['class'=>"",'escape' => false]
);
?>
</li>
<li class="">
<?= $this->Html->link(
__d("Layout","Profile setting"),
["prefix"=>false,'controller' => 'Users', 'action' => 'edit',$this->request->session()->read('Auth.User.id')],
['class'=>"",'escape' => false]) ?>
</li>
<li class = "__item">
<li class="__item" id="nav_logout_item">
<?= $this->Html->link(__d("Layout", "Logout"),
["prefix"=>false,'controller' => 'Users', 'action' => 'logout'],
['class'=>"",'escape' => false]) ?>
......
......@@ -81,7 +81,7 @@ class AcceptanceTester extends Actor
{
$I = $this;
$I->see($userName);
$I->click('//nav/ul[2]/li[2]/ul/li[2]/a');
$I->click('//li[@id="userProfil-nav"]/ul/li[@id="nav_logout_item"]/a');
$I->canSeeInCurrentUrl('/users/login');
$I->dontSee($userName);
}
......
......@@ -983,6 +983,26 @@ form .error-message {
margin: 0 0 20px;
}
/* ---------------------------------------------------------------------------------------------------------------------
* Navbar user profil menu
*/
#userProfil-nav {
margin-left: 2em;
min-width: 9em;
}
#userProfil-nav > a {
padding-left: 0;
}
#userProfil-nav li {
background-color: #d9d9d9;
border-bottom: 1px solid silver;
}
#userProfil-nav li:first-child {
border-top: 1px solid silver;
}
/* ---------------------------------------------------------------------------------------------------------------------
* Software filters
*/
......@@ -1089,6 +1109,8 @@ img.img-placeholder {
max-height: 10em;
}
/* =====================================================================================================================
* ---------------------------------------------- MEDIA QUERIES --------------------------------------------------------
* =====================================================================================================================
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment