修改邮件--每天发送-》内容为空的问题
This commit is contained in:
parent
c0d95bf872
commit
2873412d1a
|
@ -247,6 +247,7 @@ class Mailer < ActionMailer::Base
|
|||
|
||||
has_content = [@issues,@issues_journals,@course_messages,@project_messages,@course_news,@course_news_comments,@project_news,@project_news_comments,@project_attachments,
|
||||
@course_journal_messages,@user_journal_messages,@project_journal_messages,@forums,@memos,@attachments,@bids,@wiki_contents].any? {|o| !o.empty?}
|
||||
|
||||
mylogger.debug "Sent activity mail : #{user.mail} - #{has_content}"
|
||||
#有内容才发,没有不发
|
||||
mail :to => user.mail,:subject => subject if has_content
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<div class="wmail_main" style="padding:20px 10px 0px;">
|
||||
<h3 class="wmail_h2" style="color:#474646; "><%= l(:label_course_overview)%></h3>
|
||||
<!-- 课程通知 -->
|
||||
<% unless @course_news.first.nil? || @course_news_comments.first.nil? %>
|
||||
<% if !@course_news.first.nil? || !@course_news_comments.first.nil? %>
|
||||
<ul class="wmail_ul" style=" list-style-type:none;clear: both;margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:1020px; margin-bottom:15px;">
|
||||
<span class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
|
||||
<%= l(:label_course_news) %>
|
||||
|
@ -190,7 +190,7 @@
|
|||
@project_attachments.first %>
|
||||
<div class="wmail_main" style="padding:20px 10px 0px;">
|
||||
<h3 class="wmail_h2" style="color:#474646; "><%= l(:label_project_overview_new)%></h3>
|
||||
<% unless @issues.first.nil? || @issues_journals.first.nil? %>
|
||||
<% if !@issues.first.nil? || !@issues_journals.first.nil? %>
|
||||
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:1020px; margin-bottom:15px;">
|
||||
<span class="wmail_h4" style="color:#666; font-size:14px; margin-bottom:5px;" >
|
||||
<%= l(:label_issue_tracking) %>
|
||||
|
@ -302,7 +302,7 @@
|
|||
<% end %>
|
||||
|
||||
<!--项目新闻-->
|
||||
<% unless @project_news.first.nil? || @project_news_comments.first.nil? %>
|
||||
<% if !@project_news.first.nil? || !@project_news_comments.first.nil? %>
|
||||
<ul class="wmail_ul" style=" list-style-type:none;clear: both;margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:1020px; margin-bottom:15px;">
|
||||
<span class="wmail_h4" style="color:#666; font-size:14px; margin-bottom:5px;" >
|
||||
<%= l(:label_project_news) %>
|
||||
|
|
Loading…
Reference in New Issue