From 55758c3c2fb0d1191938de8c3f2ef42e4b5f8bc5 Mon Sep 17 00:00:00 2001 From: cxt Date: Sun, 6 Sep 2015 15:31:26 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AD=9B=E9=80=89=E6=8E=89=E6=9C=AA=E5=8F=91?= =?UTF-8?q?=E5=B8=83=E7=9A=84=E9=97=AE=E5=8D=B7=E5=8A=A8=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/users_controller.rb | 2 +- app/views/users/_course_poll.html.erb | 4 +++- app/views/users/_user_activities.html.erb | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index e3480b238..a110850aa 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -767,7 +767,7 @@ class UsersController < ApplicationController @page = params[:page] ? params[:page].to_i + 1 : 0 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','poll')" + course_types = "('Message','News','HomeworkCommon','Poll')" project_types = "('Message','Issue')" if params[:type].present? case params[:type] diff --git a/app/views/users/_course_poll.html.erb b/app/views/users/_course_poll.html.erb index 24adf108e..bde8de90d 100644 --- a/app/views/users/_course_poll.html.erb +++ b/app/views/users/_course_poll.html.erb @@ -1,5 +1,6 @@ <% has_commit = has_commit_poll?(activity.id ,User.current)%> <% poll_name = activity.polls_name.empty? ? l(:label_poll_new) : activity.polls_name%> +<% if has_commit || activity.user_id == User.current %>
@@ -43,4 +44,5 @@
-
\ No newline at end of file + +<% end %> \ No newline at end of file diff --git a/app/views/users/_user_activities.html.erb b/app/views/users/_user_activities.html.erb index 2d447d739..4ff98b1b7 100644 --- a/app/views/users/_user_activities.html.erb +++ b/app/views/users/_user_activities.html.erb @@ -23,7 +23,7 @@ target.show(); }else{ btn.data('init',0); - btn.html('点击展开更多回复('+btn.data('count')+')'); + btn.html('展开更多('+btn.data('count')+')'); target.hide(); target.eq(0).show(); target.eq(1).show();