System Mail Schedules

<%= show_no_record(@mail_schedules) do %> <% @mail_schedules.each do |mail_schedule| %> <% end %>
Schedule Info
Name<%= mail_schedule.name %>
Template<%= mail_schedule.mail_template.name %>
User Group<%= mail_schedule.user_group %>
Total Count<%= mail_schedule.count %>
Sent Count<%= mail_schedule.sent_count %>
Period<%= mail_schedule.period %>
First Send At<%= mail_schedule.first_send_at %>
Last Sent At<%= mail_schedule.last_sent_at %>
Payload <%= raw mail_schedule.payload.gsub(",", "
") %>
Availability<%= mail_schedule.available? ? "Running" : "Stopped" %>
<%= link_to image_tag('mail_engine/icons/show.png'), mail_schedule_path(mail_schedule) %> <%= link_to image_tag('mail_engine/icons/edit.gif'), edit_mail_schedule_path(mail_schedule) %> <%= link_to image_tag('mail_engine/icons/delete.png'), mail_schedule_path(mail_schedule), :confirm => 'Are you sure?', :method => :delete %> <%= link_to image_tag('mail_engine/icons/start.png'), start_mail_schedule_path(mail_schedule), :confirm => 'Are you sure to start this schedule?', :class => "start_button_#{mail_schedule.id}", :remote => true, :method => :post %> <%= link_to image_tag('mail_engine/icons/pause.png'), stop_mail_schedule_path(mail_schedule), :confirm => 'Are you sure to stop this schedule?', :class => "stop_button_#{mail_schedule.id}", :remote => true, :method => :post %>
<%= form_tag send_test_mail_mail_schedule_path(mail_schedule), :remote => true do %>
Load data from user: <%= select_tag :sample_user_id, options_from_collection_for_select(MailEngine::USER_MODEL.order('id asc').limit(10).send(mail_schedule.user_group), "id", "email") %>
Send mail to: <%= text_field_tag :recipient, "", :size => 14, :class => "text" %> <%= submit_tag 'Send Test', :class => "button" %>
<% end %>
<%= paginate @mail_schedules %>
<% end %>
<%= link_to 'New Mail Schedule', new_mail_schedule_path %>