<% title "Listing Mailings" %> <% if @mailings.length > 0 %> <% @mailings.each do |mailing| dynamic_tds_left = 5 %> <% if mailing.can_edit? dynamic_tds_left -= 1 %> <% if mailing.can_schedule? dynamic_tds_left -= 1 %> <% elsif mailing.can_cancel? dynamic_tds_left -= 1 %> <% end %> <% end %> <% if mailing.messages.length > 0 dynamic_tds_left -= 1 %> <% end %> <% if mailing.bounces.length > 0 dynamic_tds_left -= 1 %> <% end %> <% 1.upto( dynamic_tds_left ) do %> <% end %> <% end %>
Subject Scheduled At Status
<%=h mailing.subject %> <%=l mailing.scheduled_at %> <%=h mailing.status %> <%= link_to 'Send Test', mail_manager.test_mailing_path(mailing), :id => 'Send_Test', :class => 'button' %>
<%= link_to 'Edit', mail_manager.edit_mailing_path(mailing), :class => 'button' %>
<%= link_to 'Schedule', mail_manager.schedule_mailing_path(mailing), :class => 'button' %>
<%= link_to 'Cancel', mail_manager.cancel_mailing_path(mailing), :class => 'button' %>
<%= link_to 'Messages', mail_manager.mailing_messages_path(mailing), :class => 'button' %>
<%= link_to 'Bounces', mail_manager.bounces_path(:mailing_id => mailing.id), :class => 'button' %>
<% else %> No mailings exist. <% end %> <%= content_for :page_navigation do %>
<%= link_to "New Mailing", mail_manager.new_mailing_path, :class => 'button' %>
<% end %>