socialforge/app/views/issues/_statistics.html.erb

152 lines
5.2 KiB
Plaintext
Raw Normal View History

2016-10-21 14:06:45 +08:00
<div class="myissues_head mb5">
<h2 class="ml15">issue统计</h2>
</div>
<div class="clear mb5">
<div class="issues_statistics fl">
<ul>
<li>所有<a style="cursor: pointer;" onclick="showResultAll();" class="issues_greycirbg_btn "><%= @issues_filter.count %></a></li>
<li>开启<a style="cursor: pointer;" onclick="showResultOpen();" class="issues_greycirbg_btn "><%= @issue_open_count %></a></li>
<li>关闭<a style="cursor: pointer;" onclick="showResultClose();" class="issues_greycirbg_btn "><%= @issue_close_count %></a></li>
</ul>
</div><!--issues_statistics end-->
<a href="<%= new_project_issue_path(@project)%>" class="sy_btn_green fr " >新建</a>
</div>
<div id="result_all" class="">
<table class="sy_new_table " cellpadding="0" cellspacing="0">
<thead>
<tr>
<td class="dis p10" style="width:166px;">指派给</td>
<td class="w130">所有</td>
<td class="w130">需求</td>
<td class="w130">任务</td>
<td class="w130">缺陷</td>
<td class="w130">支持</td>
<td class="w130">周报</td>
</tr>
</thead>
<tbody>
<% @results.each do |k,v|%>
<tr>
<td class="hidden dis p10" style="width:166px;"><%= v[:name] %></td>
<td class="w130"><%= v[0] %></td>
<td class="w130"><%= v[2] %></td>
<td class="w130"><%= v[4] %></td>
<td class="w130"><%= v[1] %></td>
<td class="w130"><%= v[3] %></td>
<td class="w130"><%= v[5] %></td>
</tr>
<% end %>
<tr>
<td class="hidden dis p10" style="width:166px;">Total</td>
<td class="w130"><%= @alltotal[0] %></td>
<td class="w130"><%= @alltotal[2] %></td>
<td class="w130"><%= @alltotal[4] %></td>
<td class="w130"><%= @alltotal[1] %></td>
<td class="w130"><%= @alltotal[3] %></td>
<td class="w130"><%= @alltotal[5] %></td>
</tr>
</tbody>
</table>
</div>
<div id="result_open" style="display: none">
<table class="sy_new_table " cellpadding="0" cellspacing="0">
<thead>
<tr>
<td class="dis p10" style="width:166px;">指派给</td>
<td class="w130">所有</td>
<td class="w130">需求</td>
<td class="w130">任务</td>
<td class="w130">缺陷</td>
<td class="w130">支持</td>
<td class="w130">周报</td>
</tr>
</thead>
<tbody>
<% @results.each do |k,v|%>
<% if v[6] > 0 %>
<tr>
<td class="hidden dis p10" style="width:166px;"><%= v[:name] %></td>
<td class="w130"><%= v[6] %></td>
<td class="w130"><%= v[8] %></td>
<td class="w130"><%= v[10] %></td>
<td class="w130"><%= v[7] %></td>
<td class="w130"><%= v[9] %></td>
<td class="w130"><%= v[11] %></td>
</tr>
<% end %>
<% end %>
<tr>
<td class="hidden dis p10" style="width:166px;">Total</td>
<td class="w130"><%= @opentotal[0] %></td>
<td class="w130"><%= @opentotal[2] %></td>
<td class="w130"><%= @opentotal[4] %></td>
<td class="w130"><%= @opentotal[1] %></td>
<td class="w130"><%= @opentotal[3] %></td>
<td class="w130"><%= @opentotal[5] %></td>
</tr>
</tbody>
</table>
</div>
<div id="result_close" style="display: none">
<table class="sy_new_table " cellpadding="0" cellspacing="0">
<thead>
<tr>
<td class="dis p10" style="width:166px;">指派给</td>
<td class="w130">所有</td>
<td class="w130">需求</td>
<td class="w130">任务</td>
<td class="w130">缺陷</td>
<td class="w130">支持</td>
<td class="w130">周报</td>
</tr>
</thead>
<tbody>
<% @results.each do |k,v|%>
<% if v[12] > 0 %>
<tr>
<td class="hidden dis p10" style="width:166px;"><%= v[:name] %></td>
<td class="w130"><%= v[12] %></td>
<td class="w130"><%= v[14] %></td>
<td class="w130"><%= v[16] %></td>
<td class="w130"><%= v[13] %></td>
<td class="w130"><%= v[15] %></td>
<td class="w130"><%= v[17] %></td>
</tr>
<% end %>
<% end %>
<tr>
<td class="hidden dis p10" style="width:166px;">Total</td>
<td class="w130"><%= @closetotal[0] %></td>
<td class="w130"><%= @closetotal[2] %></td>
<td class="w130"><%= @closetotal[4] %></td>
<td class="w130"><%= @closetotal[1] %></td>
<td class="w130"><%= @closetotal[3] %></td>
<td class="w130"><%= @closetotal[5] %></td>
</tr>
</tbody>
</table>
</div>
<script>
function showResultAll(){
$("#result_all").show();
$("#result_open").hide();
$("#result_close").hide();
}
function showResultOpen(){
$("#result_all").hide();
$("#result_open").show();
$("#result_close").hide();
}
function showResultClose(){
$("#result_all").hide();
$("#result_open").hide();
$("#result_close").show();
}
</script>