diff --git a/app/controllers/files_controller.rb b/app/controllers/files_controller.rb index 70bce9566..988768414 100644 --- a/app/controllers/files_controller.rb +++ b/app/controllers/files_controller.rb @@ -325,7 +325,7 @@ class FilesController < ApplicationController @containers = [ Project.includes(:attachments).reorder(sort).find(@project.id)] show_attachments @containers - get_attachment_for_tip(@all_attachments) + # get_attachment_for_tip(@all_attachments) @tag_list = attachment_tag_list @all_attachments @@ -378,7 +378,7 @@ class FilesController < ApplicationController @containers = [ Course.includes(:attachments).reorder(sort).find(@course.id)] show_attachments @containers - get_attachment_for_tip(@all_attachments) + # get_attachment_for_tip(@all_attachments) @tag_list = attachment_tag_list @all_attachments diff --git a/app/views/files/_course_file.html.erb b/app/views/files/_course_file.html.erb index 5291c2d06..b5a15bc1f 100644 --- a/app/views/files/_course_file.html.erb +++ b/app/views/files/_course_file.html.erb @@ -115,21 +115,22 @@
-

- <%= render :partial => "files/tip_attachment_count" %> + + + +

共有 <%= @all_attachments.count%> 个资源

+

+ <%= render :partial => 'course_file_filter_order', :locals => {:remote => @is_remote, :sort => @sort, :order => @order} %>

-

- <%= render :partial => 'course_file_filter_order', :locals => {:remote => @is_remote, :sort => @sort, :order => @order} %> -

-
- - -

私有资源:
仅对本班级成员可见

-

公共资源:
对所有用户可见

-
+ + + + + +
<%= render :partial => 'course_list',:locals => {course: @course,all_attachments: @all_attachments,sort:@sort,order:@order,curse_attachments:@obj_attachments} %> diff --git a/app/views/files/_project_file.html.erb b/app/views/files/_project_file.html.erb index ebda40e6e..7504fbecb 100644 --- a/app/views/files/_project_file.html.erb +++ b/app/views/files/_project_file.html.erb @@ -85,9 +85,10 @@
-

- <%= render :partial => "files/tip_attachment_count" %> -

+ + + +

共有 <%= @all_attachments.count%> 个资源

<% if @order == "asc" %> 按 <%= link_to "时间",params.merge(:sort=>"created_on:desc"),:class => "f_b c_grey",:remote => @is_remote %><%= render partial: 'files/arrow_show',locals: { sort: @sort,order:@order,current:"created_on"} %> /  @@ -102,14 +103,14 @@

- <% if !User.current.member_of?(@project) && show_attachment_tip(@project.id, "Project") %> -
- - -

私有资源:
仅对本项目成员可见

-

公共资源:
对所有用户可见

-
- <% end %> + <%# if !User.current.member_of?(@project) && show_attachment_tip(@project.id, "Project") %> + + + + + + + <%# end %>
<%= render :partial => 'project_list',:locals => {project: @project, all_attachments: @all_attachments, sort:@sort, order:@order, project_attachments:@obj_attachments} %> diff --git a/app/views/files/search_tag_attachment.js.erb b/app/views/files/search_tag_attachment.js.erb index 8aaff5aa5..11d4ad297 100644 --- a/app/views/files/search_tag_attachment.js.erb +++ b/app/views/files/search_tag_attachment.js.erb @@ -3,6 +3,6 @@ $("#pages").html('<%= pagination_links_full @feedback_pages, @feedback_count, :per_page_links => false, :remote => true, :flag => true %>'); <% else %> $("#resource_list").html("<%= escape_javascript( render :partial => 'files/project_file',:locals => {project:@project, all_attachments:@all_attachments, sort:@sort, order:@order, project_attachments:@obj_attachments}) %>"); - $("#tip_attachment_count").html("<%= escape_javascript( render :partial => 'files/tip_attachment_count') %>"); +// $("#tip_attachment_count").html("<%#= escape_javascript( render :partial => 'files/tip_attachment_count') %>"); $("#pages").html('<%= pagination_links_full @feedback_pages, @feedback_count, :per_page_links => false, :remote => true, :flag => true %>'); <% end %> diff --git a/app/views/layouts/base_courses.html.erb b/app/views/layouts/base_courses.html.erb index ed54fcdce..472a18b02 100644 --- a/app/views/layouts/base_courses.html.erb +++ b/app/views/layouts/base_courses.html.erb @@ -1,6 +1,6 @@ <%# course_model %> -<%# course_file_num = visable_attachemnts_incourse(@course).count%> -<% course_file_num = Attachment.where(:container_type => "Course", :container_id => @course.id).count %> +<% course_file_num = visable_attachemnts_incourse(@course).count%> +<%# course_file_num = Attachment.where(:container_type => "Course", :container_id => @course.id).count %> <% is_teacher = User.current.logged? && (User.current.admin? || User.current.allowed_to?(:as_teacher,@course)) %> <% homework_num = visable_course_homework @course %>