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>
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
<div class="space-y-6">
|
||||
<div class="flex flex-wrap items-end justify-between gap-3">
|
||||
<div>
|
||||
<h1 class="text-2xl font-semibold tracking-tight">Utenti</h1>
|
||||
<p class="mt-1 text-sm text-zinc-500">
|
||||
<%= link_to "Impostazioni", admin_path, class: "hover:underline" %>
|
||||
· account globali. Gli admin vedono tutti i progetti; gli utenti solo quelli abilitati.
|
||||
</p>
|
||||
</div>
|
||||
<%= link_to "Nuovo utente", new_user_path, class: btn_primary %>
|
||||
</div>
|
||||
|
||||
<div class="overflow-hidden <%= card_class %>">
|
||||
<table class="<%= table_class %>">
|
||||
<thead class="border-b border-zinc-100 bg-zinc-50 text-left text-xs font-medium uppercase tracking-wide text-zinc-500 dark:border-zinc-800 dark:bg-zinc-800 dark:text-zinc-400">
|
||||
<tr>
|
||||
<th class="px-4 py-3">Nome</th>
|
||||
<th class="px-4 py-3">Email</th>
|
||||
<th class="px-4 py-3">Ruolo</th>
|
||||
<th class="px-4 py-3">Stato</th>
|
||||
<th class="px-4 py-3">Progetti</th>
|
||||
<th class="px-4 py-3"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-zinc-100 dark:divide-zinc-800">
|
||||
<% @users.each do |user| %>
|
||||
<tr class="<%= "opacity-60" unless user.active? %>">
|
||||
<td class="px-4 py-3 font-medium">
|
||||
<%= user.full_name %>
|
||||
<% if user == current_user %><span class="ml-1 text-xs font-normal text-zinc-400">(tu)</span><% end %>
|
||||
</td>
|
||||
<td class="px-4 py-3 text-zinc-600 dark:text-zinc-300"><%= user.email %></td>
|
||||
<td class="px-4 py-3"><%= user.admin? ? "Admin" : "Utente" %></td>
|
||||
<td class="px-4 py-3">
|
||||
<% if user.active? %>
|
||||
<span class="text-zinc-900 dark:text-zinc-100">Attivo</span>
|
||||
<% else %>
|
||||
<span class="text-rose-700">Disabilitato</span>
|
||||
<% end %>
|
||||
</td>
|
||||
<td class="px-4 py-3 text-zinc-600 dark:text-zinc-300">
|
||||
<% if user.admin? %>
|
||||
Tutti
|
||||
<% else %>
|
||||
<% names = user.user_projects.select(&:enabled?).filter_map { |up| up.project&.name } %>
|
||||
<%= names.any? ? names.join(", ") : "—" %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td class="px-4 py-3 text-right">
|
||||
<%= link_to "Modifica", edit_user_path(user), class: "text-zinc-700 hover:underline dark:text-zinc-300" %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user