From 2124b3c3924b7673bcde2006c233c1a1ef174c15 Mon Sep 17 00:00:00 2001 From: cxt Date: Wed, 26 Aug 2015 17:02:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=B8=BB=E9=A1=B5=E5=8A=A8?= =?UTF-8?q?=E6=80=81=E7=BC=BA=E9=99=B7=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_course_homework.html.erb | 6 ++--- app/views/users/_course_message.html.erb | 9 ++++--- app/views/users/_course_news.html.erb | 4 +-- app/views/users/_course_poll.html.erb | 6 ++--- app/views/users/_project_issue.html.erb | 4 +-- app/views/users/_project_message.html.erb | 9 ++++--- app/views/users/_user_activities.html.erb | 32 ++++++++++++----------- 7 files changed, 37 insertions(+), 33 deletions(-) diff --git a/app/views/users/_course_homework.html.erb b/app/views/users/_course_homework.html.erb index 5a74b6814..9fc312c96 100644 --- a/app/views/users/_course_homework.html.erb +++ b/app/views/users/_course_homework.html.erb @@ -4,7 +4,7 @@ <%= link_to image_tag(url_to_avatar(activity.user), :width => "90", :height => "90"), user_path(activity.user_id), :alt => "用户头像" %>
-
+
<% if activity.try(:user).try(:realname) == ' ' %> <%= link_to activity.try(:user), user_path(activity.user_id), :class => "newsBlue mr15" %> <% else %> @@ -12,12 +12,12 @@ <% end %> TO <%= 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", :style=>"word-break:break-all" %>
- <%= link_to "提交("+activity.student_works.count.to_s+")", student_work_index_path(activity.id), :class=> "c_blue" %> + <%= link_to "提交("+activity.student_works.count.to_s+")", student_work_index_path(:homework => activity.id), :class=> "c_blue" %>
截止时间:<%= format_date(activity.end_time) %>
diff --git a/app/views/users/_course_message.html.erb b/app/views/users/_course_message.html.erb index 3d0c1b171..bf42c179f 100644 --- a/app/views/users/_course_message.html.erb +++ b/app/views/users/_course_message.html.erb @@ -4,7 +4,7 @@ <%= 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 %> @@ -13,16 +13,17 @@ TO <%= 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", :style=>"word-break:break-all" %> + <%= link_to activity.subject.to_s.html_safe+"(讨论区标题)", course_boards_path(activity.course,:parent_id =>activity.id, :topic_id => activity.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", :style=>"word-break:break-all"%> + <%= link_to activity.parent.subject.to_s.html_safe+"(讨论区标题)", course_boards_path(activity.course,:parent_id =>activity.parent_id, :topic_id => activity.id), :class=> "postGrey", :style=>"word-break:break-all"%> <% end %>
时间:<%= format_date(activity.created_on) %>
+
(描述)<%= activity.content.html_safe %>
-
+
<% if @ctivity.try(:author).try(:realname) == ' ' %> <%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %> <% else %> @@ -12,7 +12,7 @@ <% end %> TO <%= 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", :style=>"word-break:break-all" %>
diff --git a/app/views/users/_course_poll.html.erb b/app/views/users/_course_poll.html.erb index 01991d379..26e928dbf 100644 --- a/app/views/users/_course_poll.html.erb +++ b/app/views/users/_course_poll.html.erb @@ -5,7 +5,7 @@ <%= link_to image_tag(url_to_avatar(activity.user), :width => "90", :height => "90"), user_path(activity.user_id), :alt => "用户头像" %>
-
+
<% if activity.try(:user).try(:realname) == ' ' %> <%= link_to activity.try(:user), user_path(activity.user_id), :class => "newsBlue mr15" %> <% else %> @@ -15,13 +15,13 @@ <%= link_to Course.find(activity.polls_group_id).name.to_s+"(课程名称)", course_path(activity.polls_group_id), :class => "newsBlue ml15", :style=>"word-break:break-all" %>
-
+
时间:<%= format_date(activity.created_at) %>
-
(问卷描述)<%=activity.polls_description.to_s%>
+
(问卷描述)<%=activity.polls_description.to_s%>
-
+
<% if activity.try(:author).try(:realname) == ' ' %> <%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %> <% else %> @@ -12,7 +12,7 @@ <% end %> TO <%= link_to activity.project.name.to_s+"(项目名称)", project_path(activity.project), :class => "newsBlue ml15", :style=>"word-break:break-all" %>
-
+
<%= link_to activity.subject.to_s+"(缺陷标题)", issue_path(activity), :class => "postGrey", :style=>"word-break:break-all" %> <%=activity.status.name %>
diff --git a/app/views/users/_project_message.html.erb b/app/views/users/_project_message.html.erb index d9b87926c..652f18fd1 100644 --- a/app/views/users/_project_message.html.erb +++ b/app/views/users/_project_message.html.erb @@ -4,7 +4,7 @@ <%= 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 %> @@ -14,16 +14,17 @@ <%= 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" %> + <%= link_to activity.subject.to_s.html_safe+"(讨论区标题)", project_boards_path(activity.project,:parent_id =>activity.id, :topic_id => activity.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"%> + <%= link_to activity.parent.subject.to_s.html_safe+"(讨论区标题)", project_boards_path(activity.project,:parent_id =>activity.parent_id, :topic_id => activity.id), :class=> "postGrey", :style=>"word-break:break-all"%> <% end %>
时间:<%= format_date(activity.created_on) %>
+
(描述)<%= activity.content.html_safe %>