diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index e3480b238..a6f1d15cb 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -507,6 +507,7 @@ class UsersController < ApplicationController att_copy = atta.copy att_copy.container_id = nil att_copy.container_type = nil + att_copy.author_id = User.current.id att_copy.copy_from = atta.id att_copy.save @attachments << att_copy @@ -767,7 +768,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(); diff --git a/app/views/users/resource_search.js.erb b/app/views/users/resource_search.js.erb index 894c1d2fa..d295ce003 100644 --- a/app/views/users/resource_search.js.erb +++ b/app/views/users/resource_search.js.erb @@ -1,3 +1,5 @@ $("#resources_list").html('<%= escape_javascript( render :partial => 'resources_list' ,:locals=>{ :attachments => @attachments})%>'); $("#pages").html('<%= pagination_links_full @atta_pages, @atta_count, :per_page_links => false, :remote => @is_remote, :flag => true %>'); -$("#res_all_count").html(<%= @atta_count%>); \ No newline at end of file +$("#res_all_count").html(<%= @atta_count%>); +$("#res_count").html(0); +$("#checkboxAll").attr('checked',false); \ No newline at end of file