diff --git a/app/views/users/_course_homework.html.erb b/app/views/users/_course_homework.html.erb
index 6eeae66f9..d0b830740 100644
--- a/app/views/users/_course_homework.html.erb
+++ b/app/views/users/_course_homework.html.erb
@@ -10,10 +10,10 @@
<% else %>
<%= link_to activity.try(:user).try(:realname), user_path(activity.user_id), :class => "newsBlue mr15" %>
<% end %> TO
- <%= link_to activity.course.name.to_s+"(课程名称)", course_path(activity.course_id), :class => "newsBlue ml15" %>
+ <%= link_to activity.course.name.to_s+"(课程名称)", course_path(activity.course_id), :class => "newsBlue ml15", :style=>"word-break:break-all" %>
- <%= link_to activity.name.to_s+"(作业名称)", student_work_index_path(:homework => activity.id), :class => "postGrey" %>
+ <%= link_to activity.name.to_s+"(作业名称)", student_work_index_path(:homework => activity.id), :class => "postGrey", :style=>"word-break:break-all" %>
@@ -21,7 +21,7 @@
截止时间:<%= format_date(activity.end_time) %>
- (作业描述)<%= activity.description.html_safe %>
+ (作业描述)<%= activity.description.html_safe %>
-
diff --git a/app/views/users/_course_message.html.erb b/app/views/users/_course_message.html.erb
index c3af1c46e..b6dfdbbe6 100644
--- a/app/views/users/_course_message.html.erb
+++ b/app/views/users/_course_message.html.erb
@@ -11,13 +11,13 @@
<%= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "newsBlue mr15" %>
<% end %>
TO
- <%= link_to activity.course.name.to_s+"(课程讨论区)", course_path(activity.course), :class => "newsBlue ml15 mr5" %>
+ <%= link_to activity.course.name.to_s+"(课程讨论区)", course_path(activity.course), :class => "newsBlue ml15 mr5", :style=>"word-break:break-all"%>
<% if activity.parent_id.nil? %>
- <%= link_to activity.subject.to_s.html_safe+"(讨论区内容)", course_boards_path(Board.where('id=?',activity.board_id).first.course_id), :class=> "postGrey" %>
+ <%= link_to activity.subject.to_s.html_safe+"(讨论区内容)", course_boards_path(Board.where('id=?',activity.board_id).first.course_id), :class=> "postGrey", :style=>"word-break:break-all" %>
<% else %>
- <%= link_to activity.parent.subject.to_s.html_safe+"(讨论区内容)", course_boards_path(Board.where('id=?',activity.board_id).first.course_id), :class=> "postGrey" %>
+ <%= link_to activity.parent.subject.to_s.html_safe+"(讨论区内容)", course_boards_path(Board.where('id=?',activity.board_id).first.course_id), :class=> "postGrey", :style=>"word-break:break-all"%>
<% end %>
@@ -85,7 +85,7 @@
) if reply.course_destroyable_by?(User.current) %>
- <%= reply.content.html_safe %>
+ <%= reply.content.html_safe %>
diff --git a/app/views/users/_course_news.html.erb b/app/views/users/_course_news.html.erb
index 8bef18c59..0e82d7622 100644
--- a/app/views/users/_course_news.html.erb
+++ b/app/views/users/_course_news.html.erb
@@ -2,25 +2,23 @@
<%= link_to image_tag(url_to_avatar(activity.author), :width => "90", :height => "90"), user_path(activity.author_id), :alt => "用户头像" %>
-
-
+
<% if @ctivity.try(:author).try(:realname) == ' ' %>
<%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %>
<% else %>
<%= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "newsBlue mr15" %>
<% end %> TO
- <%= link_to activity.course.name.to_s+"(课程名称)", course_path(activity.course), :class => "newsBlue ml15" %>
-
+ <%= link_to activity.course.name.to_s+"(课程名称)", course_path(activity.course), :class => "newsBlue ml15", :style=>"word-break:break-all" %>
- <%=link_to activity.title.to_s+"(通知标题)", news_path(activity), :class=> "postGrey" %>
-
+ <%=link_to activity.title.to_s+"(通知标题)", news_path(activity), :class=> "postGrey", :style=>"word-break:break-all" %>
+
发布时间:<%= format_date(activity.created_on) %>
-
(通知描述)<%= activity.description.html_safe %>
+
(通知描述)<%= activity.description.html_safe %>
-
+ <% activity.comments.reorder("created_on desc").each do |comment| unless activity.comments.nil?%>
+
+
+ <%= link_to image_tag(url_to_avatar(comment.author), :width => "45", :height => "45"), user_path(comment.author_id), :alt => "用户头像" %>
+
+
+
+ <% if comment.try(:author).try(:realname) == ' ' %>
+ <%= link_to comment.try(:author), user_path(comment.author_id), :class => "newsBlue mr10 f14" %>
+ <% else %>
+ <%= link_to comment.try(:author).try(:realname), user_path(comment.author_id), :class => "newsBlue mr10 f14" %>
+ <% end %>
+ <%=format_date(comment.created_on)%>
+ <%= link_to_if_authorized_course l(:button_delete), {:controller => 'comments', :action => 'destroy', :id => activity, :comment_id => comment},
+ :data => {:confirm => l(:text_are_you_sure)}, :method => :delete, :title => l(:button_delete) %>
+
+
+
<%= comment.comments.html_safe %>
+
+
+
+ <% end %>
+ <% end %>
\ No newline at end of file
diff --git a/app/views/users/_project_message.html.erb b/app/views/users/_project_message.html.erb
index dff8d85b7..a2b97d2da 100644
--- a/app/views/users/_project_message.html.erb
+++ b/app/views/users/_project_message.html.erb
@@ -1,21 +1,27 @@
-<% if activity.parent_id.nil? %>
+
-

+ <%= link_to image_tag(url_to_avatar(activity.author), :width => "90", :height => "90"), user_path(activity.author_id), :alt => "用户头像" %>
-
+
<% if activity.try(:author).try(:realname) == ' ' %>
<%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %>
<% else %>
<%= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "newsBlue mr15" %>
<% end %>
TO
-
<%= activity.project.name %>(项目讨论区)
+ <%= link_to activity.project.name.to_s+"(项目讨论区)", project_path(activity.project), :class => "newsBlue ml15 mr5", :style=>"word-break:break-all"%>
+
+ <% if activity.parent_id.nil? %>
+ <%= link_to activity.subject.to_s.html_safe+"(讨论区内容)", project_boards_path(Board.where('id=?',activity.board_id).first.project_id), :class=> "postGrey", :style=>"word-break:break-all" %>
+ <% else %>
+ <%= link_to activity.parent.subject.to_s.html_safe+"(讨论区内容)", project_boards_path(Board.where('id=?',activity.board_id).first.project_id), :class=> "postGrey", :style=>"word-break:break-all"%>
+ <% end %>
+
时间:<%= format_date(activity.created_on) %>
@@ -35,8 +41,13 @@
-
回复(<%=activity.replies_count %>)
-
2015-07-31
+
回复(
+ <% if activity.parent_id.nil? %>
+ <%=activity.replies_count %>
+ <% else %>
+ <%=activity.parent.replies_count %>
+ <% end %>)
+
<%=format_date(activity.updated_on)%>
@@ -51,32 +62,35 @@
-
-
-

-
-
-
-
黄井泉 学生
- 2015-08-01
删除
-
-
很开心!
-
-
-
-
-
-

-
-
-
-
陈正东 学生
- 2015-08-02
删除
-
-
假期好热,没出去。
-
-
-
+ <% activity= activity.parent_id.nil? ? activity:activity.parent%>
+ <% activity.children.reorder("created_on desc").each do |reply| unless activity.children.nil?%>
+
+
+ <%= link_to image_tag(url_to_avatar(reply.author), :width => "45", :height => "45"), user_path(reply.author_id), :alt => "用户头像" %>
+
+
+
+ <% if reply.try(:author).try(:realname) == ' ' %>
+ <%= link_to reply.try(:author), user_path(reply.author_id), :class => "newsBlue mr10 f14" %>
+ <% else %>
+ <%= link_to reply.try(:author).try(:realname), user_path(reply.author_id), :class => "newsBlue mr10 f14" %>
+ <% end %>
+ <%=format_date(reply.created_on)%>
+ <%= link_to(
+ l(:button_delete),
+ {:controller => 'messages', :action => 'destroy', :id => reply.id, :board_id => reply.board_id, :is_board => 'false'},
+ :method => :post,
+ :data => {:confirm => l(:text_are_you_sure)},
+ :title => l(:button_delete),
+ :class => 'replyGrey fr ml10'
+ ) if reply.course_destroyable_by?(User.current) %>
+
+
+
<%= reply.content.html_safe %>
+
+
+
+ <% end %>
+ <% end %>
-<% end %>
\ No newline at end of file