- <% if @user && @user.id %>
- <div class='dropdown user-menu logged-in'>
- <a class='dropdown-toggle' data-toggle='dropdown' href="#">
- <%= user_thumbnail_tiny(@user, :size => 25, :width => 25, :height => 25)
- %><%= render :partial => 'layouts/inbox'
- %><span class="user-button"><span class='username'><%= @user.display_name %></span>
- <b class="caret"></b></span>
- </a>
- <ul class='dropdown-menu'>
- <li>
- <%= link_to inbox_path(:display_name => @user.display_name) do %>
- <span class='count-number'><%= number_with_delimiter(@user.new_messages.size) %></span>
- <%= t('user.view.my messages') %>
- <% end %>
- </li>
- <li>
- <%= link_to t('user.view.my profile'), user_path(:display_name => @user.display_name) %>
- </li>
- <li>
- <%= link_to t('user.view.my settings'), :controller => 'user', :action => 'account', :display_name => @user.display_name %>
- </li>
- <li class="divider"></li>
- <li>
- <%= yield :greeting %>
- </li>
- <li>
- <%= link_to t('layouts.logout'), logout_path(:session => request.session_options[:id], :referer => request.fullpath) %>
- </li>
- </ul>
+ <% if current_user && current_user.id %>
+ <div class='d-inline-flex dropdown user-menu logged-in'>
+ <button class='d-flex gap-1 align-items-center justify-content-center dropdown-toggle btn btn-outline-secondary border-secondary-subtle bg-body text-secondary px-2 py-1 flex-grow-1' type='button' data-bs-toggle='dropdown'>
+ <%= user_thumbnail_tiny(current_user, :class => "user_thumbnail_tiny rounded-1 bg-body") %>
+ <% if current_user.new_messages.size > 0 %>
+ <span class="badge count-number position-static m-1"><%= current_user.new_messages.size %></span>
+ <% end %>
+ <span class='username align-middle text-truncate'>
+ <%= current_user.display_name %>
+ </span>
+ </button>
+ <div class='dropdown-menu dropdown-menu-end'>
+ <%= link_to t("users.show.my_dashboard"), dashboard_path, :class => "dropdown-item" %>
+ <%= link_to inbox_messages_path, :class => "dropdown-item" do %>
+ <%= t("users.show.my messages") %>
+ <span class='badge count-number'><%= number_with_delimiter(current_user.new_messages.size) %></span>
+ <% end %>
+ <%= link_to t("users.show.my profile"), current_user, :class => "dropdown-item" %>
+ <%= link_to t("users.show.my settings"), edit_account_path, :class => "dropdown-item" %>
+ <%= link_to t("users.show.my_preferences"), preferences_path, :class => "dropdown-item" %>
+ <div class="dropdown-divider"></div>
+ <%= yield :greeting %>
+ <%= link_to t("layouts.logout"), logout_path(:referer => request.fullpath), :method => "post", :class => "geolink dropdown-item" %>
+ </div>