From 704337fe5698e1d279d669ee5b63c1b48391b218 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Sun, 6 Sep 2015 15:16:32 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=85=A8=E9=80=89=E6=89=80=E6=9C=89?= =?UTF-8?q?=E8=B5=84=E6=BA=90=EF=BC=8C=E7=84=B6=E5=90=8E=E5=86=8D=E7=94=A8?= =?UTF-8?q?=E5=85=B3=E9=94=AE=E5=AD=97=E8=BF=87=E6=BB=A4=EF=BC=8C=E5=85=A8?= =?UTF-8?q?=E9=80=89checkbox=E5=92=8C=E9=80=89=E6=8B=A9=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E7=9A=84=E4=B8=AA=E6=95=B0=E5=BA=94=E8=AF=A5=E6=B8=85=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/resource_search.js.erb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 From 55758c3c2fb0d1191938de8c3f2ef42e4b5f8bc5 Mon Sep 17 00:00:00 2001 From: cxt Date: Sun, 6 Sep 2015 15:31:26 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E7=AD=9B=E9=80=89=E6=8E=89=E6=9C=AA?= =?UTF-8?q?=E5=8F=91=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(); From 08fd7e125f4552e7669c82a94971ef1587570667 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Sun, 6 Sep 2015 15:41:43 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E4=BB=8E=E8=B5=84?= =?UTF-8?q?=E6=BA=90=E5=BA=93=E5=BC=95=E5=85=A5=E4=BD=9C=E8=80=85=E4=B8=BA?= =?UTF-8?q?=E5=88=AB=E4=BA=BA=E7=9A=84=E8=B5=84=E6=BA=90=E4=B8=8D=E8=83=BD?= =?UTF-8?q?=E5=88=A0=E9=99=A4bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/users_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index e3480b238..366ed5ff2 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