Files
eminuxCRM/app/views/mail_templates/index.html.erb
T
eminuxandCursor 98dcdbbf82
CI / lint (push) Failing after 16m2s
CI / scan_ruby (push) Has been cancelled
CI / scan_js (push) Has been cancelled
Aggiunge fascia oraria, prova manuale obbligatoria e cruscotto invii email.
Le campagne rispettano orario e giorni lavorativi, richiedono una mail di test con dati inseriti a mano prima dell'invio massivo e offrono una dashboard per monitorare l'avanzamento.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-18 00:04:33 +02:00

42 lines
1.8 KiB
ERB

<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">Template email</h1>
<p class="mt-1 text-sm text-zinc-500">
<%= link_to "Invii", dashboard_mailings_path, class: "hover:underline" %>
· HTML riutilizzabile con variabili della scheda cliente.
</p>
</div>
<%= link_to "Nuovo template", new_mail_template_path, class: btn_primary %>
</div>
<div class="overflow-hidden <%= card_class %>">
<% if @mail_templates.empty? %>
<p class="p-6 text-sm text-zinc-500">Nessun template. Creane uno e usalo come base per gli invii.</p>
<% else %>
<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">Oggetto</th>
<th class="px-4 py-3">Ambito</th>
<th class="px-4 py-3"></th>
</tr>
</thead>
<tbody class="divide-y divide-zinc-100 dark:divide-zinc-800">
<% @mail_templates.each do |template| %>
<tr>
<td class="px-4 py-3 font-medium"><%= template.name %></td>
<td class="px-4 py-3 text-zinc-600 dark:text-zinc-300"><%= template.subject %></td>
<td class="px-4 py-3 text-zinc-500"><%= template.project_id? ? current_project.name : "Tutti i progetti" %></td>
<td class="px-4 py-3 text-right">
<%= link_to "Modifica", edit_mail_template_path(template), class: "text-zinc-700 hover:underline dark:text-zinc-300" %>
</td>
</tr>
<% end %>
</tbody>
</table>
<% end %>
</div>
</div>