Skip to content

Commit

Permalink
Navbar - add avatar and logout link
Browse files Browse the repository at this point in the history
  • Loading branch information
etdsoft committed Mar 27, 2024
1 parent 7a248ea commit 316c544
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions app/views/layouts/tylium/_navbar.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,15 @@

<%= render partial: 'layouts/tylium/navbar/help' %>

<li class="nav-item">
<%= link_to main_app.logout_path, class: 'nav-link', title: 'Logout', data: { turbolinks: false } do %>
<i class="fa-solid fa-sign-out fa-lg"></i> Logout
<% end %>
<li class="nav-item dropdown user-menu ms-lg-1 ms-0">
<a href="javascript:void(0)" class="nav-link dropdown-toggle py-1 p-1 d-flex justify-content-lg-between align-items-center" data-bs-toggle="dropdown" data-behavior="close-collapse" title="User">
<%= avatar_image(current_user, size: 32) %>
<span class="user-menu-name"><%= current_user.name %></span>
</a>
<div class="dropdown-menu dropdown-menu-end">
<%= link_to 'Profile', main_app.profile_path, class:'dropdown-item', data: { turbolinks: false } if defined?(Dradis::Pro) %>
<%= link_to 'Log out', main_app.logout_path, class:'dropdown-item', data: { turbolinks: false } %>
</div>
</li>
</ul>
</div>
Expand Down

0 comments on commit 316c544

Please sign in to comment.