Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
This commit is contained in:
commit
970de3374c
|
@ -507,6 +507,7 @@ class UsersController < ApplicationController
|
||||||
att_copy = atta.copy
|
att_copy = atta.copy
|
||||||
att_copy.container_id = nil
|
att_copy.container_id = nil
|
||||||
att_copy.container_type = nil
|
att_copy.container_type = nil
|
||||||
|
att_copy.author_id = User.current.id
|
||||||
att_copy.copy_from = atta.id
|
att_copy.copy_from = atta.id
|
||||||
att_copy.save
|
att_copy.save
|
||||||
@attachments << att_copy
|
@attachments << att_copy
|
||||||
|
@ -767,7 +768,7 @@ class UsersController < ApplicationController
|
||||||
@page = params[:page] ? params[:page].to_i + 1 : 0
|
@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_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(",") + ")"
|
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')"
|
project_types = "('Message','Issue')"
|
||||||
if params[:type].present?
|
if params[:type].present?
|
||||||
case params[:type]
|
case params[:type]
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<% has_commit = has_commit_poll?(activity.id ,User.current)%>
|
<% has_commit = has_commit_poll?(activity.id ,User.current)%>
|
||||||
<% poll_name = activity.polls_name.empty? ? l(:label_poll_new) : activity.polls_name%>
|
<% 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="resources mt10">
|
||||||
<div class="homepagePostBrief">
|
<div class="homepagePostBrief">
|
||||||
<div class="homepagePostPortrait">
|
<div class="homepagePostPortrait">
|
||||||
|
@ -43,4 +44,5 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<% end %>
|
|
@ -23,7 +23,7 @@
|
||||||
target.show();
|
target.show();
|
||||||
}else{
|
}else{
|
||||||
btn.data('init',0);
|
btn.data('init',0);
|
||||||
btn.html('点击展开更多回复('+btn.data('count')+')');
|
btn.html('展开更多('+btn.data('count')+')');
|
||||||
target.hide();
|
target.hide();
|
||||||
target.eq(0).show();
|
target.eq(0).show();
|
||||||
target.eq(1).show();
|
target.eq(1).show();
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
$("#resources_list").html('<%= escape_javascript( render :partial => 'resources_list' ,:locals=>{ :attachments => @attachments})%>');
|
$("#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 %>');
|
$("#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);
|
Loading…
Reference in New Issue