Commit e7aa8315 authored by Phil Hughes's avatar Phil Hughes

Added user avatar to header

Closes #18543
parent a9dbd394
...@@ -20,7 +20,8 @@ ...@@ -20,7 +20,8 @@
} }
.open { .open {
.dropdown-menu { .dropdown-menu,
.dropdown-menu-nav {
display: block; display: block;
} }
...@@ -66,7 +67,8 @@ ...@@ -66,7 +67,8 @@
} }
} }
.dropdown-menu { .dropdown-menu,
.dropdown-menu-nav {
display: none; display: none;
position: absolute; position: absolute;
top: 100%; top: 100%;
......
...@@ -60,7 +60,7 @@ header { ...@@ -60,7 +60,7 @@ header {
margin: ($header-height - 28) / 2 0; margin: ($header-height - 28) / 2 0;
margin-left: 10px; margin-left: 10px;
height: 28px; height: 28px;
width: 28px; min-width: 28px;
line-height: 28px; line-height: 28px;
text-align: center; text-align: center;
...@@ -241,14 +241,23 @@ header { ...@@ -241,14 +241,23 @@ header {
.navbar-collapse { .navbar-collapse {
padding-left: 5px; padding-left: 5px;
li { .nav > li {
display: table-cell; display: table-cell;
width: 1%; width: 1%;
a {
margin-left: 8px !important;
}
} }
} }
} }
} }
.header-user {
.dropdown-menu-nav {
width: 140px;
margin-top: -5px;
}
}
.header-user-avatar {
float: left;
margin-right: 5px;
border-radius: 50%;
}
...@@ -38,9 +38,17 @@ ...@@ -38,9 +38,17 @@
= link_to sherlock_transactions_path, title: 'Sherlock Transactions', = link_to sherlock_transactions_path, title: 'Sherlock Transactions',
data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do
= icon('tachometer fw') = icon('tachometer fw')
%li %li.header-user.dropdown
= link_to destroy_user_session_path, class: 'logout', method: :delete, title: 'Sign out', data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do = link_to current_user, class: "header-user-dropdown-toggle", data: { toggle: "dropdown" } do
= icon('sign-out') = image_tag avatar_icon(current_user, 26), width: 26, height: 26, class: "header-user-avatar"
%span.caret
.dropdown-menu-nav.dropdown-menu-align-right
%ul
%li
= link_to "Profile", current_user
%li.divider
%li
= link_to "Sign out", destroy_user_session_path, method: :delete, title: 'Sign out'
- else - else
%li %li
%div %div
......
Markdown is supported
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