diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 536388ad0..a8243c5a5 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -74,6 +74,8 @@ class UsersController < ApplicationController include WordsHelper include GitlabHelper include UserScoreHelper + + include PollHelper helper :user_score helper :journals @@ -585,7 +587,7 @@ class UsersController < ApplicationController @type = params[:type] user_project_ids = @user.projects.visible.empty? ? "(-1)" : "(" + @user.projects.visible.map{|project| project.id}.join(",") + ")" user_course_ids = @user.courses.visible.empty? ? "(-1)" : "(" + @user.courses.visible.map{|course| course.id}.join(",") + ")" - course_types = "('Message','News','HomeworkCommon')" + course_types = "('Message','News','HomeworkCommon','poll')" project_types = "('Message','Issue')" if @type case @type diff --git a/app/views/users/_course_message.html.erb b/app/views/users/_course_message.html.erb index 48f2636c4..2d5e372ea 100644 --- a/app/views/users/_course_message.html.erb +++ b/app/views/users/_course_message.html.erb @@ -23,7 +23,13 @@
时间:<%= format_date(activity.created_on) %>
-
(描述)<%= activity.content.html_safe %>
+
(描述) + <% if activity.parent_id.nil? %> + <%= activity.content.to_s.html_safe%> + <% else %> + <%= activity.parent.content.to_s.html_safe%> + <% end %> +