Files
eminuxCRM/app/views/shared/_user_menu.html.erb
T
eminuxandCursor c4e5f289cf
CI / scan_ruby (push) Failing after 11m20s
CI / scan_js (push) Successful in 10m35s
CI / lint (push) Has been cancelled
Commit iniziale di eminuxCRM: CRM Rails con pipeline, campagne email e Docker.
Include autenticazione, progetti isolati, mail marketing HTML con SMTP, test A/B e editor WYSIWYG.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-17 23:01:48 +02:00

15 lines
1.3 KiB
ERB

<div class="relative" data-controller="dropdown">
<button type="button" data-action="dropdown#toggle" class="flex items-center gap-2 rounded-lg px-2 py-1.5 text-sm text-zinc-600 hover:bg-zinc-100 dark:text-zinc-300 dark:hover:bg-zinc-800">
<span class="max-w-[12rem] truncate font-medium text-zinc-900 dark:text-zinc-100"><%= current_user.full_name %></span>
<span class="text-xs text-zinc-400"><%= current_user.admin? ? "Admin" : "Utente" %></span>
</button>
<div data-dropdown-target="menu" class="absolute right-0 z-30 mt-1 hidden w-48 rounded-lg border border-zinc-200 bg-white py-1 shadow-lg dark:border-zinc-700 dark:bg-zinc-900">
<% if current_user.admin? %>
<%= link_to "Impostazioni", admin_path, class: "block px-4 py-2 text-sm text-zinc-700 hover:bg-zinc-50 dark:text-zinc-200 dark:hover:bg-zinc-800" %>
<%= link_to "Utenti", users_path, class: "block px-4 py-2 text-sm text-zinc-700 hover:bg-zinc-50 dark:text-zinc-200 dark:hover:bg-zinc-800" %>
<% end %>
<%= link_to "Password", edit_password_path, class: "block px-4 py-2 text-sm text-zinc-700 hover:bg-zinc-50 dark:text-zinc-200 dark:hover:bg-zinc-800" %>
<%= button_to "Esci", logout_path, method: :delete, class: "block w-full px-4 py-2 text-left text-sm text-zinc-700 hover:bg-zinc-50 dark:text-zinc-200 dark:hover:bg-zinc-800" %>
</div>
</div>