Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
This commit is contained in:
commit
8c65e1ac03
|
@ -46,6 +46,8 @@ class Mailer < ActionMailer::Base
|
|||
when :Project
|
||||
return -1 if journals_for_message.jour.project_type == Project::ProjectType_project
|
||||
project_feedback_url(journals_for_message.jour, anchor: "word_li_#{journals_for_message.id}")
|
||||
when :Course
|
||||
course_feedback_url(journals_for_message.jour, anchor: "word_li_#{journals_for_message.id}")
|
||||
when :Contest
|
||||
show_contest_contest_url(journals_for_message.jour, anchor: "word_li_#{journals_for_message.id}")
|
||||
when :User
|
||||
|
@ -54,9 +56,10 @@ class Mailer < ActionMailer::Base
|
|||
Rails.logger.error "[Builds a Mail::Message ERROR] journalsForMessage's jour is unkown type, journalsForMessage.id = #{journals_for_message.id}"
|
||||
return -1
|
||||
end
|
||||
#如果是直接留言并且留言对象是Project并且Project类型是课程
|
||||
if !journals_for_message.at_user && journals_for_message.jour.class.to_s.to_sym == :Project && journals_for_message.jour.project_type == 1
|
||||
project = journals_for_message.jour
|
||||
# modify by nwb
|
||||
#如果是直接留言并且留言对象是课程
|
||||
if !journals_for_message.at_user && journals_for_message.jour.class.to_s.to_sym == :Course
|
||||
course = journals_for_message.jour
|
||||
@author = journals_for_message.user
|
||||
#课程的教师
|
||||
@teachers = searchTeacherAndAssistant journals_for_message.jour
|
||||
|
|
|
@ -797,7 +797,7 @@ ActiveRecord::Schema.define(:version => 20140704034832) do
|
|||
t.integer "osp_id"
|
||||
t.integer "parent_id"
|
||||
t.string "subject", :null => false
|
||||
t.text "content", :limit => 16777215, :null => false
|
||||
t.text "content", :null => false
|
||||
t.integer "author_id"
|
||||
t.integer "replies_count", :default => 0
|
||||
t.integer "last_reply_id"
|
||||
|
|
Loading…
Reference in New Issue