修改项目资源附件统计功能

This commit is contained in:
huang 2016-01-08 11:11:11 +08:00
parent fd2197a73d
commit dd4d687559
1 changed files with 1 additions and 1 deletions

View File

@ -91,7 +91,7 @@
<%= l(:label_member) %><%= link_to "#{@project.members.count}", project_member_path(@project), :class => 'info_foot_num c_blue', :id => 'project_members_number' %> <%= l(:label_member) %><%= link_to "#{@project.members.count}", project_member_path(@project), :class => 'info_foot_num c_blue', :id => 'project_members_number' %>
<span>|&nbsp;</span> <span>|&nbsp;</span>
<%= l(:label_user_watcher) %><%= link_to "#{@project.watcher_users.count}", {:controller=>"projects", :action=>"watcherlist", :id => @project.id}, :class => 'info_foot_num c_blue' %> <%= l(:label_user_watcher) %><%= link_to "#{@project.watcher_users.count}", {:controller=>"projects", :action=>"watcherlist", :id => @project.id}, :class => 'info_foot_num c_blue' %>
<% attaments_num = @project.attachments.count+Attachment.where(["`container_type` = 'Version' and `container_id` in (?)",@project.versions.map{ |v| v.id}]).all.count %> <% attaments_num = @project.attachments.count %>
<% unless @project.enabled_modules.where("name = 'files'").empty? %> <% unless @project.enabled_modules.where("name = 'files'").empty? %>
<span>|&nbsp;</span> <span>|&nbsp;</span>
<%= l(:project_module_attachments) %> <%= l(:project_module_attachments) %>