diff --git a/app/controllers/homework_common_controller.rb b/app/controllers/homework_common_controller.rb
index 6c8ccd4a9..9e3a4b836 100644
--- a/app/controllers/homework_common_controller.rb
+++ b/app/controllers/homework_common_controller.rb
@@ -153,9 +153,9 @@ class HomeworkCommonController < ApplicationController
# 开启/关闭匿评消息通知
def send_message_anonymous_comment(homework, m_status )
# status 标记匿评状态 1为关闭 0为开启
- course = @homework.course
- course.student.each do |st|
- @homework.course_messages << CourseMessage.new(:user_id => st.student_id, :course_id => course.id, :viewed => false, :status => m_status)
+ course = homework.course
+ course.members.each do |m|
+ @homework.course_messages << CourseMessage.new(:user_id => m.user_id, :course_id => course.id, :viewed => false, :status => m_status)
end
end
#提示
diff --git a/app/models/course_message.rb b/app/models/course_message.rb
index eae880380..65e91141c 100644
--- a/app/models/course_message.rb
+++ b/app/models/course_message.rb
@@ -1,4 +1,7 @@
class CourseMessage < ActiveRecord::Base
+ # status说明: status在课程不同的类型,区分不同的功能
+ # HomeworkCommon:status:
+ # nil:发布了作业; 1:作业截止时间到了提醒!;2:开启匿评; 3:关闭匿评; 4:匿评开始失败
attr_accessible :course_id, :course_message_id, :course_message_type, :user_id, :viewed, :content, :status
# 多态 虚拟关联
diff --git a/app/models/forge_message.rb b/app/models/forge_message.rb
index 0dce57598..8bf754719 100644
--- a/app/models/forge_message.rb
+++ b/app/models/forge_message.rb
@@ -1,14 +1,7 @@
class ForgeMessage < ActiveRecord::Base
- # 公共表中活动类型,命名规则:TYPE_OF_{类名}_ACT
- TYPE_OF_ISSUE_ACT = "Issue"
- TYPE_OF_MESSAGE_ACT = "Message"
- TYPE_OF_ATTACHMENT_ACT = "Attachment"
- TYPE_OF_DOCUMENT_ACT = "Document"
- TYPE_OF_JOURNAL_ACT = "Journal"
- TYPE_OF_WIKI_ACT = "Wiki"
- TYPE_OF_NEWS_ACT = "News"
-
- attr_accessible :forge_message_id, :forge_message_type, :project_id, :user_id, :viewed, :secret_key
+ # status在不同的类中,作用不同
+ # Isseu: satus nil:发布了缺陷;:1:缺陷计划完成日志到了提醒
+ attr_accessible :forge_message_id, :forge_message_type, :project_id, :user_id, :viewed, :secret_key, :status
belongs_to :forge_message ,:polymorphic => true
belongs_to :project
diff --git a/app/models/mailer.rb b/app/models/mailer.rb
index b820e6d54..52b7242dd 100644
--- a/app/models/mailer.rb
+++ b/app/models/mailer.rb
@@ -51,9 +51,9 @@ class Mailer < ActionMailer::Base
def send_mail_anonymous_comment_open(homework_common)
course = homework_common.course
recipients ||= []
- course.student.each do |student|
- user = User.find(student.student_id)
- @subject = "#{l(:mail_homework)}#{homework_common.name} #{l(:mail_anonymous_comment_open)}"
+ course.members.each do |member|
+ user = User.find(member.user_id)
+ # @subject = "#{l(:mail_homework)}#{homework_common.name} #{l(:mail_anonymous_comment_open)}"
@token = Token.get_token_from_user(user, 'autologin')
@anonymous_comment_close_url = url_for(student_work_index_url(:homework => homework_common.id, :token => @token.value))
@anonymous_comment_close_name = homework_common.name
@@ -62,16 +62,16 @@ class Mailer < ActionMailer::Base
recipients << user.mail
end
mail :to => recipients,
- :subject => @subject
+ :subject => "[#{l(:mail_homework)}#{homework_common.name}] #{l(:mail_anonymous_comment_open)}"
end
# 作业匿评关闭
def send_mail_anonymous_comment_close(homework_common)
course = homework_common.course
recipients ||= []
- course.student.each do |student|
- user = User.find(student.student_id)
- @subject = "#{l(:mail_homework)}#{homework_common.name} #{l(:mail_anonymous_comment_open)}"
+ course.members.each do |member|
+ user = User.find(member.user_id)
+ #@subject = "#{l(:mail_homework)}#{homework_common.name} #{l(:mail_anonymous_comment_open)}"
@token = Token.get_token_from_user(user, 'autologin')
@anonymous_comment_close_url = url_for(student_work_index_url(:homework => homework_common.id, :token => @token.value))
@anonymous_comment_close_name = homework_common.name
@@ -80,7 +80,28 @@ class Mailer < ActionMailer::Base
recipients << user.mail
end
mail :to => recipients,
- :subject => @subject
+ :subject => "[#{l(:mail_homework)}#{homework_common.name}] #{l(:mail_anonymous_comment_open)}"
+ end
+
+ # 匿评失败给老师发送邮件通知
+ def send_mail_anonymous_comment_fail(homework_common)
+ course = homework_common.course
+ recipients ||= []
+ # 只给该课程的老师发送邮件提醒
+ course.members.each do |member|
+ if m.user.allowed_to?(:as_teacher,course)
+ user = User.find(member.user_id)
+ #@subject = "[#{l(:mail_homework)} #{homework_common.name}] #{l(:mail_anonymous_comment_failed)}"
+ @token = Token.get_token_from_user(user, 'autologin')
+ @anonymous_comment_fail_url = url_for(student_work_index_url(:homework => homework_common.id, :token => @token.value))
+ @anonymous_comment_fail_name = homework_common.name
+ @author = homework_common.user
+ #收件人邮箱
+ recipients << user.mail
+ end
+ end
+ mail :to => recipients,
+ :subject => "[#{l(:mail_homework)} #{homework_common.name}] #{l(:mail_anonymous_comment_failed)}"
end
# author: alan
@@ -247,6 +268,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
@@ -263,7 +285,7 @@ class Mailer < ActionMailer::Base
#收件人邮箱
recipient = user.mail
mail :to => recipient,
- :subject => "#{l(:mail_homework)}#{homework_common.name}#{l(:mail_homework_endtime)} "
+ :subject => @subject
end
# 公共讨论区发帖、回帖添加邮件发送信息
diff --git a/app/views/mailer/send_for_user_activities.html.erb b/app/views/mailer/send_for_user_activities.html.erb
index 6fc742c99..3f761fbd4 100644
--- a/app/views/mailer/send_for_user_activities.html.erb
+++ b/app/views/mailer/send_for_user_activities.html.erb
@@ -7,7 +7,7 @@
<%= l(:label_course_overview)%>
- <% unless @course_news.first.nil? || @course_news_comments.first.nil? %>
+ <% if !@course_news.first.nil? || !@course_news_comments.first.nil? %>
<%= l(:label_course_news) %>
@@ -190,7 +190,7 @@
@project_attachments.first %>
<%= l(:label_project_overview_new)%>
- <% unless @issues.first.nil? || @issues_journals.first.nil? %>
+ <% if !@issues.first.nil? || !@issues_journals.first.nil? %>
<%= 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? %>
<%= l(:label_project_news) %>
diff --git a/app/views/mailer/send_mail_anonymous_comment_close.text.erb b/app/views/mailer/send_mail_anonymous_comment_close.text.erb
index e69de29bb..8ba50ff53 100644
--- a/app/views/mailer/send_mail_anonymous_comment_close.text.erb
+++ b/app/views/mailer/send_mail_anonymous_comment_close.text.erb
@@ -0,0 +1,3 @@
+<%= l(:mail_issue_content)%>
+<%=link_to @author, user_url(@author) %>
+<%=link_to @anonymous_comment_close_name, @anonymous_comment_close_url%>
diff --git a/app/views/mailer/send_mail_anonymous_comment_fail.html.erb b/app/views/mailer/send_mail_anonymous_comment_fail.html.erb
new file mode 100644
index 000000000..60f86ba18
--- /dev/null
+++ b/app/views/mailer/send_mail_anonymous_comment_fail.html.erb
@@ -0,0 +1,10 @@
+
+
+ - <%= l(:mail_issue_content)%>
+
+
<%=link_to @author, user_url(@author) %> 发布的作业:<%=link_to @anonymous_comment_fail_name, @anonymous_comment_fail_url%> 匿评开启失败!
+
+
+
+
+
\ No newline at end of file
diff --git a/app/views/mailer/send_mail_anonymous_comment_fail.text.erb b/app/views/mailer/send_mail_anonymous_comment_fail.text.erb
new file mode 100644
index 000000000..e69de29bb
diff --git a/app/views/repositories/show.html.erb b/app/views/repositories/show.html.erb
index 5f279f2c2..cbb899db3 100644
--- a/app/views/repositories/show.html.erb
+++ b/app/views/repositories/show.html.erb
@@ -29,78 +29,78 @@
-
-
-
-
-
git 克隆和提交的用户名和密码为登录用户名和密码
-
项目代码请设置好正确的编码方式(utf-8),否则中文会出现乱码。
-
通过cmd命令提示符进入代码对应文件夹的根目录,
- 如果是首次提交代码,执行如下命令:
-
-
-
git init
-
-
git add *
-
-
git commit -m "first commit"
-
-
git remote add origin
- <%= @repos_url %>
-
-
-
git config http.postBuffer 524288000 #设置本地post缓存为500MB
-
-
git push -u origin master
-
-
-
-
已经有本地库,还没有配置远程地址,打开命令行执行如下:
-
-
-
git remote add origin <%= @repos_url %>
-
-
git add .
-
-
git commit -m "first commit"
-
-
git config http.postBuffer 524288000 #设置本地post缓存为500MB
-
-
git push -u origin master
-
-
-
-
已有远程地址,创建一个远程分支,并切换到该分支,打开命令行执行如下:
-
-
-
git clone <%= @repos_url %>
-
-
git push
-
-
git checkout -b branch_name
-
-
git push origin branch_name
-
-
-
-
从网上获取别人的开源版本库,转交到trustie网站上,打开命令行执行如下:
-
-
-
git remote add trustie
- <%= @repos_url %>
-
-
-
git add .
-
-
git commit -m "first commit"
-
-
git config http.postBuffer 524288000 #设置本地post缓存为500MB
-
-
git push -u trustie branch:branch
-
-
李海提供
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<% if !@entries.nil? && authorize_for('repositories', 'browse') %>
<%= render :partial => 'dir_list' %>
diff --git a/app/views/users/_user_message_course.html.erb b/app/views/users/_user_message_course.html.erb
new file mode 100644
index 000000000..7d6044e64
--- /dev/null
+++ b/app/views/users/_user_message_course.html.erb
@@ -0,0 +1,338 @@
+<% if ma.class == CourseMessage %>
+ <% if ma.course_message_type == "News" %>
+
+ - <%=link_to image_tag(url_to_avatar(ma.course_message.author), :width => "30", :height => "30"),user_path(ma.course_message.author) %>
+ - <%=link_to ma.course_message.author, user_path(ma.course_message.author), :class => "newsBlue homepageNewsPublisher" %>">发布了通知:
+ -
+ <%= link_to ma.course_message.title, {:controller => 'news', :action => 'show', :id => ma.course_message.id },
+ :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
+ :onmouseover =>"message_titile_show($(this),event)",
+ :onmouseout => "message_titile_hide($(this))" %>
+
+
标题:<%= ma.course_message.title %>
+ <% unless ma.course_message.description.nil? %>
+
内容:
+
<%= ma.course_message.description.html_safe %>
+ <% end %>
+
+ - <%= time_tag(ma.created_at).html_safe %>
+
+ <% end %>
+ <% if ma.course_message_type == "Comment" %>
+
+ - <%=link_to image_tag(url_to_avatar(ma.course_message.author), :width => "30", :height => "30"), user_path(ma.course_message.author) %>
+ - <%=link_to ma.course_message.author, user_path(ma.course_message.author), :class => "newsBlue homepageNewsPublisher" %>">评论了通知:
+ -
+ <%= link_to ma.course_message.comments.html_safe, {:controller => 'news', :action => 'show', :id => ma.course_message.commented.id },
+ :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
+ :onmouseover =>"message_titile_show($(this),event)",
+ :onmouseout => "message_titile_hide($(this))" %>
+
+
标题:<%= ma.course_message.commented.title %>
+ <% unless ma.course_message.comments.nil? %>
+
内容:
+
<%= ma.course_message.comments.html_safe %>
+ <% end %>
+
+ - <%= time_tag(ma.created_at).html_safe %>
+
+ <% end %>
+ <% if ma.course_message_type == "HomeworkCommon" && ma.status.nil? %>
+
+ - <%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %>
+ - <%=link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师", user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
+ ">发布了课程作业:
+
+ -
+ <%= link_to ma.course_message.name, student_work_index_path(:homework => ma.course_message.id),
+ :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
+ :onmouseover =>"message_titile_show($(this),event)",
+ :onmouseout => "message_titile_hide($(this))" %>
+
+ <% if User.current.allowed_to?(:as_teacher,ma.course_message.course) %>
+
+ <%= User.current.lastname + User.current.firstname %>老师您好!
+ <%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师刚刚发布了一个作业:
+
+
课程名称:<%= ma.course_message.course.name %>
+ (<%= ma.course_message.course.term %>)
+
作业标题:<%= ma.course_message.name %>
+
提交截止:<%= ma.course_message.end_time %> 24点
+
匿评开始:<%= ma.course_message.homework_detail_manual.evaluation_start %> 24点
+
匿评关闭:<%= ma.course_message.homework_detail_manual.evaluation_end %> 24点
+
迟交扣分:<%= ma.course_message.late_penalty %>分
+
缺评扣分:<%= ma.course_message.homework_detail_manual.absence_penalty %>分
+
+ 您可以修改作业内容、评分规则、匿评过程等,谢谢!
+
+ <% else %>
+
<%= User.current.lastname + User.current.firstname %>同学你好!<%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师刚刚发布了一个作业:
+
课程名称:<%= ma.course_message.course.name %>
+ (<%= ma.course_message.course.term %>)
+
作业标题:<%= ma.course_message.name %>
+
提交截止:<%= ma.course_message.end_time %> 24点
+
匿评关闭:<%= ma.course_message.homework_detail_manual.evaluation_end %> 24点
+
迟交扣分:<%= ma.course_message.late_penalty %>分
+
+ 请抓紧时间提交自己的作品,谢谢!
+
+ <% end %>
+
+ - <%= time_tag(ma.created_at).html_safe %>
+
+ <% end %>
+ <% if ma.course_message_type == "HomeworkCommon" && ma.status == 1 %>
+
+ - <%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %>
+ - <%=link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>">发布的作业:
+ -
+ <%= link_to ma.course_message.name, student_work_index_path(:homework => ma.course_message.id),
+ :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
+ :onmouseover => "message_titile_show($(this),event)",
+ :onmouseout => "message_titile_hide($(this))" %>
+
+
+ <% if !User.current.allowed_to?(:as_teacher,ma.course_message.course) %>
+
+ <%= User.current.lastname + User.current.firstname %>同学您好!
+ <%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师发布的作业截止日期快到了:
+
+
课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.term %>)
+
作业标题:<%= ma.course_message.name %>
+
提交截止:<%= ma.course_message.end_time %>@nbsp; 24点
+
匿评关闭:<%= ma.course_message.homework_detail_manual.evaluation_end %>@nbsp;@nbsp;24点
+
迟交扣分:<%= ma.course_message.late_penalty %>分
+
请同学们抓紧时间提交自己的作品,谢谢!
+ <% else %>
+
<%= User.current.lastname + User.current.firstname %>老师您好!<%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师发布的作业截止日期快到了:
+
课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.term %>)
+
作业标题:<%= ma.course_message.name %>
+
提交截止:<%= ma.course_message.end_time %>@nbsp;@nbsp;24点
+
匿评开始:<%= ma.course_message.homework_detail_manual.evaluation_start %>@nbsp;@nbsp;24点
+
匿评关闭:<%= ma.course_message.homework_detail_manual.evaluation_end %>@nbsp;@nbsp;24点
+
迟交扣分:<%= ma.course_message.late_penalty %>分
+
缺评扣分:<%= ma.course_message.homework_detail_manual.absence_penalty %>分
+
您可以修改作业内容、评分规则、匿评过程等,谢谢!
+ <% end %>
+
+ - 截止时间快到了!
+ - <%= time_tag(ma.created_at).html_safe %>
+
+ <% end %>
+
+ <% if ma.course_message_type == "HomeworkCommon" && ma.status == 2 %>
+
+ -
+ <%= link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %>
+
+ -
+ <%= link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师",
+ user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
+ ">启动了作业匿评:
+
+ -
+ <%= link_to "作业题目:" + ma.course_message.name, student_work_index_path(:homework => ma.course_message.id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
+ :onmouseover => "message_titile_show($(this),event)",
+ :onmouseout => "message_titile_hide($(this))" %>
+
+
+
+ <%= User.current.lastname + User.current.firstname %><%= User.current.allowed_to?(:as_teacher,ma.course_message.course) ? '老师' : '同学' %>您好!
+ <%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师开启了匿评,作业详情如下:
+
+
课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.term %>)
+
作业标题:<%= ma.course_message.name %>
+
+ 截止日期:<%= ma.course_message.homework_detail_manual.evaluation_end %> 24点
+
+
+ - <%= time_tag(ma.created_at).html_safe %>
+
+ <% end %>
+
+ <% if ma.course_message_type == "HomeworkCommon" && ma.status == 3 %>
+
+ - <%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %>
+ -
+ <%=link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师",
+ user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>">关闭了作业匿评:
+ -
+ <%= link_to "作业题目:" + ma.course_message.name, student_work_index_path(:homework => ma.course_message.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
+ :onmouseover =>"message_titile_show($(this),event)",
+ :onmouseout => "message_titile_hide($(this))"%>
+
+
+
+ <%= User.current.lastname + User.current.firstname %><%= User.current.allowed_to?(:as_teacher,ma.course_message.course) ? '老师':'同学'%>您好!
+ <%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师关闭了匿评,作业详情如下:
+
+
课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.term %>)
+
作业标题:<%= ma.course_message.name %>
+
+ - <%= time_tag(ma.created_at).html_safe %>
+
+ <% end %>
+
+ <% if ma.course_message_type == "HomeworkCommon" && ma.status == 4 %>
+
+ -
+ <%= link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %>
+
+ -
+ <%= link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师",
+ user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
+ ">启动作业匿评失败
+
+ -
+ <%= link_to "作业题目:" + ma.course_message.name, student_work_index_path(:homework => ma.course_message.id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
+ :onmouseover => "message_titile_show($(this),event)",
+ :onmouseout => "message_titile_hide($(this))" %>
+
+
+
+ <%= User.current.lastname + User.current.firstname %><%= User.current.allowed_to?(:as_teacher, ma.course_message.course) ? '老师':'同学'%>您好!
+ <%= User.current.eql?(ma.course_message.user) ?"您":(ma.course_message.user.lastname + ma.course_message.user.firstname + "老师") %>启动作业匿评失败,作业详情如下:
+
+
课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.term %>)
+
作业标题:<%= ma.course_message.name %>
+
+ - <%= time_tag(ma.created_at).html_safe %>
+
+ <% end %>
+
+ <% if ma.course_message_type == "Poll" %>
+
+ - <%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %>
+ - <%=link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>">发布了问卷:
+ -
+ <%= link_to format_activity_title(" #{ma.course_message.polls_name.nil? ? "未命名问卷" : ma.course_message.polls_name}"), poll_path(ma.course_message.id),
+ :class=>"#{ma.viewed==0?"newsBlack":"newsGrey"}",
+ :onmouseover =>"message_titile_show($(this),event)",
+ :onmouseout => "message_titile_hide($(this))" %>
+
+ <%= ma.course_message.polls_name %>
+
+ - <%= time_tag(ma.created_at).html_safe %>
+
+ <% end %>
+ <% if ma.course_message_type == "Message" %>
+
+ - <%=link_to image_tag(url_to_avatar(ma.course_message.author), :width => "30", :height => "30"), user_path(ma.course_message.author) %>
+ - <%=link_to ma.course_message.author, user_path(ma.course_message.author), :class => "newsBlue homepageNewsPublisher" %>"><%= ma.course_message.parent_id.nil? ? "发布了课程帖子:" : "评论了课程帖子:" %>
+ <% if ma.course_message.parent_id.nil? %>
+ -
+ <%= link_to ma.course_message.subject, course_boards_path(ma.course_message.course, :parent_id => ma.course_message.parent_id ? ma.course_message.parent_id : ma.course_message.id, :topic_id => ma.course_message.id),
+ :class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}",
+ :onmouseover =>"message_titile_show($(this),event)",
+ :onmouseout => "message_titile_hide($(this))" %>
+
+
主题:<%= ma.course_message.subject %>
+ <% unless ma.course_message.content.nil? %>
+
内容:
+
<%= ma.course_message.content.html_safe %>
+ <% end %>
+
+ <% else %>
+ -
+ <%= link_to ma.course_message.content.html_safe, course_boards_path(ma.course_message.course, :parent_id => ma.course_message.parent_id ? ma.course_message.parent_id : ma.course_message.id, :topic_id => ma.course_message.id),
+ :class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}",
+ :onmouseover =>"message_titile_show($(this),event)",
+ :onmouseout => "message_titile_hide($(this))" %>
+
+
主题:<%= ma.course_message.subject %>
+ <% unless ma.course_message.content.nil? %>
+
内容:
+
<%= ma.course_message.content.html_safe %>
+ <% end %>
+
+ <% end %>
+ - <%= time_tag(ma.created_at).html_safe %>
+
+
+ <% end %>
+ <% if ma.course_message_type == "StudentWorksScore" %>
+
+ -
+ <% if ma.course_message.reviewer_role == 3 %>
+ <%=link_to image_tag(url_to_avatar(""), :width => "30", :height => "30") %>
+ <% else %>
+ <%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %>
+ <% end %>
+
+ -
+ <% if ma.course_message.reviewer_role == 3 %>
+ 匿名用户
+ <% else %>
+ <%= link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师",
+ user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
+ <% end %>
+ ">
+ <%= ma.status == 0 ? "评阅了您的作品:" : "重新评阅了您的作品:" %>
+
+
+ -
+ <% unless ma.content.nil? %>
+ <%= link_to ma.content.html_safe, student_work_index_path(:homework => ma.course_message.student_work.homework_common_id),
+ :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
+ :onmouseover =>"message_titile_show($(this),event)",
+ :onmouseout => "message_titile_hide($(this))" %>
+
+ <%= ma.content.html_safe %>
+
课程名称:<%= ma.course.name %>(<%= ma.course.term %>)
+
作业标题:<%=ma.course_message.student_work.homework_common.name %>
+
+ <% end %>
+ - <%= time_tag(ma.created_at).html_safe %>
+
+ <% end %>
+ <% if ma.course_message_type == "JournalsForMessage" %>
+ <% if ma.course_message.jour_type == 'Course' %>
+ <% if params[:type] != 'homework' %>
+
+ -
+ <%= link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %>
+
+ - <%= link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
+ ">在课程中留言了:
+
+ -
+ <%= link_to ma.course_message.notes.html_safe, course_feedback_path(:id => ma.course_id),
+ :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
+ :onmouseover => "message_titile_show($(this),event)",
+ :onmouseout => "message_titile_hide($(this))" %>
+
+
+ <%= ma.course_message.notes.html_safe %>
+
+ - <%= time_tag(ma.created_at).html_safe %>
+
+ <% end %>
+ <% else %>
+
+ -
+ <%= link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %>
+
+ -
+ <%= link_to ma.course_message.user.lastname + ma.course_message.user.firstname +
+ "#{ma.course_message.user.members.where("course_id=?", ma.course.id).first.roles.first.name=='Student'?"同学":"老师"}",
+ user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
+ ">回复了作品评论:
+
+ -
+ <%= link_to ma.course_message.notes, student_work_index_path(:homework => ma.course_message.jour.student_work.homework_common_id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
+ :onmouseover => "message_titile_show($(this),event)",
+ :onmouseout => "message_titile_hide($(this))" %>
+
+
+
回复内容:
+
<%= ma.course_message.notes %>
+
您的评论:
+
<%= ma.course_message.jour.comment %>
+
课程名称:<%= ma.course.name %>(<%= ma.course.term %>)
+
作业标题:<%=ma.course_message.jour.student_work.homework_common.name %>
+
+ - <%= time_tag(ma.created_at).html_safe %>
+
+ <% end %>
+ <% end %>
+<% end %>
\ No newline at end of file
diff --git a/app/views/users/_user_message_forge.html.erb b/app/views/users/_user_message_forge.html.erb
new file mode 100644
index 000000000..641fb9269
--- /dev/null
+++ b/app/views/users/_user_message_forge.html.erb
@@ -0,0 +1,213 @@
+<% if ma.class == ForgeMessage %>
+
+ <% if ma.forge_message_type == "AppliedProject" %>
+
+ -
+ <%=link_to image_tag(url_to_avatar(ma.forge_message.user), :width => "30", :height => "30"), user_path(ma.forge_message.user) %>
+
+ -
+ <%=link_to ma.forge_message.user, user_path(ma.forge_message.user), :class => "newsBlue homepageNewsPublisher" %>
+ ">申请加入项目:
+
+ -
+ <%= link_to ma.project, settings_project_path(:id => ma.project, :tab => "members"), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
+ :onmouseover => "message_titile_show($(this),event)",
+ :onmouseout => "message_titile_hide($(this))" %>
+
+
+ <%= ma.project %>
+
+ - <%= time_tag(ma.created_at).html_safe %>
+
+ <% end %>
+
+ <% if ma.forge_message_type == "ProjectInvite" %>
+ <% inviter = User.find(ma.forge_message_id) %>
+
+ -
+ <%=link_to image_tag(url_to_avatar(inviter), :width => "30", :height => "30"), user_path(inviter) %>
+
+ -
+ <%=link_to inviter, user_path(inviter), :class => "newsBlue homepageNewsPublisher" %>
+ '>邀请你加入项目
+
+ <% if ma.user.member_of?(ma.project) %>
+ -
+ <% else %>
+
-
+ <% end %>
+ <%= link_to ma.project, project_path(ma.project),
+ :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
+ :onmouseover => "message_titile_show($(this),event)",
+ :onmouseout => "message_titile_hide($(this))" %>
+
+
+ <%= ma.project %>
+
+ <% unless User.current.member_of?(ma.project) %>
+ -
+ <%=link_to "同意加入", {:controller => 'projects', :action => 'member', :id => ma.project_id, :message_id =>ma.id, :key => ma.secret_key},
+ :value => ma.secret_key,
+ :class => "green_btn_cir ml10",
+ :style => "color:#fff" %>
+
+ <% end %>
+ - <%= time_tag(ma.created_at).html_safe %>
+
+ <% end %>
+ <% if ma.forge_message_type == "Issue" %>
+ <% if ma.status == 1%>
+
+ -
+ <%=link_to image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30"), user_path(ma.forge_message.author) %>
+
+ -
+ <%=link_to ma.forge_message.author, user_path(ma.forge_message.author), :class => "newsBlue homepageNewsPublisher" %>
+ "><%= ma.forge_message.tracker_id == 5 ? "发布的周报:":"指派给你的问题:"%>
+
+ -
+ <%= link_to ma.forge_message.subject, issue_path(:id => ma.forge_message.id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
+ :onmouseover => "message_titile_show($(this),event)",
+ :onmouseout => "message_titile_hide($(this))" %>
+
+
+
主题:<%= ma.forge_message.subject %>
+ <% unless ma.forge_message.description.nil? || ma.forge_message.description == "" %>
+
描述:
+
<%= ma.forge_message.description.html_safe %>
+ <% end %>
+
+ - 截止时间快到了!
+ - <%= time_tag(ma.created_at).html_safe %>
+
+ <% else %>
+
+ -
+ <%=link_to image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30"), user_path(ma.forge_message.author) %>
+
+ -
+ <%=link_to ma.forge_message.author, user_path(ma.forge_message.author), :class => "newsBlue homepageNewsPublisher" %>
+ "><%= ma.forge_message.tracker_id == 5 ? "发布了周报:":"指派了问题给你:"%>
+
+ -
+ <%= link_to ma.forge_message.subject, issue_path(:id => ma.forge_message.id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
+ :onmouseover => "message_titile_show($(this),event)",
+ :onmouseout => "message_titile_hide($(this))" %>
+
+
+
主题:<%= ma.forge_message.subject %>
+ <% unless ma.forge_message.description.nil? || ma.forge_message.description == "" %>
+
描述:
+
<%= ma.forge_message.description.html_safe %>
+ <% end %>
+
+ - <%= time_tag(ma.created_at).html_safe %>
+
+ <% end %>
+ <% end %>
+ <% if ma.forge_message_type == "Journal" %>
+
+ -
+ <%=link_to image_tag(url_to_avatar(ma.forge_message.user), :width => "30", :height => "30"), user_path(ma.forge_message.user) %>
+
+ -
+ <%=link_to ma.forge_message.user, user_path(ma.forge_message.user), :class => "newsBlue homepageNewsPublisher" %>
+ ">
+ 更新了问题状态:
+
+ -
+ <%= link_to ma.forge_message.journalized.subject,
+ issue_path(:id => ma.forge_message.journalized_id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
+ :onmouseover =>"message_titile_show($(this),event)",
+ :onmouseout => "message_titile_hide($(this))" %>
+
+
+
问题标题:<%= ma.forge_message.journalized.subject %>
+
更新内容:
+
<%= get_issue_des_update(ma.forge_message).html_safe %>
+
+ - <%= time_tag(ma.created_at).html_safe %>
+
+ <% end %>
+ <% if ma.forge_message_type == "Message" %>
+
+ - <%=link_to image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30"), user_path(ma.forge_message.author) %>
+ - <%=link_to ma.forge_message.author, user_path(ma.forge_message.author), :class => "newsBlue homepageNewsPublisher" %>
+ "><%= ma.forge_message.parent_id.nil? ? "发布了项目帖子:" : "评论了项目帖子:" %>
+ <% if ma.forge_message.parent_id.nil? %>
+ -
+ <%= link_to ma.forge_message.subject, project_boards_path(ma.forge_message.project,
+ :parent_id => ma.forge_message.parent_id ? ma.forge_message.parent_id : ma.forge_message.id,
+ :topic_id => ma.forge_message.id), :class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}",
+ :onmouseover => "message_titile_show($(this),event)",
+ :onmouseout => "message_titile_hide($(this))" %>
+
+
主题:<%= ma.forge_message.subject %>
+ <% unless ma.forge_message.content.nil? %>
+
内容:
+
<%= ma.forge_message.content.html_safe %>
+ <% end %>
+
+ <% else %>
+ -
+ <%= link_to ma.forge_message.subject, project_boards_path(ma.forge_message.project,
+ :parent_id => ma.forge_message.parent_id ? ma.forge_message.parent_id : ma.forge_message.id,
+ :topic_id => ma.forge_message.id), :class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}",
+ :onmouseover => "message_titile_show($(this),event)",
+ :onmouseout => "message_titile_hide($(this))" %>
+
+
帖子主题:<%= ma.forge_message.subject %>
+ <% unless ma.forge_message.content.nil? %>
+
评论内容:
+
<%= ma.forge_message.content.html_safe %>
+ <% end %>
+
+ <% end %>
+ - <%= time_tag(ma.created_at).html_safe %>
+
+ <% end %>
+ <% if ma.forge_message_type == "News" %>
+
+ -
+ <%=link_to image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30"), user_path(ma.forge_message.author) %>
+
+ -
+ <%=link_to ma.forge_message.author, user_path(ma.forge_message.author), :class => "newsBlue homepageNewsPublisher" %>
+ ">发布了新闻:
+
+ -
+ <%= link_to ("#{ma.forge_message.title.html_safe}"), {:controller => 'news', :action => 'show', :id => ma.forge_message.id},
+ :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
+ :onmouseover => "message_titile_show($(this),event)",
+ :onmouseout => "message_titile_hide($(this))" %>
+
+
+
标题:<%= ma.forge_message.title %>
+ <% unless ma.forge_message.description.nil? %>
+
内容:
+
<%= ma.forge_message.description.html_safe %>
+ <% end %>
+
+ - <%= time_tag(ma.created_at).html_safe %>
+
+ <% end %>
+ <% if ma.forge_message_type == "Comment" %>
+
+ - <%=link_to image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30"), user_path(ma.forge_message.author) %>
+ - <%=link_to ma.forge_message.author, user_path(ma.forge_message.author), :class => "newsBlue homepageNewsPublisher" %>
+ ">评论了新闻:
+ -
+ <%= link_to "#{ma.forge_message.comments.html_safe}",
+ {:controller => 'news', :action => 'show', :id => ma.forge_message.commented.id },:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
+ :onmouseover => "message_titile_show($(this),event)",
+ :onmouseout => "message_titile_hide($(this))" %>
+
+
+
新闻标题:<%= ma.forge_message.commented.title %>
+
评论内容:
+
<%= ma.forge_message.comments.html_safe %>
+
+ - <%= time_tag(ma.created_at).html_safe %>
+
+ <% end %>
+<% end %>
\ No newline at end of file
diff --git a/app/views/users/_user_message_forum.html.erb b/app/views/users/_user_message_forum.html.erb
new file mode 100644
index 000000000..102b4a155
--- /dev/null
+++ b/app/views/users/_user_message_forum.html.erb
@@ -0,0 +1,41 @@
+<% if ma.class == MemoMessage %>
+ <% if ma.memo_type == "Memo" %>
+
+ -
+ <%=link_to image_tag(url_to_avatar(ma.memo.author), :width => "30", :height => "30"), user_path(ma.memo.author) %>
+
+ -
+ <%=link_to ma.memo.author, user_path(ma.memo.author), :class => "newsBlue homepageNewsPublisher" %>
+ " ><%= ma.memo.parent_id.nil? ? "在贴吧发布帖子:" : "回复了贴吧帖子:" %>
+
+ <% if ma.memo.parent_id.nil? %>
+ -
+ <%= link_to ma.memo.subject, forum_memo_path(ma.memo.forum_id, ma.memo.parent_id ? ma.memo.parent_id: ma.memo.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
+ :onmouseover =>"message_titile_show($(this),event)",
+ :onmouseout => "message_titile_hide($(this))" %>
+
+
+
标题:<%= ma.memo.subject %>
+ <% unless ma.memo.content.nil? %>
+
内容:
+
<%= ma.memo.content.html_safe %>
+ <% end %>
+
+ <% else %>
+ -
+ <%= link_to ma.memo.content.html_safe, forum_memo_path(ma.memo.forum_id, ma.memo.parent_id ? ma.memo.parent_id: ma.memo.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
+ :onmouseover =>"message_titile_show($(this),event)",
+ :onmouseout => "message_titile_hide($(this))" %>
+
+
+
标题:<%= ma.memo.subject %>
+ <% unless ma.memo.content.nil? %>
+
内容:
+
<%= ma.memo.content.html_safe %>
+ <% end %>
+
+ <% end %>
+ - <%= time_tag(ma.memo.created_at).html_safe %>
+
+ <% end %>
+<% end %>
\ No newline at end of file
diff --git a/app/views/users/_user_message_userfeedaback.html.erb b/app/views/users/_user_message_userfeedaback.html.erb
new file mode 100644
index 000000000..672dfda64
--- /dev/null
+++ b/app/views/users/_user_message_userfeedaback.html.erb
@@ -0,0 +1,30 @@
+<% if ma.class == UserFeedbackMessage %>
+ <% if ma.journals_for_message_type == "JournalsForMessage" %>
+
+ -
+ <%=link_to image_tag(url_to_avatar(ma.journals_for_message.user), :width => "30", :height => "30"), user_path(ma.journals_for_message.user) %>
+
+ -
+ <%=link_to ma.journals_for_message.user, user_path(ma.journals_for_message.user), :class => "newsBlue homepageNewsPublisher" %>
+ "><%= ma.journals_for_message.reply_id == 0 ? "给你留言了:" : "回复了你的留言:" %>
+
+ -
+ <%= link_to ma.journals_for_message.notes.html_safe, feedback_path(ma.journals_for_message.jour_id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
+ :onmouseover =>"message_titile_show($(this),event)",
+ :onmouseout => "message_titile_hide($(this))" %>
+
+
+ <% if ma.journals_for_message.reply_id == 0 %>
+ <%= ma.journals_for_message.notes.html_safe %>
+ <% else %>
+
您的留言:
+
<%= JournalsForMessage.find(ma.journals_for_message.m_reply_id).notes.html_safe %>
+
回复内容:
+
<%= ma.journals_for_message.notes.html_safe %>
+ <% end %>
+
+ - <%= time_tag(ma.journals_for_message.created_on).html_safe %>
+
+
+ <% end %>
+<% end %>
\ No newline at end of file
diff --git a/app/views/users/user_messages.html.erb b/app/views/users/user_messages.html.erb
index 63876084d..bd794438c 100644
--- a/app/views/users/user_messages.html.erb
+++ b/app/views/users/user_messages.html.erb
@@ -31,662 +31,73 @@
-
-<% if @message_alls.count >0 || @user_system_messages.count >0 %>
- <% if params[:type].nil? || params[:type] == "unviewed" %>
-
- <% end %>
- <%# 系统消息 %>
- <% if params[:type] != 'system_messages' %>
- <% @user_system_messages.each do |usm| %>
-
- -
-
<%= image_tag("/images/logo.png", width: "30px", height: "30px", class: "mt3") %>
-
- -
- Trustie平台发布新消息:
-
- 【系统消息】
- -
-
- <%= link_to usm.subject.blank? ? (usm.content.nil? ? usm.description.html_safe : usm.content.html_safe) : usm.subject, user_system_messages_path(User.current),
- :id => "content_link_#{usm.id}",
- :onmouseover =>"message_titile_show($(this),event);",
- :onmouseout => "message_titile_hide($(this));"
- %>
-
-
- <% unless usm.subject.blank? %>
-
标题:<%= usm.subject %>
- <% end %>
- <% if (!usm.description.blank?) || (!usm.content.blank?) %>
-
内容:
<%= usm.description.nil? ? usm.content.html_safe : usm.description.html_safe %>
- <% end %>
-
- - <%= time_tag(usm.created_at).html_safe %>
-
+
+ <% if @message_alls.count >0 || @user_system_messages.count >0 %>
+ <% if params[:type].nil? || params[:type] == "unviewed" %>
+
<% end %>
- <% end %>
-
- <% unless @message_alls.nil? %>
- <% @message_alls.each do |ma| %>
- <%# 课程消息 %>
- <% if ma.class == CourseMessage %>
- <% if ma.course_message_type == "News" %>
-
- - <%=link_to image_tag(url_to_avatar(ma.course_message.author), :width => "30", :height => "30"),user_path(ma.course_message.author) %>
- - <%=link_to ma.course_message.author, user_path(ma.course_message.author), :class => "newsBlue homepageNewsPublisher" %>">发布了通知:
- -
- <%= link_to ma.course_message.title, {:controller => 'news', :action => 'show', :id => ma.course_message.id },
- :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
- :onmouseover =>"message_titile_show($(this),event)",
- :onmouseout => "message_titile_hide($(this))" %>
-
-
标题:<%= ma.course_message.title %>
- <% unless ma.course_message.description.nil? %>
-
内容:
-
<%= ma.course_message.description.html_safe %>
- <% end %>
-
- - <%= time_tag(ma.created_at).html_safe %>
-
- <% end %>
- <% if ma.course_message_type == "Comment" %>
-
- - <%=link_to image_tag(url_to_avatar(ma.course_message.author), :width => "30", :height => "30"), user_path(ma.course_message.author) %>
- - <%=link_to ma.course_message.author, user_path(ma.course_message.author), :class => "newsBlue homepageNewsPublisher" %>">评论了通知:
- -
- <%= link_to ma.course_message.comments.html_safe, {:controller => 'news', :action => 'show', :id => ma.course_message.commented.id },
- :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
- :onmouseover =>"message_titile_show($(this),event)",
- :onmouseout => "message_titile_hide($(this))" %>
-
-
标题:<%= ma.course_message.commented.title %>
- <% unless ma.course_message.comments.nil? %>
-
内容:
-
<%= ma.course_message.comments.html_safe %>
- <% end %>
-
- - <%= time_tag(ma.created_at).html_safe %>
-
- <% end %>
- <% if ma.course_message_type == "HomeworkCommon" && ma.status.nil? %>
-
- - <%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %>
- - <%=link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师", user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
- ">发布了课程作业:
-
- -
- <%= link_to ma.course_message.name, student_work_index_path(:homework => ma.course_message.id),
- :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
- :onmouseover =>"message_titile_show($(this),event)",
- :onmouseout => "message_titile_hide($(this))" %>
-
- <% if User.current.allowed_to?(:as_teacher,ma.course_message.course) %>
-
- <%= User.current.lastname + User.current.firstname %>老师您好!
- <%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师刚刚发布了一个作业:
-
-
课程名称:<%= ma.course_message.course.name %>
- (<%= ma.course_message.course.term %>)
-
作业标题:<%= ma.course_message.name %>
-
提交截止:<%= ma.course_message.end_time %> 24点
-
匿评开始:<%= ma.course_message.homework_detail_manual.evaluation_start %> 24点
-
匿评关闭:<%= ma.course_message.homework_detail_manual.evaluation_end %> 24点
-
迟交扣分:<%= ma.course_message.late_penalty %>分
-
缺评扣分:<%= ma.course_message.homework_detail_manual.absence_penalty %>分
-
- 您可以修改作业内容、评分规则、匿评过程等,谢谢!
-
- <% else %>
-
<%= User.current.lastname + User.current.firstname %>同学你好!<%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师刚刚发布了一个作业:
-
课程名称:<%= ma.course_message.course.name %>
- (<%= ma.course_message.course.term %>)
-
作业标题:<%= ma.course_message.name %>
-
提交截止:<%= ma.course_message.end_time %> 24点
-
匿评关闭:<%= ma.course_message.homework_detail_manual.evaluation_end %> 24点
-
迟交扣分:<%= ma.course_message.late_penalty %>分
-
- 请抓紧时间提交自己的作品,谢谢!
-
- <% end %>
-
- - <%= time_tag(ma.created_at).html_safe %>
-
- <% end %>
- <% if ma.course_message_type == "HomeworkCommon" && ma.status == 1 %>
-
- - <%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %>
- - <%=link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>">发布的作业:
- -
- <%= link_to ma.course_message.name, student_work_index_path(:homework => ma.course_message.id),
- :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
- :onmouseover => "message_titile_show($(this),event)",
- :onmouseout => "message_titile_hide($(this))" %>
-
-
- <% if User.current.members.where("course_id = ?", ma.course_message.course.id).first.roles.first.name == 'Student' %>
-
- <%= User.current.lastname + User.current.firstname %>同学您好!
- <%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师发布的作业截止日期快到了:
-
-
课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.term %>)
-
作业标题:<%= ma.course_message.name %>
-
提交截止:<%= ma.course_message.end_time %>@nbsp; 24点
-
匿评关闭:<%= ma.course_message.homework_detail_manual.evaluation_end %>@nbsp;@nbsp;24点
-
迟交扣分:<%= ma.course_message.late_penalty %>分
-
请同学们抓紧时间提交自己的作品,谢谢!
- <% else %>
-
<%= User.current.lastname + User.current.firstname %>老师您好!<%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师发布的作业截止日期快到了:
-
课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.term %>)
-
作业标题:<%= ma.course_message.name %>
-
提交截止:<%= ma.course_message.end_time %>@nbsp;@nbsp;24点
-
匿评开始:<%= ma.course_message.homework_detail_manual.evaluation_start %>@nbsp;@nbsp;24点
-
匿评关闭:<%= ma.course_message.homework_detail_manual.evaluation_end %>@nbsp;@nbsp;24点
-
迟交扣分:<%= ma.course_message.late_penalty %>分
-
缺评扣分:<%= ma.course_message.homework_detail_manual.absence_penalty %>分
-
您可以修改作业内容、评分规则、匿评过程等,谢谢!
- <% end %>
-
- - 截止时间快到了!
- - <%= time_tag(ma.created_at).html_safe %>
-
- <% end %>
-
- <% if ma.course_message_type == "HomeworkCommon" && ma.status == 2 %>
-
- -
- <%= link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %>
-
- -
- <%= link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师",
- user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
- ">启动了作业匿评:
-
- -
- <%= link_to "作业题目:" + ma.course_message.name, student_work_index_path(:homework => ma.course_message.id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
- :onmouseover => "message_titile_show($(this),event)",
- :onmouseout => "message_titile_hide($(this))" %>
-
-
-
- <%= User.current.lastname + User.current.firstname %><%= User.current.members.where("course_id=?", ma.course.id).first.roles.first.name == 'Student' ? '同学' : '老师' %>您好!
- <%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师开启了匿评,作业详情如下:
-
-
课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.term %>)
-
作业标题:<%= ma.course_message.name %>
-
- 截止日期:<%= ma.course_message.homework_detail_manual.evaluation_end %> 24点
-
-
- - <%= time_tag(ma.created_at).html_safe %>
-
- <% end %>
-
- <% if ma.course_message_type == "HomeworkCommon" && ma.status == 3 %>
-
- - <%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %>
- -
- <%=link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师",
- user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>">关闭了作业匿评:
- -
- <%= link_to "作业题目:" + ma.course_message.name, student_work_index_path(:homework => ma.course_message.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
- :onmouseover =>"message_titile_show($(this),event)",
- :onmouseout => "message_titile_hide($(this))"%>
-
-
-
- <%= User.current.lastname + User.current.firstname %><%= User.current.members.where("course_id=?", ma.course.id).first.roles.first.name == 'Student' ? '同学':'老师'%>您好!
- <%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师关闭了匿评,作业详情如下:
-
-
课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.term %>)
-
作业标题:<%= ma.course_message.name %>
-
- - <%= time_tag(ma.created_at).html_safe %>
-
- <% end %>
+ <%# 系统消息 %>
+ <% if params[:type] != 'system_messages' %>
+ <% @user_system_messages.each do |usm| %>
+
+ -
+
<%= image_tag("/images/logo.png", width: "30px", height: "30px", class: "mt3") %>
+
+ -
+ Trustie平台发布新消息:
+
+ 【系统消息】
+ -
+
+ <%= link_to usm.subject.blank? ? (usm.content.nil? ? usm.description.html_safe : usm.content.html_safe) : usm.subject, user_system_messages_path(User.current),
+ :id => "content_link_#{usm.id}",
+ :onmouseover =>"message_titile_show($(this),event);",
+ :onmouseout => "message_titile_hide($(this));"
+ %>
+
+
+ <% unless usm.subject.blank? %>
+
标题:<%= usm.subject %>
+ <% end %>
+ <% if (!usm.description.blank?) || (!usm.content.blank?) %>
+
内容:
<%= usm.description.nil? ? usm.content.html_safe : usm.description.html_safe %>
+ <% end %>
+
+ - <%= time_tag(usm.created_at).html_safe %>
+
+ <% end %>
+ <% end %>
+
+ <% unless @message_alls.nil? %>
+ <% @message_alls.each do |ma| %>
+ <%# 课程消息 %>
+ <%= render :partial => 'users/user_message_course', :locals => {:ma => ma} %>
- <% if ma.course_message_type == "HomeworkCommon" && ma.status == 4 %>
-
- -
- <%= link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %>
-
- -
- <%= link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师",
- user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
- ">启动作业匿评失败
-
- -
- <%= link_to "作业题目:" + ma.course_message.name, student_work_index_path(:homework => ma.course_message.id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
- :onmouseover => "message_titile_show($(this),event)",
- :onmouseout => "message_titile_hide($(this))" %>
-
-
-
- <%= User.current.lastname + User.current.firstname %><%= User.current.allowed_to?(:as_teacher, ma.course_message.course) ? '老师':'同学'%>您好!
- <%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师启动作业匿评失败,作业详情如下:
-
-
课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.term %>)
-
作业标题:<%= ma.course_message.name %>
-
- - <%= time_tag(ma.created_at).html_safe %>
-
- <% end %>
+
+ <%= render :partial => 'users/user_message_forge', :locals => {:ma => ma} %>
- <% if ma.course_message_type == "Poll" %>
-
- - <%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %>
- - <%=link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>">发布了问卷:
- -
- <%= link_to format_activity_title(" #{ma.course_message.polls_name.nil? ? "未命名问卷" : ma.course_message.polls_name}"), poll_path(ma.course_message.id),
- :class=>"#{ma.viewed==0?"newsBlack":"newsGrey"}",
- :onmouseover =>"message_titile_show($(this),event)",
- :onmouseout => "message_titile_hide($(this))" %>
-
- <%= ma.course_message.polls_name %>
-
- - <%= time_tag(ma.created_at).html_safe %>
-
- <% end %>
- <% if ma.course_message_type == "Message" %>
-
- - <%=link_to image_tag(url_to_avatar(ma.course_message.author), :width => "30", :height => "30"), user_path(ma.course_message.author) %>
- - <%=link_to ma.course_message.author, user_path(ma.course_message.author), :class => "newsBlue homepageNewsPublisher" %>"><%= ma.course_message.parent_id.nil? ? "发布了课程帖子:" : "评论了课程帖子:" %>
- <% if ma.course_message.parent_id.nil? %>
- -
- <%= link_to ma.course_message.subject, course_boards_path(ma.course_message.course, :parent_id => ma.course_message.parent_id ? ma.course_message.parent_id : ma.course_message.id, :topic_id => ma.course_message.id),
- :class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}",
- :onmouseover =>"message_titile_show($(this),event)",
- :onmouseout => "message_titile_hide($(this))" %>
-
-
主题:<%= ma.course_message.subject %>
- <% unless ma.course_message.content.nil? %>
-
内容:
-
<%= ma.course_message.content.html_safe %>
- <% end %>
-
- <% else %>
- -
- <%= link_to ma.course_message.content.html_safe, course_boards_path(ma.course_message.course, :parent_id => ma.course_message.parent_id ? ma.course_message.parent_id : ma.course_message.id, :topic_id => ma.course_message.id),
- :class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}",
- :onmouseover =>"message_titile_show($(this),event)",
- :onmouseout => "message_titile_hide($(this))" %>
-
-
主题:<%= ma.course_message.subject %>
- <% unless ma.course_message.content.nil? %>
-
内容:
-
<%= ma.course_message.content.html_safe %>
- <% end %>
-
- <% end %>
- - <%= time_tag(ma.created_at).html_safe %>
+
+ <%= render :partial => 'users/user_message_forum', :locals => {:ma => ma} %>
-
- <% end %>
- <% if ma.course_message_type == "StudentWorksScore" %>
-
- -
- <% if ma.course_message.reviewer_role == 3 %>
- <%=link_to image_tag(url_to_avatar(""), :width => "30", :height => "30") %>
- <% else %>
- <%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %>
- <% end %>
-
- -
- <% if ma.course_message.reviewer_role == 3 %>
- 匿名用户
- <% else %>
- <%= link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师",
- user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
- <% end %>
- ">
- <%= ma.status == 0 ? "评阅了您的作品:" : "重新评阅了您的作品:" %>
-
-
- -
- <% unless ma.content.nil? %>
- <%= link_to ma.content.html_safe, student_work_index_path(:homework => ma.course_message.student_work.homework_common_id),
- :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
- :onmouseover =>"message_titile_show($(this),event)",
- :onmouseout => "message_titile_hide($(this))" %>
-
- <%= ma.content.html_safe %>
-
课程名称:<%= ma.course.name %>(<%= ma.course.term %>)
-
作业标题:<%=ma.course_message.student_work.homework_common.name %>
-
- <% end %>
- - <%= time_tag(ma.created_at).html_safe %>
-
- <% end %>
- <% if ma.course_message_type == "JournalsForMessage" %>
- <% if ma.course_message.jour_type == 'Course' %>
- <% if params[:type] != 'homework' %>
-
- -
- <%= link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %>
-
- - <%= link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
- ">在课程中留言了:
-
- -
- <%= link_to ma.course_message.notes.html_safe, course_feedback_path(:id => ma.course_id),
- :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
- :onmouseover => "message_titile_show($(this),event)",
- :onmouseout => "message_titile_hide($(this))" %>
-
-
- <%= ma.course_message.notes.html_safe %>
-
- - <%= time_tag(ma.created_at).html_safe %>
-
- <% end %>
- <% else %>
-
- -
- <%= link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %>
-
- -
- <%= link_to ma.course_message.user.lastname + ma.course_message.user.firstname +
- "#{ma.course_message.user.members.where("course_id=?", ma.course.id).first.roles.first.name=='Student'?"同学":"老师"}",
- user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
- ">回复了作品评论:
-
- -
- <%= link_to ma.course_message.notes, student_work_index_path(:homework => ma.course_message.jour.student_work.homework_common_id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
- :onmouseover => "message_titile_show($(this),event)",
- :onmouseout => "message_titile_hide($(this))" %>
-
-
-
回复内容:
-
<%= ma.course_message.notes %>
-
您的评论:
-
<%= ma.course_message.jour.comment %>
-
课程名称:<%= ma.course.name %>(<%= ma.course.term %>)
-
作业标题:<%=ma.course_message.jour.student_work.homework_common.name %>
-
- - <%= time_tag(ma.created_at).html_safe %>
-
- <% end %>
- <% end %>
- <% end %>
-
- <% if ma.class == ForgeMessage %>
-
- <% if ma.forge_message_type == "AppliedProject" %>
-
- -
- <%=link_to image_tag(url_to_avatar(ma.forge_message.user), :width => "30", :height => "30"), user_path(ma.forge_message.user) %>
-
- -
- <%=link_to ma.forge_message.user, user_path(ma.forge_message.user), :class => "newsBlue homepageNewsPublisher" %>
- ">申请加入项目:
-
- -
- <%= link_to ma.project, settings_project_path(:id => ma.project, :tab => "members"), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
- :onmouseover => "message_titile_show($(this),event)",
- :onmouseout => "message_titile_hide($(this))" %>
-
-
- <%= ma.project %>
-
- - <%= time_tag(ma.created_at).html_safe %>
-
- <% end %>
-
- <% if ma.forge_message_type == "ProjectInvite" %>
- <% inviter = User.find(ma.forge_message_id) %>
-
- -
- <%=link_to image_tag(url_to_avatar(inviter), :width => "30", :height => "30"), user_path(inviter) %>
-
- -
- <%=link_to inviter, user_path(inviter), :class => "newsBlue homepageNewsPublisher" %>
- '>邀请你加入项目
-
- <% if ma.user.member_of?(ma.project) %>
- -
- <% else %>
-
-
- <% end %>
- <%= link_to ma.project, project_path(ma.project),
- :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
- :onmouseover => "message_titile_show($(this),event)",
- :onmouseout => "message_titile_hide($(this))" %>
-
-
- <%= ma.project %>
-
- <% unless User.current.member_of?(ma.project) %>
- -
- <%=link_to "同意加入", {:controller => 'projects', :action => 'member', :id => ma.project_id, :message_id =>ma.id, :key => ma.secret_key},
- :value => ma.secret_key,
- :class => "green_btn_cir ml10",
- :style => "color:#fff" %>
-
- <% end %>
- - <%= time_tag(ma.created_at).html_safe %>
-
- <% end %>
- <% if ma.forge_message_type == "Issue" %>
-
- -
- <%=link_to image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30"), user_path(ma.forge_message.author) %>
-
- -
- <%=link_to ma.forge_message.author, user_path(ma.forge_message.author), :class => "newsBlue homepageNewsPublisher" %>
- "><%= ma.forge_message.tracker_id == 5 ? "发布了周报:":"指派了问题给你:"%>
-
- -
- <%= link_to ma.forge_message.subject, issue_path(:id => ma.forge_message.id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
- :onmouseover => "message_titile_show($(this),event)",
- :onmouseout => "message_titile_hide($(this))" %>
-
-
-
主题:<%= ma.forge_message.subject %>
- <% unless ma.forge_message.description.nil? || ma.forge_message.description == "" %>
-
描述:
-
<%= ma.forge_message.description.html_safe %>
- <% end %>
-
- - <%= time_tag(ma.created_at).html_safe %>
-
- <% end %>
- <% if ma.forge_message_type == "Journal" %>
-
- -
- <%=link_to image_tag(url_to_avatar(ma.forge_message.user), :width => "30", :height => "30"), user_path(ma.forge_message.user) %>
-
- -
- <%=link_to ma.forge_message.user, user_path(ma.forge_message.user), :class => "newsBlue homepageNewsPublisher" %>
- ">
- 更新了问题状态:
-
- -
- <%= link_to ma.forge_message.journalized.subject,
- issue_path(:id => ma.forge_message.journalized_id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
- :onmouseover =>"message_titile_show($(this),event)",
- :onmouseout => "message_titile_hide($(this))" %>
-
-
-
问题标题:<%= ma.forge_message.journalized.subject %>
-
更新内容:
-
<%= get_issue_des_update(ma.forge_message).html_safe %>
-
- - <%= time_tag(ma.created_at).html_safe %>
-
- <% end %>
- <% if ma.forge_message_type == "Message" %>
-
- - <%=link_to image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30"), user_path(ma.forge_message.author) %>
- - <%=link_to ma.forge_message.author, user_path(ma.forge_message.author), :class => "newsBlue homepageNewsPublisher" %>
- "><%= ma.forge_message.parent_id.nil? ? "发布了项目帖子:" : "评论了项目帖子:" %>
- <% if ma.forge_message.parent_id.nil? %>
- -
- <%= link_to ma.forge_message.subject, project_boards_path(ma.forge_message.project,
- :parent_id => ma.forge_message.parent_id ? ma.forge_message.parent_id : ma.forge_message.id,
- :topic_id => ma.forge_message.id), :class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}",
- :onmouseover => "message_titile_show($(this),event)",
- :onmouseout => "message_titile_hide($(this))" %>
-
-
主题:<%= ma.forge_message.subject %>
- <% unless ma.forge_message.content.nil? %>
-
内容:
-
<%= ma.forge_message.content.html_safe %>
- <% end %>
-
- <% else %>
- -
- <%= link_to ma.forge_message.subject, project_boards_path(ma.forge_message.project,
- :parent_id => ma.forge_message.parent_id ? ma.forge_message.parent_id : ma.forge_message.id,
- :topic_id => ma.forge_message.id), :class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}",
- :onmouseover => "message_titile_show($(this),event)",
- :onmouseout => "message_titile_hide($(this))" %>
-
-
帖子主题:<%= ma.forge_message.subject %>
- <% unless ma.forge_message.content.nil? %>
-
评论内容:
-
<%= ma.forge_message.content.html_safe %>
- <% end %>
-
- <% end %>
- - <%= time_tag(ma.created_at).html_safe %>
-
- <% end %>
- <% if ma.forge_message_type == "News" %>
-
- -
- <%=link_to image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30"), user_path(ma.forge_message.author) %>
-
- -
- <%=link_to ma.forge_message.author, user_path(ma.forge_message.author), :class => "newsBlue homepageNewsPublisher" %>
- ">发布了新闻:
-
- -
- <%= link_to ("#{ma.forge_message.title.html_safe}"), {:controller => 'news', :action => 'show', :id => ma.forge_message.id},
- :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
- :onmouseover => "message_titile_show($(this),event)",
- :onmouseout => "message_titile_hide($(this))" %>
-
-
-
标题:<%= ma.forge_message.title %>
- <% unless ma.forge_message.description.nil? %>
-
内容:
-
<%= ma.forge_message.description.html_safe %>
- <% end %>
-
- - <%= time_tag(ma.created_at).html_safe %>
-
- <% end %>
- <% if ma.forge_message_type == "Comment" %>
-
- - <%=link_to image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30"), user_path(ma.forge_message.author) %>
- - <%=link_to ma.forge_message.author, user_path(ma.forge_message.author), :class => "newsBlue homepageNewsPublisher" %>
- ">评论了新闻:
- -
- <%= link_to "#{ma.forge_message.comments.html_safe}",
- {:controller => 'news', :action => 'show', :id => ma.forge_message.commented.id },:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
- :onmouseover => "message_titile_show($(this),event)",
- :onmouseout => "message_titile_hide($(this))" %>
-
-
-
新闻标题:<%= ma.forge_message.commented.title %>
-
评论内容:
-
<%= ma.forge_message.comments.html_safe %>
-
- - <%= time_tag(ma.created_at).html_safe %>
-
- <% end %>
- <% end %>
-
- <% if ma.class == MemoMessage %>
- <% if ma.memo_type == "Memo" %>
-
- -
- <%=link_to image_tag(url_to_avatar(ma.memo.author), :width => "30", :height => "30"), user_path(ma.memo.author) %>
-
- -
- <%=link_to ma.memo.author, user_path(ma.memo.author), :class => "newsBlue homepageNewsPublisher" %>
- " ><%= ma.memo.parent_id.nil? ? "在贴吧发布帖子:" : "回复了贴吧帖子:" %>
-
- <% if ma.memo.parent_id.nil? %>
- -
- <%= link_to ma.memo.subject, forum_memo_path(ma.memo.forum_id, ma.memo.parent_id ? ma.memo.parent_id: ma.memo.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
- :onmouseover =>"message_titile_show($(this),event)",
- :onmouseout => "message_titile_hide($(this))" %>
-
-
-
标题:<%= ma.memo.subject %>
- <% unless ma.memo.content.nil? %>
-
内容:
-
<%= ma.memo.content.html_safe %>
- <% end %>
-
- <% else %>
- -
- <%= link_to ma.memo.content.html_safe, forum_memo_path(ma.memo.forum_id, ma.memo.parent_id ? ma.memo.parent_id: ma.memo.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
- :onmouseover =>"message_titile_show($(this),event)",
- :onmouseout => "message_titile_hide($(this))" %>
-
-
-
标题:<%= ma.memo.subject %>
- <% unless ma.memo.content.nil? %>
-
内容:
-
<%= ma.memo.content.html_safe %>
- <% end %>
-
- <% end %>
- - <%= time_tag(ma.memo.created_at).html_safe %>
-
- <% end %>
- <% end %>
-
- <% if ma.class == UserFeedbackMessage %>
- <% if ma.journals_for_message_type == "JournalsForMessage" %>
-
- -
- <%=link_to image_tag(url_to_avatar(ma.journals_for_message.user), :width => "30", :height => "30"), user_path(ma.journals_for_message.user) %>
-
- -
- <%=link_to ma.journals_for_message.user, user_path(ma.journals_for_message.user), :class => "newsBlue homepageNewsPublisher" %>
- "><%= ma.journals_for_message.reply_id == 0 ? "给你留言了:" : "回复了你的留言:" %>
-
- -
- <%= link_to ma.journals_for_message.notes.html_safe, feedback_path(ma.journals_for_message.jour_id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
- :onmouseover =>"message_titile_show($(this),event)",
- :onmouseout => "message_titile_hide($(this))" %>
-
-
- <% if ma.journals_for_message.reply_id == 0 %>
- <%= ma.journals_for_message.notes.html_safe %>
- <% else %>
-
您的留言:
-
<%= JournalsForMessage.find(ma.journals_for_message.m_reply_id).notes.html_safe %>
-
回复内容:
-
<%= ma.journals_for_message.notes.html_safe %>
- <% end %>
-
- - <%= time_tag(ma.journals_for_message.created_on).html_safe %>
+
+ <%= render :partial => 'users/user_message_userfeedaback', :locals => {:ma => ma} %>
-
- <% end %>
<% end %>
+
+ <%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%>
+
<% end %>
-
- <%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%>
-
+
+ <% else %>
+
您目前还没有相关消息!
<% end %>
-
-
-<% else %>
-
您目前还没有相关消息!
-<% end %>
-
-
+
+