This commit is contained in:
sw 2015-09-06 16:50:39 +08:00
commit 970de3374c
4 changed files with 9 additions and 4 deletions

View File

@ -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]

View File

@ -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 %>
<div class="resources mt10">
<div class="homepagePostBrief">
<div class="homepagePostPortrait">
@ -43,4 +44,5 @@
</div>
<div class="cl"></div>
</div>
</div>
</div>
<% end %>

View File

@ -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();

View File

@ -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%>);
$("#res_all_count").html(<%= @atta_count%>);
$("#res_count").html(0);
$("#checkboxAll").attr('checked',false);