Fix mail cron log list

This commit is contained in:
spen 2014-03-20 15:08:54 +08:00
parent c8cef00b37
commit 7b2f1c090b
8 changed files with 77 additions and 11 deletions

View File

@ -16,6 +16,14 @@ class Admin::MailCronLogsController < OrbitBackendController
end
end
def show
@mail_cron_log = MailCronLog.find(params[:id])
respond_to do |format|
format.html # show.html.erb
end
end
def destroy
@mail_cron_log = MailCronLog.find(params[:id])

View File

@ -16,8 +16,13 @@ class Admin::MailCronsController < OrbitBackendController
end
end
def show
def show
@mail_cron = MailCron.find(params[:id])
respond_to do |format|
format.html # show.html.erb
end
end
def new

View File

@ -1,6 +1,4 @@
class Admin::PluginsController < ApplicationController
layout "back_end"
class Admin::PluginsController < OrbitMemberController
def index

View File

@ -0,0 +1,31 @@
<% content_for :side_bar do %>
<%= render :partial => 'layouts/side_bar', :locals => {:link_name => t('site.settings'), :link_url => admin_site_site_info_path(@site), :icon => 'icons-cog', :side_bar_content => 'admin/sites/side_bar'} %>
<% end %>
<h3><%= t(:email_log) %></h3>
<ul>
<li>
<%= t(:mail_from_app) %>
<%= @mail_cron_log.mail_from_app %>
</li>
<li>
<%= t(:mail_user) %>
<%= @mail_cron_log.mail_user %>
</li>
<li>
<%= t(:sent_date) %>
<%= display_date_time(@mail_cron_log.created_at) %>
</li>
<li>
<%= t(:subject) %>
<%= @mail_cron_log.mail_subject %>
</li>
<li>
<%= t(:mail_to) %>
<p><%= @mail_cron_log.mail_to.gsub(/,/, "<br />").html_safe %></p>
</li>
</ul>
<%= link_to t(:close), '#', :class=>"btn", :onclick=>"window.close();" %>

View File

@ -0,0 +1,28 @@
<% content_for :side_bar do %>
<%= render :partial => 'layouts/side_bar', :locals => {:link_name => t('site.settings'), :link_url => admin_site_site_info_path(@site), :icon => 'icons-cog', :side_bar_content => 'admin/sites/side_bar'} %>
<% end %>
<h3><%= t(:email_queue) %></h3>
<ul>
<li>
<%= t(:mail_from_app) %>
<%= @mail_cron.mail_from_app %>
</li>
<li>
<%= t(:sent_date) %>
<%= display_date_time(@mail_cron.created_at) %>
</li>
<li>
<%= t(:subject) %>
<%= @mail_cron.mail_subject %>
</li>
<li>
<%= t(:mail_to) %>
<p><%= @mail_cron.mail_to.gsub(/,/, "<br />").html_safe %></p>
</li>
</ul>
<%= link_to t(:close), 'javascript:void(0);', :class=>"btn", :onclick=>"window.close();" %>

View File

@ -9,13 +9,12 @@
<td><%= mail_cron.mail_subject %>
<div class="quick-edit">
<ul class="nav nav-pills">
<%= content_tag(:li, link_to(t(:detail), '#', class: ("detail-row"))) if at_least_module_manager %>
<%= content_tag(:li, link_to(t(:detail), admin_mail_cron_path(mail_cron),:target => '_blank')) if at_least_module_manager %>
<%if at_least_module_manager %>
<li><%= link_to t(:delete_), admin_mail_cron_path(mail_cron), :class=>"text-error", :confirm => t('sure?'), :method => :delete, :remote => true %></li>
<% end -%>
</ul>
</div>
</td>
<td><p><%= mail_cron.mail_to.gsub(/,/, " ").html_safe %></p></td>
<td><%= mail_cron.mail_from_app %></td>
</tr>

View File

@ -9,12 +9,11 @@
<td><%= mail_cron_log.mail_subject %>
<div class="quick-edit">
<ul class="nav nav-pills">
<%= content_tag(:li, link_to(t(:detail), '#', class: ("detail-row"))) if at_least_module_manager %>
<%= content_tag(:li, link_to(t(:detail), admin_mail_cron_log_path(mail_cron_log),:target => '_blank')) if at_least_module_manager %>
<%= content_tag(:li, link_to(t(:delete_),admin_mail_cron_log_path(mail_cron_log), :confirm => t(:sure?), :method => :delete, :class=>"text-error", :remote => true)) if at_least_module_manager %>
</ul>
</div>
</td>
<td><p><%= mail_cron_log.mail_to.gsub(/,/, " ").html_safe %></p> </td>
<td><%= mail_cron_log.mail_user %> </td>
<td><%= mail_cron_log.mail_from_app %> </td>
</tr>

View File

@ -93,7 +93,6 @@
</th>
<th><%= t(:sent_date) %></th>
<th><%= t(:subject) %></th>
<th data-hide="all"><%= t(:mail_to) %></th>
<th><%= t(:mail_user) %></th>
<th><%= t(:mail_from_app) %></th>
</tr>
@ -120,7 +119,6 @@
</th>
<th><%= t(:sent_date) %></th>
<th><%= t(:subject) %></th>
<th data-hide="all"><%= t(:mail_to) %></th>
<th><%= t(:mail_from_app) %></th>
</tr>
</thead>