History Report

<%= form_for :report, reports_path, :html => {:method => :get} do |f| %> <%= f.label :from %> <%= f.text_field :from, :class => "text", :value => params[:report].try(:[], :from) || 1.weeks.ago.to_date.to_s(:db) %> <%= f.label :to %> <%= f.text_field :to, :class => "text", :value => params[:report].try(:[], :to) || Time.now.to_date.to_s(:db) %>   <% end %>
<% @stats_data.each do |stat| %> <% end %>
Date Requests Delivered Opens
(unique/total)
Open Rate Clicks
(unique/total)
Click Rate Bounces Spams Blocks Invalid
Emails
<%= stat["date"] %> <%= stat["requests"] %> <%= stat["delivered"] %> <%= stat["unique_opens"] %> / <%= stat["opens"] %> <%= show_percentage(stat["unique_opens"].to_f, stat["delivered"].to_f) %> <%= stat["unique_clicks"] %> / <%= stat["clicks"] %> <%= show_percentage(stat["unique_clicks"].to_f, stat["delivered"].to_f) %> <%= stat["bounces"] %> <%= stat["spamreports"] %> <%= stat["blocks"] %> <%= stat["invalid_email"] %>