课程通知邮件内容显示修改(新编辑器下不能使用)

dev_repository_hjq
huang 10 years ago
parent c39e0bf3db
commit 52bbb92c9f

@ -102,7 +102,7 @@ class Mailer < ActionMailer::Base
project_ids = projects.map{|project| project.id}.join(",") project_ids = projects.map{|project| project.id}.join(",")
course_ids = courses.map {|course| course.id}.join(",") course_ids = courses.map {|course| course.id}.join(",")
# 查询user的缺陷包括发布的,跟踪的以及被指派的缺陷 # 查询user的缺陷项目中成员都能收到
sql = "select * from members m, issues i where i.project_id = m.project_id and m.user_id='#{user.id}' sql = "select * from members m, issues i where i.project_id = m.project_id and m.user_id='#{user.id}'
and (i.created_on between '#{date_from}' and '#{date_to}') order by i.created_on desc" and (i.created_on between '#{date_from}' and '#{date_to}') order by i.created_on desc"
@issues = Issue.find_by_sql(sql) @issues = Issue.find_by_sql(sql)
@ -110,9 +110,7 @@ class Mailer < ActionMailer::Base
# @bids 查询课程作业包括老师发布的作业以及user提交作业 # @bids 查询课程作业包括老师发布的作业以及user提交作业
# @attachments查询课程课件更新 # @attachments查询课程课件更新
@attachments ||= [] @attachments ||= []
@bids ||= [] # 老师发布的作业 @bids ||= [] # 老师发布的作业
unless courses.first.nil? unless courses.first.nil?
count = courses.count count = courses.count
count = count - 1 count = count - 1

@ -1,17 +1,15 @@
<p> <p>
<span class="c_blue" style="color:#1b55a7;"> <span class="c_blue" style="color:#1b55a7;">
<%= link_to(h("#{@news.author.login}(#{@news.author.show_name})"), @issue_author_url , :style=>'color:#1b55a7; font-weight:bold;') %>
<%= link_to(h("#{@news.author.login}(#{@news.author.show_name})"), @issue_author_url , :style=>'color:#1b55a7; font-weight:bold;') %> </span><%= l(:mail_issue_title_userin)%>
</span><%= l(:mail_issue_title_userin)%>
<span class="c_blue" style="color:#1b55a7;"> <span class="c_blue" style="color:#1b55a7;">
<% if @news.project %> <% if @news.project %>
<%=h @news.project.name %> : <%= link_to(h(@news.title), @news_url,:style=>'color:#1b55a7; font-weight:bold;') %> <%=h @news.project.name %> : <%= link_to(h(@news.title), @news_url,:style=>'color:#1b55a7; font-weight:bold;') %>
<% elsif @news.course %> <% elsif @news.course %>
<%=h @news.course.name %> : <%= link_to(h(@news.title), @news_url,:style=>'color:#1b55a7; font-weight:bold;') %> <%=h @news.course.name %> : <%= link_to(h(@news.title), @news_url,:style=>'color:#1b55a7; font-weight:bold;') %>
<% end %> <% end %>
</span><%= l(:mail_issue_title_active)%></p> </span><%= l(:mail_issue_title_active)%>
</p>
<div class="mail_box" style="border:1px solid #c8c8c8; width:570px; height: auto; padding:15px; margin-top:10px; margin-bottom:10px;"> <div class="mail_box" style="border:1px solid #c8c8c8; width:570px; height: auto; padding:15px; margin-top:10px; margin-bottom:10px;">
<ul style="list-style-type:none; margin:0; padding:0;"> <ul style="list-style-type:none; margin:0; padding:0;">
<li style="list-style-type:none; margin:0; padding:0;"><span style="float: left;"><strong><%= l(:mail_issue_subject)%></strong></span> <li style="list-style-type:none; margin:0; padding:0;"><span style="float: left;"><strong><%= l(:mail_issue_subject)%></strong></span>
@ -25,7 +23,7 @@
</li> </li>
<li style="list-style-type:none; margin:0; padding:0;"><span style="float: left;"><strong><%= l(:mail_issue_content)%></strong></span> <li style="list-style-type:none; margin:0; padding:0;"><span style="float: left;"><strong><%= l(:mail_issue_content)%></strong></span>
<span style="float: left; width: 526px"> <span style="float: left; width: 526px">
<%= @news.description %> <%= @news.description.html_safe %>
</span> </span>
</li> </li>

Loading…
Cancel
Save