Contatti
<%= link_to "Export CSV", contacts_path(format: :csv), class: "#{btn_secondary} flex-1 sm:flex-none" %>
<%= link_to "Nuovo", new_contact_path, class: "#{btn_primary} flex-1 sm:flex-none" %>
<%= form_with url: contacts_path, method: :get, class: "flex flex-col gap-2 sm:flex-row" do %>
<%= text_field_tag :q, params[:q], placeholder: "Cerca…", class: input_class %>
<%= submit_tag "Cerca", class: btn_primary %>
<% end %>
<% @contacts.each do |c| %>
<%= link_to c.organization, class: "#{card_class} block p-4 active:bg-zinc-50 dark:active:bg-zinc-800" do %>
<%= c.full_name %><% if c.primary_contact? %> ★<% end %>
<%= c.organization.name %>
<%= c.email %>
<% if c.phone.present? || c.mobile.present? %>
<%= c.phone.presence || c.mobile %>
<% end %>
<% end %>
<% end %>
<% if @contacts.blank? %>
Nessun contatto.
<% end %>