<%= title "Listing Contacts" %> <%= form_tag mail_manager.contacts_path(), :id => 'search_form', :method => 'get' do %> <%= text_field_tag "term","", title: "First or last name or email" , :class => "text", :style => "width: 400px;" %>
<%= select_tag "mailing_list_id", options_for_select([['','']] + @mailing_lists, params[:mailing_list_id].to_i), {onChange: "return toggleStatus()"} %>
<%= select_tag "status", options_for_select(@statuses, params[:status]) %>
<%= submit_tag "Search", :class => 'button' %> <% end %> <% content_for :head do %> <% end %>
<% if @contacts.length <= 0 %>

No contacts exist.

<% else %> <% if params[:mailing_list_id].present? %> <% end %> <% colspan = 2 colspan += 1 if use_show_for_resources? %> <% for contact in @contacts %> <% if params[:mailing_list_id].present? %> <% end %> <% if use_show_for_resources? %> <% end %> <% if (contactable = contact.contactable).present? %> <% if contactable.respond_to?(:is_deleted?) && contactable.is_deleted? %> <% else %> <% end %> <% else %> <% end %> <% end %>
First Name Last Name Email AddressStatus
<%=h contact.first_name %> <%=h contact.last_name %> <%=h contact.email_address %><%= params[:status].humanize %><%= link_to "View", contact, :class => 'button' %><%= contactable.class.name.humanize %> is Deleted<%= link_to( "Edit #{contact.contactable.class.name.humanize}", main_app.send(MailManager.edit_route_for(contactable),contactable) ) rescue "No #{contact.contactable.class.name.humanize} Actions" %> <%= link_to "Edit", mail_manager.edit_contact_path(contact), :class => 'button' %> <%= link_to "Delete", contact, :confirm => 'Are you sure?', :method => :delete, :class => 'button' %>
<% end %> <%= content_for :page_navigation do %>
<%= will_paginate @contacts %>
<%= link_to "New Contact", mail_manager.new_contact_path, :class => 'button' %>
<% end %>