项目导航栏数字错误

This commit is contained in:
daiao 2016-09-30 11:24:04 +08:00
parent 0ad71e0f64
commit acbc94af1a
1 changed files with 3 additions and 2 deletions

View File

@ -1,4 +1,5 @@
<% project_file_num = Attachment.where(:container_type => "Project", :container_id => @project.id).count %> <% project_file_num = Attachment.where(:container_type => "Project", :container_id => @project.id).count %>
<% project_issue_count =Issue.where(:project_id => @project.id).count%>
<div class="subNav"> <div class="subNav">
<%= link_to l(:label_activity), {:controller => 'projects', :action => 'show', :id => @project.id}, :class => "f14 c_blue02" %> <%= link_to l(:label_activity), {:controller => 'projects', :action => 'show', :id => @project.id}, :class => "f14 c_blue02" %>
<% unless ForgeActivity.where("project_id = ?", @project.id).count == 0 %> <% unless ForgeActivity.where("project_id = ?", @project.id).count == 0 %>
@ -8,8 +9,8 @@
<% unless @project.enabled_modules.where("name = 'issue_tracking'").empty? %> <% unless @project.enabled_modules.where("name = 'issue_tracking'").empty? %>
<div class="subNav"> <div class="subNav">
<%= link_to l(:label_issue_tracking), project_issues_path(@project, :remote => true), :class => "f14 c_blue02" %> <%= link_to l(:label_issue_tracking), project_issues_path(@project, :remote => true), :class => "f14 c_blue02" %>
<% if @issues_filter.count > 0 %> <% if project_issue_count > 0 %>
<a class="subnav_num">(<%= @issues_filter.count %>)</a> <a class="subnav_num">(<%= project_issue_count %>)</a>
<% end %> <% end %>
<% if User.current.member_of?(@project) %> <% if User.current.member_of?(@project) %>