Merge branch 'rep_quality' of https://git.trustie.net/jacknudt/trustieforge into rep_quality

This commit is contained in:
guange 2016-09-26 21:19:42 +08:00
commit f3ac21ed42
5 changed files with 18 additions and 4 deletions

View File

@ -101,6 +101,8 @@ class IssuesController < ApplicationController
@project_sort = 'issues.updated_on asc'
end
end
@issues_filter_assign_count = @query.issues.select{|issue| issue.assigned_to_id == User.current.id }.count
@issues_filter_author_count = @query.issues.select{|issue| issue.author_id == User.current.id }.count
@issues_filter = @query.issues(:include => [:assigned_to, :tracker, :priority, :category, :fixed_version], :order => @project_sort)
@limit = 10
@is_remote = true

View File

@ -0,0 +1 @@
<span class="issues_nav_tag ml5" ><%= @issues_filter_assign_count %></span>

View File

@ -0,0 +1 @@
<span class="issues_nav_tag ml5"><%= @issues_filter_author_count %><%#= @project.issues.where(:author_id => User.current.id ).visible.all.count %></span>

View File

@ -91,8 +91,8 @@
<div class="issues_statistics fl">
<ul>
<li>所有<a href="javascript:void(0);" class="issues_greycirbg_btn "><%= @project.project_score.issue_num %></a></li>
<li>开启<a href="javascript:void(0);" class="issues_greycirbg_btn "><%= @project.issues.where('status_id in (1,2,3,4,6)').visible.all.count %></a></li>
<li>关闭<a href="javascript:void(0);" class="issues_greycirbg_btn "><%= @project.issues.where(:status_id => 5 ).visible.all.count %></a></li>
<li>开启<a href="javascript:void(0);" class="issues_greycirbg_btn "><%#= @issues_filter_assign_count %><%= @project.issues.where('status_id in (1,2,3,4,6)').visible.all.count %></a></li>
<li>关闭<a href="javascript:void(0);" class="issues_greycirbg_btn "><%#= @issues_filter_author_count %><%= @project.issues.where(:status_id => 5 ).visible.all.count %></a></li>
</ul>
</div><!--issues_statistics end-->
<a href="<%=project_issues_path(:project_id => @project, :format => 'xls')%>" class="hw_btn_blue fr" alt="导出EXCEL">导出EXCEL</a>
@ -127,13 +127,21 @@
<a href="javascript:void(0);" onclick="all_reset_form();" id="issues_type_1" >所有<span class="issues_nav_tag ml5"><%= @project.project_score.issue_num %></span></a>
</li>
<li id="issues_list_nav_2" onclick="HoverLi(2);">
<a href="javascript:void(0);" onclick="switch_assign_to(<%= User.current.id %>)" id="issues_type_2" >指派给我<span class="issues_nav_tag ml5"><%= @project.issues.where(:assigned_to_id => User.current.id ).visible.all.count %></span></a>
<a href="javascript:void(0);" onclick="switch_assign_to(<%= User.current.id %>)" id="issues_type_2" >指派给我
<span id="issue_assigned_count"><%= render :partial => "issues/issue_filter" %></span>
</a>
</li>
<li id="issues_list_nav_3" onclick="HoverLi(3);">
<a href="javascript:void(0);" onclick="createByMe(<%= User.current.id %>)" id="issues_type_3" >我的发布<span class="issues_nav_tag ml5"><%= @project.issues.where(:author_id => User.current.id ).visible.all.count %></span></a>
<a href="javascript:void(0);" onclick="createByMe(<%= User.current.id %>)" id="issues_type_3" >我的发布
<span id="issue_author_count"><%= render :partial => "issues/issue_filter_author" %></span>
</a>
</li>
<div class="cl"></div>
</ul>
<div class="issues_filter ">
<div class="issues_form_filter mt5 mr5">

View File

@ -1,4 +1,6 @@
//$("#issue_list").html("<%#= escape_javascript(render :partial => 'issues/list',:locals => {:issues => @issues, :query => @query,:issue_pages=>@issue_pages,:issue_count=>@issue_count})%>");
$("#issue_assigned_count").html("<%= escape_javascript(render :partial => 'issues/issue_filter') %>");
$("#issue_author_count").html("<%= escape_javascript(render :partial => 'issues/issue_filter_author') %>");
$("#issue_list").html("<%= escape_javascript(render :partial => 'issues/all_list',:locals => {:issues => @issues, :query => @query, :issue_pages=> @issue_pages, :issue_count => @issue_count, :project=> @project})%>");
$("#issue_list_pagination").html('<%= pagination_links_full @issue_pages, @issue_count, :issues => @issues, :per_page_links => false, :remote => @is_remote, :flag => true, :is_new => true %>');