Sha256: 7d5fd10ec248390a60f3b82318d59629ca18388eb0e2f0d1204fd84fa6359c2c

Contents?: true

Size: 1.09 KB

Versions: 2

Compression:

Stored size: 1.09 KB

Contents

<%#
    name: headmin/layout/sidebar/menu/account
    accepts block: yes
    parameters: none
%>

<li class="nav-item dropdown">
  <a class="nav-link dropdown-toggle d-flex align-items-center" href="#" id="dropdownSidebarMenuAccount" role="button" data-bs-toggle="dropdown" aria-expanded="false">
    <% if current_user.avatar.attached? %>
      <img src="<%= url_for(current_user.avatar.variant(resize_to_limit: [20, 20], quality: 70)) %>" height="20" width="20" class="rounded-circle border border-2 me-2">
    <% else %>
      <div class="header-account-avatar rounded-circle border border-2 me-2"></div>
    <% end %>
    <%= current_user %>
  </a>
  <ul class="dropdown-menu" aria-labelledby="dropdownSidebarMenuAccount">
    <% if block_given? && yield.present? %>
      <%= yield %>
    <% else %>
      <%= render 'headmin/layout/dropdown/item', name: t('.edit_profile'), url: edit_admin_registration_path %>
    <% end %>
    <%= render 'headmin/layout/dropdown/divider' %>
    <%= render 'headmin/layout/dropdown/item', name: t('.log_out'), url: destroy_user_session_path, method: :delete %>
  </ul>
</li>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
headmin-0.1.2 app/views/headmin/layout/sidebar/menu/_account.html.erb
headmin-0.1.1 app/views/headmin/layout/sidebar/menu/_account.html.erb