diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
index 1ffc4f0d7..1da7355f4 100644
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -433,6 +433,7 @@ class UsersController < ApplicationController
render_404
return
end
+
@message_alls = paginateHelper @message_alls, 25
respond_to do |format|
format.html{render :layout=>'new_base_user'}
diff --git a/app/helpers/users_helper.rb b/app/helpers/users_helper.rb
index e5dcfc2df..b0570bb24 100644
--- a/app/helpers/users_helper.rb
+++ b/app/helpers/users_helper.rb
@@ -56,12 +56,8 @@ module UsersHelper
# 用户项目总数
def user_project_count
- @my_projects = @user.projects.where("projects.user_id = #{@user.id}").select("projects.*,(SELECT MAX(updated_at) FROM `forge_activities` WHERE forge_activities.project_id = projects.id) AS updatetime").order("updatetime DESC")
- @my_projects_count = @my_projects.count
- @my_joined_projects = @user.projects.where("projects.user_id != #{@user.id}").select("projects.*,(SELECT MAX(updated_at) FROM `forge_activities` WHERE forge_activities.project_id = projects.id) AS updatetime").order("updatetime DESC")
- @my_joined_projects_count = @my_joined_projects.count
-
- @my_project_total = @my_projects_count + @my_joined_projects_count
+ @my_projects = @user.projects.select("projects.*,(SELECT MAX(updated_at) FROM `forge_activities` WHERE forge_activities.project_id = projects.id) AS updatetime").order("updatetime DESC")
+ @my_project_total = @my_projects.count
end
# 用户的课程总数
@@ -131,13 +127,13 @@ module UsersHelper
def pull_request_message_status ma
case ma.status
when 1
- "创建了PullRequest:"
+ "创建了PullRequest:"
when 2
- "接受了PullRequest:"
+ "接受了PullRequest:"
when 3
- "重新打开了PullRequest:"
+ "重新打开了PullRequest:"
when 4
- "关闭了PullRequest:"
+ "关闭了PullRequest:"
end
end
@@ -172,11 +168,11 @@ module UsersHelper
def applied_project_tip applied_message
case applied_message.status
when 4
- "拒绝申请加入项目:"
+ "拒绝申请加入:"
when 5,3,2,1,7
- "申请加入项目:"
+ "申请加入:"
when 6
- "同意申请加入项目"
+ "同意申请加入:"
end
end
diff --git a/app/views/layouts/new_base_user.html.erb b/app/views/layouts/new_base_user.html.erb
index 906b0c6f5..af76ad8d6 100644
--- a/app/views/layouts/new_base_user.html.erb
+++ b/app/views/layouts/new_base_user.html.erb
@@ -164,7 +164,7 @@
<% if hidden_unproject_infos %>
-
- <%= link_to "课程#{@my_course_count}".html_safe, {:controller => "users", :action => "user_courselist", :id => @user}, :id => "user_course_list", :class => "fl" %>
+ <%= link_to "课程#{user_course_count}".html_safe, {:controller => "users", :action => "user_courselist", :id => @user}, :id => "user_course_list", :class => "fl" %>
-
- <%= link_to "我发布的issue#{@issues_author_is_self_count}".html_safe, user_issues_user_path(@user), :class => "fl" %>
+ <%= link_to "我发布的issue#{issues_author_is_self_count}".html_safe, user_issues_user_path(@user), :class => "fl" %>
-
- <%= link_to "我收到的issue#{@issues_assigned_is_self_count}".html_safe, user_issues_user_path(@user), :class => "fl" %>
+ <%= link_to "我收到的issue#{issues_assigned_is_self_count}".html_safe, user_issues_user_path(@user), :class => "fl" %>
diff --git a/app/views/users/_applied_project_content.html.erb b/app/views/users/_applied_project_content.html.erb
index 2d9c7b109..59d941a43 100644
--- a/app/views/users/_applied_project_content.html.erb
+++ b/app/views/users/_applied_project_content.html.erb
@@ -9,7 +9,9 @@
<%= link_to project.name, project_path(ma.project_id), :class => "link-blue", :target => '_blank', :title => "#{project.name}" %>
-
+
+<%= time_tag(ma.created_at).html_safe %>
+
+
<%= render :partial => "users/user_message_applide_action", :locals =>{:ma => ma} %>
-<%= time_tag(ma.created_at).html_safe %>
\ No newline at end of file
diff --git a/app/views/users/_apply_homework_course_message.html.erb b/app/views/users/_apply_homework_course_message.html.erb
index 12bf0f2a4..99a97ba7c 100644
--- a/app/views/users/_apply_homework_course_message.html.erb
+++ b/app/views/users/_apply_homework_course_message.html.erb
@@ -24,4 +24,4 @@
<%end %>
-<%= time_tag(ma.created_at).html_safe %>
\ No newline at end of file
+<%= time_tag(ma.created_at).html_safe %>
\ No newline at end of file
diff --git a/app/views/users/_apply_resource_course_message.html.erb b/app/views/users/_apply_resource_course_message.html.erb
index fd493daf2..9747fa193 100644
--- a/app/views/users/_apply_resource_course_message.html.erb
+++ b/app/views/users/_apply_resource_course_message.html.erb
@@ -35,4 +35,4 @@
<%end %>
-<%= time_tag(ma.created_at).html_safe %>
\ No newline at end of file
+<%= time_tag(ma.created_at).html_safe %>
\ No newline at end of file
diff --git a/app/views/users/_apply_resource_course_message_reply.html.erb b/app/views/users/_apply_resource_course_message_reply.html.erb
index 2aff99c17..85e252780 100644
--- a/app/views/users/_apply_resource_course_message_reply.html.erb
+++ b/app/views/users/_apply_resource_course_message_reply.html.erb
@@ -30,5 +30,5 @@
<%= link_to link_str, user_resource_user_path(User.current, :type => 2), :title => link_str,:class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey "}" %>
- <%= time_tag(ma.created_at).html_safe %>
+ <%= time_tag(ma.created_at).html_safe %>
\ No newline at end of file
diff --git a/app/views/users/_new_user_message.html.erb b/app/views/users/_new_user_message.html.erb
new file mode 100644
index 000000000..16f14733c
--- /dev/null
+++ b/app/views/users/_new_user_message.html.erb
@@ -0,0 +1,27 @@
+<% message_alls.each do |ma| %>
+ <%# 系统消息 %>
+ <%= render :partial => 'users/user_message_system', :locals => {:ma => ma} %>
+
+ <%= render :partial => 'users/user_at_message', :locals => {:ma => ma} %>
+
+ <%# 课程消息 %>
+ <%= render :partial => 'users/user_message_course', :locals => {:ma => ma} %>
+
+
+ <%= render :partial => 'users/user_message_forge', :locals => {:ma => ma} %>
+
+
+ <%= render :partial => 'users/user_message_forum', :locals => {:ma => ma} %>
+
+
+ <%= render :partial => 'users/user_message_userfeedaback', :locals => {:ma => ma} %>
+
+ <%= render :partial => 'users/user_message_org', :locals => {:ma => ma} %>
+
+ <%# 申请类消息 %>
+ <%= render :partial => 'users/user_message_applied', :locals => {:ma => ma} %>
+<% end %>
+
+
+ <%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true %>
+
\ No newline at end of file
diff --git a/app/views/users/_user_at_message.html.erb b/app/views/users/_user_at_message.html.erb
index 024934471..89b702ded 100644
--- a/app/views/users/_user_at_message.html.erb
+++ b/app/views/users/_user_at_message.html.erb
@@ -23,6 +23,6 @@
<%= 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 %>
- <%= time_tag(ma.created_at).html_safe %>
+ <%= time_tag(ma.created_at).html_safe %>
<% end %>
\ No newline at end of file
diff --git a/app/views/users/_user_message_applide_action.html.erb b/app/views/users/_user_message_applide_action.html.erb
index a8b5598fa..425c3f74d 100644
--- a/app/views/users/_user_message_applide_action.html.erb
+++ b/app/views/users/_user_message_applide_action.html.erb
@@ -1,13 +1,15 @@
<% ma = ma.nil? ? @applied_message : ma %>
<% if allow_to_show(ma) %>
- <%= link_to "同意", allow_to_join_project_project_memberships_path(:project_id => ma.project_id, :applied_message_id => ma.id), :remote => true, :method => :post, :class => "link-blue"%> |
- <%= link_to "拒绝", refused_allow_to_join_project_project_memberships_path(:project_id => ma.project_id, :applied_message_id => ma.id), :remote => true, :method => :get, :class => "link-blue" %>
+ <%= link_to "同意", allow_to_join_project_project_memberships_path(:project_id => ma.project_id, :applied_message_id => ma.id),
+ :remote => true, :method => :post, :class => "link-blue", :style => "font-size: 14px;" %> |
+ <%= link_to "拒绝", refused_allow_to_join_project_project_memberships_path(:project_id => ma.project_id, :applied_message_id => ma.id),
+ :remote => true, :method => :get, :class => "link-blue",:style => "font-size: 14px;" %>
<% elsif ma.status == 4 %>
- 被拒绝
+ 被拒绝
<% elsif ma.status == 5 %>
- 您已拒绝
+ 您已拒绝
<% elsif ma.status == 6 %>
- 已通过
+ 已通过
<% elsif ma.status == 7 %>
- 您已同意
+ 您已同意
<% end %>
\ No newline at end of file
diff --git a/app/views/users/_user_message_applied.html.erb b/app/views/users/_user_message_applied.html.erb
index 89084d30b..b79f77a2d 100644
--- a/app/views/users/_user_message_applied.html.erb
+++ b/app/views/users/_user_message_applied.html.erb
@@ -17,7 +17,7 @@
<%= render :partial => "users/user_message_applied_school_action", :locals =>{:ma => ma} %>
- <%= time_tag(ma.created_at).html_safe %>
+ <%= time_tag(ma.created_at).html_safe %>
diff --git a/app/views/users/_user_message_applied_schools.html.erb b/app/views/users/_user_message_applied_schools.html.erb
index 1e2ff86ba..9e66d1bfb 100644
--- a/app/views/users/_user_message_applied_schools.html.erb
+++ b/app/views/users/_user_message_applied_schools.html.erb
@@ -4,4 +4,4 @@
<% else %>
<%=link_to User.where("id=?", ma.applied_user_id).first.show_name, user_path(ma.applied_user_id), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
<% end %>
-"><%= applied_school_tip(ma) %>
\ No newline at end of file
+<%= applied_school_tip(ma) %>
\ No newline at end of file
diff --git a/app/views/users/_user_message_course.html.erb b/app/views/users/_user_message_course.html.erb
index 87d448944..189389444 100644
--- a/app/views/users/_user_message_course.html.erb
+++ b/app/views/users/_user_message_course.html.erb
@@ -8,7 +8,7 @@
<%=link_to ma.course_message.author.try(:show_name), user_path(ma.course_message.author), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
- ">发布了通知:
+ 发布了通知:
<%= link_to ma.course_message.title, {:controller => 'news', :action => 'show', :id => ma.course_message.id },
@@ -23,9 +23,10 @@
<%= ma.course_message.description.html_safe %>
<% end %>
- <%= time_tag(ma.created_at).html_safe %>
+ <%= time_tag(ma.created_at).html_safe %>
<% end %>
+
<% if ma.course_message_type == "Comment" && ma.course_message %>
-
@@ -35,7 +36,7 @@
-
<%=link_to User.find(ma.course_message.author_id).show_name, user_path(ma.course_message.author), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
- ">评论了通知:
+ 评论了通知:
-
<%= link_to ma.course_message.commented.title, {:controller => 'news', :action => 'show', :id => ma.course_message.commented.id },
@@ -50,7 +51,7 @@
<%= ma.course_message.comments.html_safe %>
<% end %>
- - <%= time_tag(ma.created_at).html_safe %>
+ - <%= time_tag(ma.created_at).html_safe %>
<% end %>
<% if ma.course_message_type == "HomeworkCommon" && ma.status.nil? && ma.course_message %>
@@ -62,7 +63,7 @@
<%=link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师", user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
- ">发布了班级作业:
+ 发布了班级作业:
<% if !User.current.allowed_to?(:as_teacher, ma.course_message.course) && cur_user_works_for_homework(ma.course_message).nil? %>
@@ -114,7 +115,7 @@
<% end %>
- <%= time_tag(ma.created_at).html_safe %>
+ <%= time_tag(ma.created_at).html_safe %>
<% end %>
<% if ma.course_message_type == "HomeworkCommon" && ma.status == 1 && ma.course_message %>
@@ -122,7 +123,7 @@
<%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user), :target => '_blank' %>
<%=link_to ma.course_message.user.lastname + ma.course_message.user.firstname + '老师',
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher", :title => "#{ma.course_message.user.lastname + ma.course_message.user.firstname}老师", :target => '_blank' %>
- ">发布的作业:
+ 发布的作业:
<%= link_to "作业标题:" + ma.course_message.name, student_work_index_path(:homework => ma.course_message.id),
:class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
@@ -148,7 +149,7 @@
<% end %>
截止时间快到啦
- <%= time_tag(ma.created_at).html_safe %>
+ <%= time_tag(ma.created_at).html_safe %>
<% end %>
@@ -160,7 +161,7 @@
<%= link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师",
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
- ">启动了作业匿评:
+ 启动了作业匿评:
<%= link_to "作业标题:" + ma.course_message.name, student_work_index_path(:homework => ma.course_message.id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
@@ -183,7 +184,7 @@
例如,您缺评了两份作品,则您的最终成绩将被扣除 <%= ma.course_message.homework_detail_manual.absence_penalty %> * 2 = <%= ma.course_message.homework_detail_manual.absence_penalty * 2 %>分
<% end%>
- <%= time_tag(ma.created_at).html_safe %>
+ <%= time_tag(ma.created_at).html_safe %>
<% end %>
@@ -192,7 +193,8 @@
<%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user), :target => '_blank' %>
<%=link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师",
- user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>">关闭了作业匿评:
+ user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
+ 关闭了作业匿评:
<%= link_to "作业标题:" + ma.course_message.name, student_work_index_path(:homework => ma.course_message.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
@@ -214,7 +216,7 @@
祝您的教学活动高效、顺利、愉快!
<% end %>
- <%= time_tag(ma.created_at).html_safe %>
+ <%= time_tag(ma.created_at).html_safe %>
<% end %>
@@ -226,7 +228,7 @@
<%= link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师",
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
- ">启动作业匿评失败
+ 启动作业匿评失败:
<%= 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 "}", :target => '_blank' %>
@@ -245,7 +247,7 @@
提交截止:<%= ma.course_message.end_time%> 23:59
- <%= time_tag(ma.created_at).html_safe %>
+ <%= time_tag(ma.created_at).html_safe %>
<% end %>
<% if ma.course_message_type == "HomeworkCommon" && ma.status == 5 %>
@@ -293,7 +295,7 @@
- <%= time_tag(ma.created_at).html_safe %>
+ <%= time_tag(ma.created_at).html_safe %>
<% end %>
<% if ma.course_message_type == "Poll" && ma.course_message %>
@@ -305,7 +307,7 @@
<%=link_to ma.course_message.user.try(:show_name), user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
- ">发布了问卷:
+ 发布了问卷:
<%= link_to format_activity_title(" #{ma.course_message.polls_name.nil? ? "未命名问卷" : ma.course_message.polls_name}"), poll_path(ma.course_message.id),
@@ -316,7 +318,7 @@
<%= ma.course_message.polls_name %>
- <%= time_tag(ma.created_at).html_safe %>
+ <%= time_tag(ma.created_at).html_safe %>
<% end %>
<% if ma.course_message_type == "Message" && !ma.nil? && !ma.course_message.nil? %>
@@ -328,7 +330,7 @@
<%=link_to ma.course_message.author.try(:show_name), user_path(ma.course_message.author), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
- ">
+
<%= ma.course_message.parent_id.nil? ? "发布了班级帖子:" : "评论了班级帖子:" %>
<% if ma.course_message.parent_id.nil? %>
@@ -359,7 +361,7 @@
<% end %>
<% end %>
- <%= time_tag(ma.created_at).html_safe %>
+ <%= time_tag(ma.created_at).html_safe %>
<% end %>
@@ -410,7 +412,7 @@
<% end %>
- <%= time_tag(ma.created_at).html_safe %>
+ <%= time_tag(ma.created_at).html_safe %>
<% end %>
<% if ma.course_message_type == "JournalsForMessage" && ma.course_message %>
@@ -424,7 +426,7 @@
<%= link_to ma.course_message.user.try(:show_name), user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
- ">在班级中留言了:
+ 在班级中留言了:
<%= link_to message_content(ma.course_message.notes), course_feedback_path(:id => ma.course_id),
@@ -436,7 +438,7 @@
<%= ma.course_message.notes.html_safe %>
- <%= time_tag(ma.created_at).html_safe %>
+ <%= time_tag(ma.created_at).html_safe %>
<% end %>
<% elsif ma.course_message.jour_type == 'HomeworkCommon' %>
@@ -452,7 +454,7 @@
<% if ma.course_message.m_parent_id.nil? %>
回复了您的作业:
<% else %>
- 在作业中回复了您:
+ 在作业中回复了您:
<% end %>
@@ -466,7 +468,7 @@
<%= ma.course_message.notes.html_safe %>
- <%= time_tag(ma.created_at).html_safe %>
+ <%= time_tag(ma.created_at).html_safe %>
<% else %>
@@ -479,7 +481,7 @@
<%= link_to ma.course_message.user.lastname + ma.course_message.user.firstname +
"#{ma.course_message.user.allowed_to?(:as_teacher, ma.course)?"老师":"同学"}",
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
- ">回复了作品评论:
+ 回复了作品评论:
-
<%= link_to message_content(ma.course_message.notes), student_work_index_path(:homework => ma.course_message.jour.student_work.homework_common_id,:show_work_id => ma.course_message.jour.student_work_id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
@@ -500,7 +502,7 @@
- 作业标题:<%=ma.course_message.jour.student_work.homework_common.name %>
- <%= time_tag(ma.created_at).html_safe %>
+ <%= time_tag(ma.created_at).html_safe %>
<% end %>
<% end %>
@@ -547,7 +549,7 @@
<%= link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "同学",
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
- ">重新提交了作品:
+ 重新提交了作品:
<%= link_to "作业标题:" + ma.course_message.name, student_work_index_path(:homework => ma.course_message.homework_common_id, :show_work_id => ma.course_message_id),
@@ -556,7 +558,7 @@
- <%= time_tag(ma.created_at).html_safe %>
+ <%= time_tag(ma.created_at).html_safe %>
<% end %>
@@ -568,7 +570,7 @@
<%= link_to ma.course_message.user.show_name+ "同学",
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
- ">追加新附件了:
+ 追加新附件了:
<%= link_to "作业标题:" + ma.course_message.homework_common.name, student_work_index_path(:homework => ma.course_message.homework_common_id, :show_work_id => ma.course_message_id),
@@ -576,7 +578,7 @@
- <%= time_tag(ma.created_at).html_safe %>
+ <%= time_tag(ma.created_at).html_safe %>
<% end %>
@@ -587,7 +589,7 @@
系统提示
- ">您成功创建了班级:
+ 您成功创建了班级:
<%= link_to "班级名称:" + ma.course_message.name, course_path(ma.course_message),
@@ -612,7 +614,7 @@
您的班级是私有的,非班级成员不能访问您的班级。如果想设置为公开,您可以在配置中设置。
<% end %>
- <%= time_tag(ma.created_at).html_safe %>
+ <%= time_tag(ma.created_at).html_safe %>
<% end %>
@@ -650,7 +652,7 @@
<%= Course.find(ma.course_id).description.nil? ? "" : Course.find(ma.course_id).description.html_safe %>
申请职位:<%= ma.content == '9' ? "教师" : "教辅"%>
- <%= time_tag(ma.created_at).html_safe %>
+ <%= time_tag(ma.created_at).html_safe %>
<% end %>
@@ -662,7 +664,7 @@
<%=link_to User.find(ma.course_message_id).show_name, user_path(User.find(ma.course_message_id)), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
- ">将您加入了班级:
+ 将您加入了班级:
<%= link_to ma.course.name, course_member_path(ma.course), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
@@ -684,7 +686,7 @@
<% end %>
- <%= time_tag(ma.created_at).html_safe %>
+ <%= time_tag(ma.created_at).html_safe %>
<% end %>
@@ -696,7 +698,7 @@
系统提示
- ">您增加了新的班级成员:
+ 您增加了新的班级成员:
<%= 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) +")", {:controller => 'courses', :action => 'settings', :id => ma.course_id, :tab=>'member'}, :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
@@ -718,7 +720,7 @@
<% end %>
- <%= time_tag(ma.created_at).html_safe %>
+ <%= time_tag(ma.created_at).html_safe %>
<% end %>
@@ -730,7 +732,7 @@
<%=link_to User.find(ma.course_message_id).show_name, user_path(User.find(ma.course_message_id)), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
- ">将您移出了班级:
+ 将您移出了班级:
<%= link_to ma.course.name, member_course_path(ma.course), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
@@ -753,7 +755,7 @@
<% end %>
- <%= time_tag(ma.created_at).html_safe %>
+ <%= time_tag(ma.created_at).html_safe %>
<% end %>
@@ -763,7 +765,9 @@
<%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user), :target => '_blank' %>
<%=link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师",
- user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>">发布了班级测验 :
+ user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
+ 发布了班级测验:
+
<%= link_to "测验题目:" + ma.course_message.exercise_name, exercise_path(:id => ma.course_message.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
@@ -790,7 +794,7 @@
<% end %>
- <%= time_tag(ma.created_at).html_safe %>
+ <%= time_tag(ma.created_at).html_safe %>
<% end %>
@@ -800,7 +804,8 @@
<%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user), :target => '_blank' %>
<%=link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师",
- user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>">发布的测验:
+ user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
+ 发布的测验:
<%= link_to "测验题目:" + ma.course_message.exercise_name, exercise_path(:id => ma.course_message.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
@@ -823,7 +828,7 @@
截止时间快到啦
- <%= time_tag(ma.created_at).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_forge.html.erb b/app/views/users/_user_message_forge.html.erb
index 10a14ffa9..b3e058a82 100644
--- a/app/views/users/_user_message_forge.html.erb
+++ b/app/views/users/_user_message_forge.html.erb
@@ -3,11 +3,11 @@
<% 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), :target => '_blank' %>
+ <%= link_to image_tag(url_to_avatar(ma.forge_message.user), :width => "30", :height => "30"), user_path(ma.forge_message.user), :target => '_blank' %>
-
<%=link_to ma.forge_message.user, user_path(ma.forge_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
- ">申请加入项目:
+ 申请加入:
-
<%= link_to ma.project, settings_project_path(:id => ma.project, :tab => "members"), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
@@ -15,7 +15,7 @@
- - <%= time_tag(ma.created_at).html_safe %>
+ - <%= time_tag(ma.created_at).html_safe %>
<% end %>
@@ -27,7 +27,7 @@
<%=link_to User.find(ma.forge_message_id).show_name, user_path(User.find(ma.forge_message_id)), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
- ">将您加入了项目:
+ 将您加入了项目:
<%= link_to ma.project, project_member_path(ma.project), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
@@ -35,7 +35,7 @@
- <%= time_tag(ma.created_at).html_safe %>
+ <%= time_tag(ma.created_at).html_safe %>
<% end %>
<% end %>
@@ -48,7 +48,7 @@
<%=link_to User.find(ma.forge_message_id).show_name, user_path(User.find(ma.forge_message_id)), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
- ">将您移出了项目:
+ 将您移出了项目:
<%= link_to ma.project, member_project_path(ma.project), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
@@ -56,7 +56,7 @@
- <%= time_tag(ma.created_at).html_safe %>
+ <%= time_tag(ma.created_at).html_safe %>
<% end %>
<% end %>
@@ -123,7 +123,7 @@
<%=link_to User.find(ma.forge_message.author_id).show_name, user_path(ma.forge_message.author),
:class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
- ">
+
<%= ma.forge_message.tracker_id == 5 ? "发布了周报:":"指派了问题给你:"%>
@@ -133,7 +133,7 @@
- <%= time_tag(ma.created_at).html_safe %>
+ <%= time_tag(ma.created_at).html_safe %>
<% end %>
<% end %>
@@ -146,8 +146,7 @@
<%= link_to User.find(ma.forge_message.user_id).show_name, user_path(ma.forge_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
- ">
- 更新了问题状态:
+ 更新了问题状态:
<%= link_to ma.forge_message.journalized.subject,
@@ -156,21 +155,21 @@
- <%= time_tag(ma.created_at).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), :target => '_blank' %>
- <%=link_to ma.forge_message.author.try(:show_name), user_path(ma.forge_message.author), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
- "><%= ma.forge_message.parent_id.nil? ? "发布了项目帖子:" : "评论了项目帖子:" %>
+ <%= ma.forge_message.parent_id.nil? ? "发布了项目帖子:" : "评论了项目帖子:" %>
-
<%= link_to ma.forge_message.subject, board_message_path(ma.forge_message.board_id, ma.forge_message.parent_id ? ma.forge_message.parent_id : ma.forge_message.id), :class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
- - <%= time_tag(ma.created_at).html_safe %>
+ - <%= time_tag(ma.created_at).html_safe %>
<% end %>
<% if ma.forge_message_type == "Comment" %>
@@ -183,7 +182,7 @@
<%=link_to ma.forge_message.author.try(:show_name), user_path(ma.forge_message.author),
:class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
- ">评论了新闻:
+ 评论了新闻:
<%= link_to "#{ma.forge_message.commented.title}",
@@ -191,7 +190,7 @@
- <%= time_tag(ma.created_at).html_safe %>
+ <%= time_tag(ma.created_at).html_safe %>
<% end %>
@@ -216,7 +215,7 @@
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
- <%= time_tag(ma.created_at).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_org.html.erb b/app/views/users/_user_message_org.html.erb
index 13c62318f..3d56f4b4a 100644
--- a/app/views/users/_user_message_org.html.erb
+++ b/app/views/users/_user_message_org.html.erb
@@ -6,21 +6,22 @@
<%=link_to ma.organization.name, organization_path(ma.organization_id), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
- '>申请子域名:
+ 申请子域名:
<%= ma.content %>
-
+ <%= time_tag(ma.created_at).html_safe %>
+
<%=link_to (Secdomain.where("sub_type=2 and pid=?", ma.organization.id).count == 0 || (Secdomain.where("sub_type=2 and pid=?", ma.organization.id).count > 0 && Secdomain.where("sub_type=2 and pid=?", ma.organization.id).first.subname != ma.content)) ? "同意申请":"申请已批准",
agree_apply_subdomain_organizations_path( :organization_id => ma.organization_id, :org_domain => ma.content, :user_id => ma.sender_id, :act_id => ma.id ),
:id => "agree_apply_subdomain_#{ma.id}",
:method => 'post',
:remote => true,
- :class => "green_btn_cir ml10",
- :style => "color:#fff" %>
+ :class => 'link-blue fr'
+ %>
- <%= time_tag(ma.created_at).html_safe %>
+
<% end %>
<% if ma.message_type == 'AgreeApplySubdomain'%>
@@ -29,12 +30,12 @@
<%= image_tag("/images/trustie_logo1.png", width: "30px", height: "30px", class: "mt3") %>
- '>管理员同意了您的子域名申请:
+ 管理员同意了您的子域名申请:
<%= ma.content %>
- <%= time_tag(ma.created_at).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_system.html.erb b/app/views/users/_user_message_system.html.erb
index 6bc8f28f3..46e83a4e1 100644
--- a/app/views/users/_user_message_system.html.erb
+++ b/app/views/users/_user_message_system.html.erb
@@ -5,9 +5,9 @@
<%= image_tag("/images/trustie_logo1.png", width: "30px", height: "30px", class: "mt3") %>
- Trustie平台发布新消息:
+ 系统消息:
+
- 【系统消息】
<%= link_to ma.subject.blank? ? (ma.content.nil? ? ma.description.html_safe : ma.content.html_safe) : ma.subject, user_system_messages_path(User.current, :anchor => "position_#{ma.id}"),
@@ -15,7 +15,7 @@
- <%= time_tag(ma.created_at).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_userfeedaback.html.erb b/app/views/users/_user_message_userfeedaback.html.erb
index 00fa78eeb..664058461 100644
--- a/app/views/users/_user_message_userfeedaback.html.erb
+++ b/app/views/users/_user_message_userfeedaback.html.erb
@@ -9,7 +9,7 @@
<%=link_to User.find(ma.journals_for_message.user_id).show_name, user_path(ma.journals_for_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
- ">
+
<%= ma.journals_for_message.reply_id == 0 ? "给你留言了:" : "回复了你的留言:" %>
@@ -26,7 +26,7 @@
<%= ma.journals_for_message.notes.html_safe %>
<% end %>
- <%= time_tag(ma.journals_for_message.created_on).html_safe %>
+ <%= 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 7f5798c8e..73f0dfc0e 100644
--- a/app/views/users/user_messages.html.erb
+++ b/app/views/users/user_messages.html.erb
@@ -14,32 +14,7 @@
<% unless @message_alls.nil? %>
- <% @message_alls.each do |ma| %>
- <%# 系统消息 %>
- <%= render :partial => 'users/user_message_system', :locals => {:ma => ma} %>
-
- <%= render :partial => 'users/user_at_message', :locals => {:ma => ma} %>
-
- <%# 课程消息 %>
- <%= render :partial => 'users/user_message_course', :locals => {:ma => ma} %>
-
-
- <%= render :partial => 'users/user_message_forge', :locals => {:ma => ma} %>
-
-
- <%= render :partial => 'users/user_message_forum', :locals => {:ma => ma} %>
-
-
- <%= render :partial => 'users/user_message_userfeedaback', :locals => {:ma => ma} %>
-
- <%= render :partial => 'users/user_message_org', :locals => {:ma => ma} %>
-
- <%# 申请类消息 %>
- <%= render :partial => 'users/user_message_applied', :locals => {:ma => ma} %>
- <% end %>
-
- <%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true %>
-
+ <%= render :partial => 'users/new_user_message', :locals => { :message_alls => @message_alls } %>
<% end %>
<% else %>
diff --git a/public/images/user/home-user-left.png b/public/images/user/home-user-left.png
new file mode 100644
index 000000000..f4968c0d7
Binary files /dev/null and b/public/images/user/home-user-left.png differ
diff --git a/public/stylesheets/css/structure.css b/public/stylesheets/css/structure.css
index b86068a33..7ab2bf3f3 100644
--- a/public/stylesheets/css/structure.css
+++ b/public/stylesheets/css/structure.css
@@ -97,13 +97,13 @@ div#menu ul ul ul li a{ width:185px; overflow:hidden; white-space: nowrap; text-
.homepageNewsPublisher { max-width:100px; font-size:12px; color:#269ac9; display:block; padding-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; float:left; }
.homepageNewsType {padding-left: 5px; font-size:12px; color:#888888; display:block;}
.homepageNewsTypeHomework {width:160px; padding-left: 5px; font-size:12px; color:#888888; display:block; overflow:hidden; height:49px;word-break:break-all; word-wrap:break-word; text-overflow:ellipsis;}
-.homepageNewsPubType {width:230px; font-size:12px; color:#888888; display: block;}
+.homepageNewsPubType {auto-width:230px; font-size:12px; color:#888888; display: block;}
.homepageNewsPubTypeHomework {width:270px; font-size:12px; color:#888888; display: block; white-space:nowrap;}
-.homepageNewsContent {width:355px; max-width:365px; margin-right:10px; font-size:12px; color:#4b4b4b; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;max-height: 49px; }
-.homepageSystenMessageContent {width:281px; max-width:291px; margin-right:10px; font-size:12px; color:#4b4b4b; display:block; overflow:hidden;text-overflow:ellipsis;max-height: 49px; }
-
-.homepageHomeworkContentWarn {width:110px; max-width:365px; margin-right:10px; font-size:12px; color:red; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;max-height: 49px; }
-.homepageHomeworkContent {width:235px; max-width:365px; margin-right:10px; font-size:12px; color:#4b4b4b; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;max-height: 49px; }
+.homepageNewsContent {width:355px; max-width:365px; margin-right:10px; font-size:14px; color:#4b4b4b; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;max-height: 49px; }
+.homepageSystenMessageContent {width:281px; max-width:291px; margin-right:10px; font-size:14px; color:#4b4b4b; display:block; overflow:hidden;text-overflow:ellipsis;max-height: 49px; }
+.homepageSystenMessageContent a:link{color:#1b1818;}
+.homepageHomeworkContentWarn {width:110px; max-width:365px; margin-right:10px; font-size:14px; color:red; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;max-height: 49px; }
+.homepageHomeworkContent {width:235px; max-width:365px; margin-right:10px; font-size:14px; color:#4b4b4b; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;max-height: 49px; }
.homepageHomeworkContentWarn2 {width:60px; max-width:365px; margin-right:10px; font-size:12px; color:red; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;max-height: 49px; }
.homepageHomeworkContent2 {width:285px; max-width:365px; margin-right:10px; font-size:12px; color:#4b4b4b; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;max-height: 49px; }
@@ -355,7 +355,7 @@ a.replyGrey1 {color:#888888;}
a.replyGrey1:hover {color:#4b4b4b;}
a.newsBlue {color:#269ac9;}
a.newsBlue:hover {color:#297fb8;}
-a.newsBlack {color:#4b4b4b; font-size:13px; font-weight:bold}
+a.newsBlack {color:#4b4b4b; font-size:14px; font-weight:bold}
a.menuGrey {color:#808080;}
a.menuGrey:hover {color:#fe7d68;}
.navSearchTypeBox {width:368px; height:35px; position:absolute; border:1px solid #e1e1e1; background-color:#ffffff; padding-left:10px; display:none; color:#3e3e3e; font-size:14px;}
diff --git a/public/stylesheets/css/user.css b/public/stylesheets/css/user.css
index a46b46517..e718c88a5 100644
--- a/public/stylesheets/css/user.css
+++ b/public/stylesheets/css/user.css
@@ -21,7 +21,7 @@
.home-user-leftnav{ background:#fff; width: 238px; border:1px solid #ddd; margin-bottom: 10px;}
.home-user-leftnav h3{ height: 40px; line-height: 40px; border-bottom:1px solid #ddd; color: #333; padding-left: 10px; font-weight: normal; }
.h3-more{ font-size: 12px; color: #888;}
-.home-user-leftnav-li{ height: 40px; line-height: 40px; padding-left: 25px; color: #666;background:url(/images/user/home-user-left.png) 5px 5px no-repeat; font-size: 14px; position: relative; }
+.home-user-leftnav-li{ height: 45px; line-height: 40px; padding-left: 25px; color: #666;background:url(/images/user/home-user-left.png) 5px 5px no-repeat; font-size: 14px; position: relative; }
.home-user-leftnav-li:hover{ background:#f4f4f4 url(/images/user/home-user-left.png) 5px -35px no-repeat;}
.home-user-leftnav-li a:hover{color: #3b94d6;}
.icons-class{background:url(/images/user/home-user-left.png) 5px 5px no-repeat; }