From 55983093fdc4a5ed447b3dcad77fc227372fcf30 Mon Sep 17 00:00:00 2001
From: alan <547533434@qq.com>
Date: Fri, 11 Mar 2016 09:40:10 +0800
Subject: [PATCH 01/10] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=AF=BE=E7=A8=8B?=
=?UTF-8?q?=E5=8F=8D=E9=A6=88=E9=A1=B5=E9=9D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/courses_controller.rb | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb
index 708ac9a14..c8d5fbce2 100644
--- a/app/controllers/courses_controller.rb
+++ b/app/controllers/courses_controller.rb
@@ -888,10 +888,7 @@ class CoursesController < ApplicationController
end
def feedback
- @course.journals_for_messages.each do |messages|
- query = messages.course_messages.where("user_id = ?", User.current.id)
- query.update_all(:viewed => true);
- end
+ CourseMessage.where("user_id = ? and course_id = ?", User.current, @course.id).update_all(:viewed => true)
if (User.current.admin? || @course.is_public == 1 || (@course.is_public == 0 && User.current.member_of_course?(@course)))
page = params[:page]
From 1f5c90185a7fccefd3af4256f32c11f3bb0bd5b8 Mon Sep 17 00:00:00 2001
From: alan <547533434@qq.com>
Date: Fri, 11 Mar 2016 13:14:32 +0800
Subject: [PATCH 02/10] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E3=80=8A=E9=A1=B6?=
=?UTF-8?q?=E9=83=A8=E6=90=9C=E7=B4=A2=E2=80=9C=E5=88=86=E6=9E=90=E2=80=9D?=
=?UTF-8?q?=E6=8A=A5404=E9=94=99=E8=AF=AF=E3=80=8B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../welcome/_search_all_results.html.erb | 26 ++++++++++++++-----
1 file changed, 19 insertions(+), 7 deletions(-)
diff --git a/app/views/welcome/_search_all_results.html.erb b/app/views/welcome/_search_all_results.html.erb
index 4ed9fba33..51835106b 100644
--- a/app/views/welcome/_search_all_results.html.erb
+++ b/app/views/welcome/_search_all_results.html.erb
@@ -38,10 +38,19 @@
-
@@ -65,8 +56,7 @@
<%= image_tag("search_icon_03.png", :width=>"8", :height=>"16" ,:class=>"fl") %>资源
- <%= item_author = User.where("id = ?", item.author_id).first if item.author_id? %>
- - 发布者:<%= item_author.nil? ? '无' : item_author.login%>(<%= item_author.realname unless item_author.nil? %>)
+
- 发布者:<%= User.find(item.author_id).login%>(<%= User.find(item.author_id).realname%>)
发布时间:<%= format_date(item.created_on)%>
下载次数:<%= item.downloads%>次
@@ -75,7 +65,7 @@
- <% when 'project'%>
+ <% when 'project'%>
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => activity} %>
From 4d82f0c959e2f3c0f7793bc6389894a359a8dd9b Mon Sep 17 00:00:00 2001
From: alan <547533434@qq.com>
Date: Wed, 16 Mar 2016 16:03:53 +0800
Subject: [PATCH 07/10] =?UTF-8?q?=E5=9C=A8=E4=B8=AA=E4=BA=BA=E5=8A=A8?=
=?UTF-8?q?=E6=80=81=E3=80=81=E9=A1=B9=E7=9B=AE=E5=8A=A8=E6=80=81=E4=BB=A5?=
=?UTF-8?q?=E5=8F=8A=E9=A1=B9=E7=9B=AE=E9=97=AE=E9=A2=98=E8=B7=9F=E8=B8=AA?=
=?UTF-8?q?=E9=A1=B5=E9=9D=A2=E3=80=8Aissue=E5=8A=A8=E6=80=81=E8=A6=81?=
=?UTF-8?q?=E5=8F=B3=E4=B8=8A=E8=A7=92=E6=98=BE=E7=A4=BA=E5=8A=9F=E8=83=BD?=
=?UTF-8?q?=E8=8F=9C=E5=8D=95=E3=80=8B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/issues_controller.rb | 3 +++
app/views/issues/show.html.erb | 3 +++
app/views/users/_project_issue.html.erb | 17 +++++++++++++++++
3 files changed, 23 insertions(+)
diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb
index eb78c4c5b..f0148fc71 100644
--- a/app/controllers/issues_controller.rb
+++ b/app/controllers/issues_controller.rb
@@ -118,6 +118,9 @@ class IssuesController < ApplicationController
end
def show
+ # 打开编辑内容
+ @is_edit = true unless params[:edit].nil?
+
# 当前用户查看指派给他的缺陷消息,则设置消息为已读
query = ForgeMessage.where("forge_message_type =? and user_id =? and forge_message_id =?", "Issue", User.current, @issue).first
query.update_attribute(:viewed, true) unless query.nil?
diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb
index b9d463855..4b82f8665 100644
--- a/app/views/issues/show.html.erb
+++ b/app/views/issues/show.html.erb
@@ -9,6 +9,9 @@
$(function(){
$("#RSide").removeAttr("id");
$("#Container").css("width","1000px");
+ if(<%= @is_edit %>) {
+ issueEditShow();
+ }
});
+
<% case activity.tracker_id %>
<% when 1%>
From a4e2fd741e671fb4e5d0320f5b174e44a0f8e185 Mon Sep 17 00:00:00 2001
From: alan <547533434@qq.com>
Date: Thu, 17 Mar 2016 14:13:29 +0800
Subject: [PATCH 08/10] =?UTF-8?q?=E5=88=A0=E9=99=A4issue=EF=BC=8C=E8=BF=94?=
=?UTF-8?q?=E5=9B=9E=E9=A1=B5=E9=9D=A2=E4=B8=8D=E5=8F=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Gemfile | 1 +
app/controllers/issues_controller.rb | 9 ++++++++-
app/helpers/routes_helper.rb | 14 +++++++++++---
app/views/projects/_project_activities.html.erb | 2 +-
app/views/users/_project_issue.html.erb | 8 +++++++-
app/views/users/_user_activities.html.erb | 2 +-
app/views/users/show.html.erb | 3 +--
7 files changed, 30 insertions(+), 9 deletions(-)
diff --git a/Gemfile b/Gemfile
index c739e1085..645c7b849 100644
--- a/Gemfile
+++ b/Gemfile
@@ -36,6 +36,7 @@ gem 'chinese_pinyin'
# gem 'progress_bar'
gem 'ansi'
+gem 'debugger'
gem 'kaminari'
gem 'elasticsearch-model'
gem 'elasticsearch-rails'
diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb
index f0148fc71..44f0d15f4 100644
--- a/app/controllers/issues_controller.rb
+++ b/app/controllers/issues_controller.rb
@@ -390,6 +390,9 @@ class IssuesController < ApplicationController
end
def destroy
+ # 增加删除页面类型,如果是个人主页,则返回该主页,项目动态则返回项目动态页眉
+ page_classify = params[:page_classify] unless params[:page_classify].nil?
+ page_id = params[:page_id] unless params[:page_id].nil?
@hours = TimeEntry.sum(:hours, :conditions => ['issue_id IN (?)', @issues]).to_f
if @hours > 0
case params[:todo]
@@ -418,7 +421,11 @@ class IssuesController < ApplicationController
end
end
respond_to do |format|
- format.html { redirect_back_or_default _project_issues_path(@project) }
+ if page_classify
+ format.html { redirect_back_or_default _project_issues_path(@project, page_classify, page_id) }
+ else
+ format.html { redirect_back_or_default _project_issues_path(@project) }
+ end
format.api { render_api_ok }
end
end
diff --git a/app/helpers/routes_helper.rb b/app/helpers/routes_helper.rb
index 15c809964..8d08f22da 100644
--- a/app/helpers/routes_helper.rb
+++ b/app/helpers/routes_helper.rb
@@ -22,10 +22,18 @@ module RoutesHelper
# Returns the path to project issues or to the cross-project
# issue list if project is nil
def _project_issues_path(project, *args)
- if project
- project_issues_path(project, *args)
+ if args[0].to_s.include? '_page'
+ if args[0].to_s == "user_page"
+ user_activities_path(args[1].to_i)
+ else
+ project_path(project)
+ end
else
- issues_path(*args)
+ if project
+ project_issues_path(project, *args)
+ else
+ issues_path(*args)
+ end
end
end
diff --git a/app/views/projects/_project_activities.html.erb b/app/views/projects/_project_activities.html.erb
index c036633a5..dd9935634 100644
--- a/app/views/projects/_project_activities.html.erb
+++ b/app/views/projects/_project_activities.html.erb
@@ -66,7 +66,7 @@
<%= render :partial => 'projects/project_create', :locals => {:activity => activity, :user_activity_id => activity.id} %>
<% when "Issue" %>
- <%= render :partial => 'users/project_issue', :locals => {:activity => activity.forge_act, :user_activity_id => activity.id} %>
+ <%= render :partial => 'users/project_issue', :locals => {:activity => activity.forge_act, :user_activity_id => activity.id, :project_id => activity.project_id} %>
<% when "Message" %>
diff --git a/app/views/users/_project_issue.html.erb b/app/views/users/_project_issue.html.erb
index 090098722..5d472497d 100644
--- a/app/views/users/_project_issue.html.erb
+++ b/app/views/users/_project_issue.html.erb
@@ -21,7 +21,13 @@
<%= link_to l(:button_edit), issue_path(activity.id, :edit => 'true'), :class => 'postOptionLink', :accesskey => accesskey(:edit) if activity.editable? && User.current.allowed_to?(:edit_issues, activity.project) %>
- <%= link_to l(:button_delete), issue_path(activity.id), :data => {:confirm => issues_destroy_confirmation_message(activity)}, :method => :delete, :class => 'postOptionLink' if User.current.allowed_to?(:delete_issues, activity.project) %>
+ <% if !defined?(project_id) && !defined?(user_id) %>
+ <%= link_to l(:button_delete), issue_path(activity.id), :data => {:confirm => issues_destroy_confirmation_message(activity)}, :method => :delete, :class => 'postOptionLink' if User.current.allowed_to?(:delete_issues, activity.project) %>
+ <% elsif defined?(project_id) %>
+ <%= link_to l(:button_delete), issue_path(activity.id, :page_classify => "project_page", :page_id => project_id), :data => {:confirm => issues_destroy_confirmation_message(activity)}, :method => :delete, :class => 'postOptionLink' if User.current.allowed_to?(:delete_issues, activity.project) %>
+ <% elsif defined?(user_id) %>
+ <%= link_to l(:button_delete), issue_path(activity.id, :page_classify => "user_page", :page_id => user_id), :data => {:confirm => issues_destroy_confirmation_message(activity)}, :method => :delete, :class => 'postOptionLink' if User.current.allowed_to?(:delete_issues, activity.project) %>
+ <% end %>
<%= link_to l(:button_copy), project_copy_issue_path(activity.project, activity), :class => 'postOptionLink' if User.current.allowed_to?(:add_issues, activity.project) %>
diff --git a/app/views/users/_user_activities.html.erb b/app/views/users/_user_activities.html.erb
index 0e55c246c..01711ace3 100644
--- a/app/views/users/_user_activities.html.erb
+++ b/app/views/users/_user_activities.html.erb
@@ -89,7 +89,7 @@
<% if act %>
<% case user_activity.act_type.to_s %>
<% when 'Issue' %>
- <%= render :partial => 'project_issue', :locals => {:activity => act,:user_activity_id =>user_activity.id} %>
+ <%= render :partial => 'project_issue', :locals => {:activity => act,:user_activity_id =>user_activity.id, :user_id => user_id} %>
<% when 'Message' %>
<%= render :partial => 'project_message', :locals => {:activity => act,:user_activity_id =>user_activity.id,:is_course=>0,:is_board=>0} %>
<% when 'ProjectCreateInfo'%>
diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb
index a56ca7b48..fa4eaacbe 100644
--- a/app/views/users/show.html.erb
+++ b/app/views/users/show.html.erb
@@ -45,5 +45,4 @@
<% homepage = BlogComment.find(@user.blog.homepage_id) %>
<%= render :partial => 'blogs/homepage', :locals => {:activity => homepage, :user_activity_id => homepage.id} %>
<% end %>
-
-<%= render :partial => 'users/user_activities', :locals => {:user_activities => @user_activities,:page => 0,:type => @type} %>
+<%= render :partial => 'users/user_activities', :locals => {:user_activities => @user_activities,:page => 0,:type => @type, :user_id => (@user.type == "AnonymousUser" ? User.current.id : @user.id)} %>
From 9265186307db170492b41d7f181a4d394673fd47 Mon Sep 17 00:00:00 2001
From: alan <547533434@qq.com>
Date: Thu, 17 Mar 2016 14:36:05 +0800
Subject: [PATCH 09/10] =?UTF-8?q?=E4=BF=AE=E6=94=B9user=E5=8A=A8=E6=80=81?=
=?UTF-8?q?=E4=B8=ADissue=E8=A1=8C=E9=AB=98=EF=BC=8C=E4=BD=BF=E4=B9=8B?=
=?UTF-8?q?=E4=B8=8Eproject=E4=B8=AD=E7=9A=84=E4=B8=80=E6=A0=B7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/stylesheets/new_user.css | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css
index 4669d043e..8aa15d0f7 100644
--- a/public/stylesheets/new_user.css
+++ b/public/stylesheets/new_user.css
@@ -845,7 +845,7 @@ a.sortArrowActiveU {background:url(images/post_image_list.png) -17px -20px no-re
.postDetailTitle {width:580px; max-width:580px; margin-bottom:5px;}
.postDetailDes {width:580px; max-width:580px; margin-bottom:6px; color:#888888;display:block;overflow:hidden;word-break:keep-all;text-overflow:ellipsis;}
.postDetailDes p,div,em{word-break: break-all;word-wrap: break-word;}
-.homepagePostIntro p,.homepagePostIntro div,.homepagePostIntro em, .homepagePostIntro span{text-align: justify; text-justify:inter-ideograph; word-break: normal !important; word-wrap: break-word !important; line-height: 23px !important;}
+.homepagePostIntro p,.homepagePostIntro div,.homepagePostIntro em, .homepagePostIntro span{text-align: justify; text-justify:inter-ideograph; word-break: normal !important; word-wrap: break-word !important; line-height: 18px !important;}
.postDetailCreater {color:#888888; font-size:12px; float:left; margin-right:25px;}
.postDetailDate {color:#888888; font-size:12px; float:left;}
.postDetailReply { margin-top:28px; color:#888888; float:right;display: inline}
From 8e41b19563c392533e62eb39a8bc128b3ba7cdbb Mon Sep 17 00:00:00 2001
From: alan <547533434@qq.com>
Date: Thu, 17 Mar 2016 15:09:08 +0800
Subject: [PATCH 10/10] =?UTF-8?q?=E6=B6=88=E6=81=AF=E5=88=97=E8=A1=A8?=
=?UTF-8?q?=E5=8F=96=E6=B6=88tip?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/users/_user_at_message.html.erb | 12 +-
app/views/users/_user_message_course.html.erb | 147 ++++++++++--------
app/views/users/_user_message_forge.html.erb | 75 +++++----
app/views/users/_user_message_forum.html.erb | 14 +-
app/views/users/_user_message_system.html.erb | 7 +-
.../_user_message_userfeedaback.html.erb | 6 +-
6 files changed, 143 insertions(+), 118 deletions(-)
diff --git a/app/views/users/_user_at_message.html.erb b/app/views/users/_user_at_message.html.erb
index d8649cabe..089171c3d 100644
--- a/app/views/users/_user_at_message.html.erb
+++ b/app/views/users/_user_at_message.html.erb
@@ -8,15 +8,15 @@
<% if ma.at_message_type == "Message" && !ma.at_message.course.nil? %>
<%= link_to ma.subject.html_safe, course_boards_path(ma.at_message.course,
:parent_id => ma.at_message.parent_id ? ma.at_message.parent_id : ma.at_message.id, :topic_id => ma.at_message.id),
- :class =>"#{ma.viewed? ? "newsGrey" : "newsBlack"}",
- :onmouseover =>"message_titile_show($(this),event)",
- :onmouseout => "message_titile_hide($(this))" %>
+ :class =>"#{ma.viewed? ? "newsGrey" : "newsBlack"}" %>
+
+
<% elsif ma.at_message_type == "Message" && !ma.at_message.project.nil? %>
<%= link_to ma.subject.html_safe, project_boards_path(ma.at_message.project,
:parent_id => ma.at_message.parent_id ? ma.at_message.parent_id : ma.at_message.id, :topic_id => ma.at_message.id),
- :class =>"#{ma.viewed? ? "newsGrey" : "newsBlack"}",
- :onmouseover =>"message_titile_show($(this),event)",
- :onmouseout => "message_titile_hide($(this))" %>
+ :class =>"#{ma.viewed? ? "newsGrey" : "newsBlack"}" %>
+
+
<% else %>
<%= link_to ma.subject.html_safe, ma.url, :class =>"#{ma.viewed? ? "newsGrey" : "newsBlack"}", :onmouseover =>"message_titile_show($(this),event)", :onmouseout => "message_titile_hide($(this))" %>
<% end %>
diff --git a/app/views/users/_user_message_course.html.erb b/app/views/users/_user_message_course.html.erb
index 62568d505..458ba4551 100644
--- a/app/views/users/_user_message_course.html.erb
+++ b/app/views/users/_user_message_course.html.erb
@@ -5,9 +5,10 @@
<%=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))" %>
+ :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
+
+
+
标题:<%= ma.course_message.title %>
<% unless ma.course_message.description.nil? %>
@@ -24,9 +25,10 @@
<%=link_to ma.course_message.author, user_path(ma.course_message.author), :class => "newsBlue homepageNewsPublisher" %>">评论了通知:
<%= link_to ma.course_message.commented.title, {: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))" %>
+ :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
+
+
+
评论对象:<%= ma.course_message.commented.title %>
<% unless ma.course_message.comments.nil? %>
@@ -46,14 +48,14 @@
<% if !User.current.allowed_to?(:as_teacher, ma.course_message.course) && cur_user_works_for_homework(ma.course_message).nil? %>
<%= link_to "作业标题:" + ma.course_message.name, new_student_work_path(:homework => ma.course_message.id),
- :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
- :onmouseover =>"message_titile_show($(this),event)",
- :onmouseout => "message_titile_hide($(this))" %>
+ :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
+
+
<% else %>
<%= 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))" %>
+ :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
+
+
<% end %>
@@ -104,9 +106,9 @@
">发布的作业:
<%= 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))" %>
+ :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
+
+
<% if !User.current.allowed_to?(:as_teacher,ma.course_message.course) %>
@@ -173,9 +175,9 @@
<%=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))"%>
+ <%= link_to "作业标题:" + ma.course_message.name, student_work_index_path(:homework => ma.course_message.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
+
+
@@ -208,9 +210,9 @@
">启动作业匿评失败
- <%= link_to truncate(ma.course_message.name,:length=>25)+'(失败原因:提交作品的人数低于2人)', student_work_index_path(:homework => ma.course_message.id), :class => "#{ma.viewed == 0 ? "c_red" : "newsGrey "}",
- :onmouseover => "message_titile_show($(this),event)",
- :onmouseout => "message_titile_hide($(this))" %>
+ <%= link_to truncate(ma.course_message.name,:length=>25)+'(失败原因:提交作品的人数低于2人)', student_work_index_path(:homework => ma.course_message.id), :class => "#{ma.viewed == 0 ? "c_red" : "newsGrey "}" %>
+
+
@@ -234,9 +236,10 @@
<%=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))" %>
+ :class=>"#{ma.viewed==0?"newsBlack":"newsGrey"}" %>
+
+
+
<%= ma.course_message.polls_name %>
@@ -252,9 +255,10 @@
<% 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))" %>
+ :class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}" %>
+
+
+
主题:<%= ma.course_message.subject %>
<% unless ma.course_message.content.nil? %>
@@ -265,9 +269,10 @@
<% 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))" %>
+ :class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}" %>
+
+
+
主题:<%= ma.course_message.subject %>
<% unless ma.course_message.content.nil? %>
@@ -303,9 +308,10 @@
<% 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))" %>
+ :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
+
+
+
<%= User.current.show_name %>同学您好!
@@ -341,9 +347,10 @@
<%= 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))" %>
+ :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
+
+
+
<%= ma.course_message.notes.html_safe %>
@@ -363,9 +370,10 @@
">回复了作品评论:
- <%= 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))" %>
+ <%= 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"}" %>
+
+
+
@@ -393,9 +401,10 @@
<%= link_to "作业标题:" + ma.course_message.homework_common.name, student_work_index_path(:homework => ma.course_message.homework_common_id),
- :class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}",
- :onmouseover => "message_titile_show($(this),event)",
- :onmouseout => "message_titile_hide($(this))" %>
+ :class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}" %>
+
+
+
@@ -427,9 +436,10 @@
<%= link_to "课程名称:" + ma.course_message.name, course_path(ma.course_message),
- :class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}",
- :onmouseover => "message_titile_show($(this),event)",
- :onmouseout => "message_titile_hide($(this))" %>
+ :class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}" %>
+
+
+
<%= User.current.lastname + User.current.firstname %>老师您好!您成功创建了一个课程,详情如下:
@@ -459,9 +469,10 @@
<%= link_to User.find(ma.course_message_id).name+"申请成为课程\""+"#{Course.find(ma.course_id).name}"+"\"的"+"#{ma.content == '9' ? "教师" : "教辅"}", user_path(User.find(ma.course_message_id), :course_id => ma.course_id),
- :class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}",
- :onmouseover => "message_titile_show($(this),event)",
- :onmouseout => "message_titile_hide($(this))" %>
+ :class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}" %>
+
+
+
@@ -502,9 +513,10 @@
'您申请成为课程"'+Course.find(ma.course_id).name+'"的'+(ma.content == '9' ? '老师' : '教辅')+'申请已通过'
:
'您申请成为课程"'+Course.find(ma.course_id).name+'"的'+(ma.content == '9' ? '老师' : '教辅')+'的申请被拒绝', course_path(Course.find(ma.course_id)),
- :class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}",
- :onmouseover => "message_titile_show($(this),event)",
- :onmouseout => "message_titile_hide($(this))" %>
+ :class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}" %>
+
+
+
@@ -531,9 +543,10 @@
">将您加入了课程:
- <%= link_to ma.course.name, course_member_path(ma.course), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
- :onmouseover => "message_titile_show($(this),event)",
- :onmouseout => "message_titile_hide($(this))" %>
+ <%= link_to ma.course.name, course_member_path(ma.course), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
+
+
+
<% if ma.course.is_public? || User.current.member_of_course?(ma.course) || User.current.admin? %>
@@ -564,9 +577,10 @@
">您增加了新的课程成员:
- <%= link_to User.find(ma.course_message_id).login+"("+(User.find(ma.course_message_id).realname ? User.find(ma.course_message_id).realname : User.find(ma.course_message_id).login) +")", user_path(ma.course_message_id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
- :onmouseover => "message_titile_show($(this),event)",
- :onmouseout => "message_titile_hide($(this))" %>
+ <%= link_to User.find(ma.course_message_id).login+"("+(User.find(ma.course_message_id).realname ? User.find(ma.course_message_id).realname : User.find(ma.course_message_id).login) +")", user_path(ma.course_message_id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
+
+
+
<% if ma.course.is_public? || User.current.member_of_course?(ma.course) || User.current.admin? %>
@@ -597,9 +611,10 @@
">将您移出了课程:
- <%= link_to ma.course.name, member_course_path(ma.course), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
- :onmouseover => "message_titile_show($(this),event)",
- :onmouseout => "message_titile_hide($(this))" %>
+ <%= link_to ma.course.name, member_course_path(ma.course), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
+
+
+
<% if ma.course.is_public? || User.current.member_of?(ma.course) || User.current.admin? %>
@@ -628,9 +643,9 @@
<%=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.exercise_name, exercise_path(:id => ma.course_message.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
- :onmouseover =>"message_titile_show($(this),event)",
- :onmouseout => "message_titile_hide($(this))"%>
+ <%= link_to "测验题目:" + ma.course_message.exercise_name, exercise_path(:id => ma.course_message.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
+
+
@@ -665,9 +680,9 @@
<%=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.exercise_name, exercise_path(:id => ma.course_message.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
- :onmouseover =>"message_titile_show($(this),event)",
- :onmouseout => "message_titile_hide($(this))"%>
+ <%= link_to "测验题目:" + ma.course_message.exercise_name, exercise_path(:id => ma.course_message.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
+
+
diff --git a/app/views/users/_user_message_forge.html.erb b/app/views/users/_user_message_forge.html.erb
index 967941a88..574411055 100644
--- a/app/views/users/_user_message_forge.html.erb
+++ b/app/views/users/_user_message_forge.html.erb
@@ -10,9 +10,10 @@
">申请加入项目:
- <%= 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))" %>
+ <%= link_to ma.project, settings_project_path(:id => ma.project, :tab => "members"), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
+
+
+
<%= ma.project %>
@@ -32,9 +33,10 @@
">将您加入了项目:
- <%= link_to ma.project, project_member_path(ma.project), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
- :onmouseover => "message_titile_show($(this),event)",
- :onmouseout => "message_titile_hide($(this))" %>
+ <%= link_to ma.project, project_member_path(ma.project), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
+
+
+
<% if ma.project.is_public? || User.current.member_of?(ma.project) || User.current.admin? %>
@@ -67,9 +69,10 @@
">将您移出了项目:
- <%= link_to ma.project, member_project_path(ma.project), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
- :onmouseover => "message_titile_show($(this),event)",
- :onmouseout => "message_titile_hide($(this))" %>
+ <%= link_to ma.project, member_project_path(ma.project), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
+
+
+
<% if ma.project.is_public? || User.current.member_of?(ma.project) || User.current.admin? %>
@@ -107,9 +110,9 @@
<% 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))" %>
+ :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
+
+
<%= ma.project %>
@@ -136,9 +139,10 @@
"><%= 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))" %>
+ <%= link_to ma.forge_message.subject, issue_path(:id => ma.forge_message.id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
+
+
+
主题:<%= ma.forge_message.subject %>
@@ -160,9 +164,10 @@
"><%= 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))" %>
+ <%= link_to ma.forge_message.subject, issue_path(:id => ma.forge_message.id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
+
+
+
主题:<%= ma.forge_message.subject %>
@@ -187,9 +192,10 @@
<%= 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))" %>
+ issue_path(:id => ma.forge_message.journalized_id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
+
+
+
问题标题:<%= ma.forge_message.journalized.subject %>
@@ -208,9 +214,10 @@
<%= 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))" %>
+ :topic_id => ma.forge_message.id), :class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}" %>
+
+
+
主题:<%= ma.forge_message.subject %>
<% unless ma.forge_message.content.nil? %>
@@ -222,9 +229,10 @@
<%= 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))" %>
+ :topic_id => ma.forge_message.id), :class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}" %>
+
+
+
帖子主题:<%= ma.forge_message.subject %>
<% unless ma.forge_message.content.nil? %>
@@ -247,9 +255,10 @@
<%= 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))" %>
+ :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
+
+
+
标题:<%= ma.forge_message.title %>
@@ -268,9 +277,9 @@
">评论了新闻:
<%= link_to "#{ma.forge_message.commented.title}",
- {: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))" %>
+ {:controller => 'news', :action => 'show', :id => ma.forge_message.commented.id },:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
+
+
新闻标题:<%= ma.forge_message.commented.title %>
diff --git a/app/views/users/_user_message_forum.html.erb b/app/views/users/_user_message_forum.html.erb
index 102b4a155..d18292068 100644
--- a/app/views/users/_user_message_forum.html.erb
+++ b/app/views/users/_user_message_forum.html.erb
@@ -10,9 +10,10 @@
<% 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))" %>
+ <%= 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"}" %>
+
+
+
标题:<%= ma.memo.subject %>
@@ -23,9 +24,10 @@
<% 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))" %>
+ <%= 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"}" %>
+
+
+
标题:<%= ma.memo.subject %>
diff --git a/app/views/users/_user_message_system.html.erb b/app/views/users/_user_message_system.html.erb
index e3037f227..a80d35bd4 100644
--- a/app/views/users/_user_message_system.html.erb
+++ b/app/views/users/_user_message_system.html.erb
@@ -11,10 +11,9 @@
<%= link_to ma.subject.blank? ? (ma.content.nil? ? ma.description.html_safe : ma.content.html_safe) : ma.subject, user_system_messages_path(User.current),
- :id => "content_link_#{ma.id}",
- :onmouseover =>"message_titile_show($(this),event);",
- :onmouseout => "message_titile_hide($(this));"
- %>
+ :id => "content_link_#{ma.id}" %>
+
+
<% unless ma.subject.blank? %>
diff --git a/app/views/users/_user_message_userfeedaback.html.erb b/app/views/users/_user_message_userfeedaback.html.erb
index 6bc169f21..1f200eaed 100644
--- a/app/views/users/_user_message_userfeedaback.html.erb
+++ b/app/views/users/_user_message_userfeedaback.html.erb
@@ -9,9 +9,9 @@
"><%= ma.journals_for_message.reply_id == 0 ? "给你留言了:" : "回复了你的留言:" %>
- <%= link_to ma.journals_for_message.notes.gsub("","").gsub("
","").gsub("
","").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))" %>
+ <%= link_to ma.journals_for_message.notes.gsub("","").gsub("
","").gsub("
","").html_safe, feedback_path(ma.journals_for_message.jour_id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}"%>
+
+
<% if ma.journals_for_message.reply_id == 0 %>