app/views/mail_engine/dashboard/index.html.erb in mail_engine-0.1.2 vs app/views/mail_engine/dashboard/index.html.erb in mail_engine-0.1.3
- old
+ new
@@ -23,11 +23,11 @@
google.load("visualization", "1", {packages:["corechart"]});
google.setOnLoadCallback(drawPie);
</script>
<div class="today-report left">
-
+
<h2>Report of Today</h2>
<div class="clearer"></div>
<div class="left">
<table border="0" cellspacing="5" cellpadding="5" class="data-table" style="width: 500px; margin-top: 30px; margin-right: 30px">
@@ -71,11 +71,41 @@
<div class="clearer"></div>
<table border="0" cellspacing="5" cellpadding="5" class="data-table" style="width: 910px; margin-top: 30px; margin-right: 30px">
<tr>
<th>Schedule Name</th><th width="120">Send Time</th>
</tr>
+ <% MailEngine::MailSchedule.future_schedules.each do |schedule, scheduled_time| %>
<tr>
- <td>New Jobs Newsletter</td><td>2011-3-4 12:00</td>
+ <td><%= link_to schedule.name, mail_schedule_path(schedule) %></td><td><%= scheduled_time.to_s(:db) %></td>
</tr>
+ <% end %>
+ </table>
+</div>
+<div class="clearer"></div>
+
+<div class="today-report left">
+ <h2>Recently Sent Mails</h2>
+ <div class="clearer"></div>
+
+ <table class="data-table" style="width: 910px; margin-top: 30px; margin-right: 30px">
+ <tr>
+ <th>Subject</th>
+ <th>Sender</th>
+ <th>Recipient</th>
+ <th>mime_type</th>
+ <th>Sent at</th>
+ <th width="20"></th>
+ </tr>
+
+ <% MailEngine::MailLog.order("id desc").limit(10).each do |log| %>
+ <tr class="even">
+ <td><%= log.subject %></td>
+ <td><%= log.sender %></td>
+ <td><%= log.recipient %></td>
+ <td><%= log.mime_type %></td>
+ <td><%= log.created_at %></td>
+ <td><%= link_to image_tag('mail_engine/icons/show.png'), mail_log_path(log) %></td>
+ </tr>
+ <% end %>
</table>
</div>
<div class="clearer"></div>
\ No newline at end of file