diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb
index f59fba784..cfa2e2bf0 100644
--- a/app/controllers/issues_controller.rb
+++ b/app/controllers/issues_controller.rb
@@ -624,9 +624,17 @@ class IssuesController < ApplicationController
@project_sort = 'issues.updated_on asc'
end
end
-
+ # 搜索结果
@issues_filter = @query.issues(:order => @project_sort)
+ # if params[:type] == 1 || params[:type].nil?
+ # @results = @issues_filter
+ # elsif params[:type] == "2"
+ # @results = @issues_filter.collect{|result| result.status_id !=5 }
+ # elsif params[:type] == "3"
+ # @results = @issues_filter.collect{|result| result.status_id !=5 }
+ # end
+
#统计
@results = {}
diff --git a/app/views/issues/_statistics.html.erb b/app/views/issues/_statistics.html.erb
index a015a12fd..b144b8e6b 100644
--- a/app/views/issues/_statistics.html.erb
+++ b/app/views/issues/_statistics.html.erb
@@ -1,164 +1,36 @@
-
-
issue统计
-
-
-
-
-
- -
- <%= link_to "所有#{@issues_filter.count}".html_safe, "", :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_1", :id => "new_roadmap_type_1" %>
-
- -
- <%= link_to "打开#{@issue_open_count}".html_safe, "", :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_1", :id => "new_roadmap_type_2" %>
-
- -
- <%= link_to "锁定#{@issue_close_count}".html_safe, "", :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_1", :id => "new_roadmap_type_3" %>
-
-
-
-
新建
-
-
-
-
-
- 指派给 |
- 所有 |
- 需求 |
- 任务 |
- 缺陷 |
- 支持 |
- 周报 |
-
-
-
- <% @results.each do |k,v|%>
-
- <%= v[:name] %> |
- <%= v[0] %> |
- <%= v[2] %> |
- <%= v[4] %> |
- <%= v[1] %> |
- <%= v[3] %> |
- <%= v[5] %> |
-
- <% end %>
-
- Total |
- <%= @alltotal[0] %> |
- <%= @alltotal[2] %> |
- <%= @alltotal[4] %> |
- <%= @alltotal[1] %> |
- <%= @alltotal[3] %> |
- <%= @alltotal[5] %> |
-
-
-
-
+
+
issue统计
+
+
+
+
+ -
+ <%= link_to "所有#{@issues_filter.count}".html_safe, "", :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_1", :id => "new_roadmap_type_1" %>
+
+ -
+ <%= link_to "打开#{@issue_open_count}".html_safe, "", :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_1", :id => "new_roadmap_type_2" %>
+
+ -
+ <%= link_to "锁定#{@issue_close_count}".html_safe, "", :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_1", :id => "new_roadmap_type_3" %>
+
+
+
+
新建
+
+
+ <%= render "issues/statistics_all" %>
+
+
+ <%= render "issues/statistics_open" %>
+
+
+ <%= render "issues/statistics_lock" %>
+
-
-
-
-
- 指派给 |
- 所有 |
- 需求 |
- 任务 |
- 缺陷 |
- 支持 |
- 周报 |
-
-
-
- <% @results.each do |k,v|%>
- <% if v[6] > 0 %>
-
- <%= v[:name] %> |
- <%= v[6] %> |
- <%= v[8] %> |
- <%= v[10] %> |
- <%= v[7] %> |
- <%= v[9] %> |
- <%= v[11] %> |
-
- <% end %>
- <% end %>
-
- Total |
- <%= @opentotal[0] %> |
- <%= @opentotal[2] %> |
- <%= @opentotal[4] %> |
- <%= @opentotal[1] %> |
- <%= @opentotal[3] %> |
- <%= @opentotal[5] %> |
-
-
-
-
+
+
diff --git a/app/views/issues/_statistics_all.html.erb b/app/views/issues/_statistics_all.html.erb
new file mode 100644
index 000000000..0ef85057a
--- /dev/null
+++ b/app/views/issues/_statistics_all.html.erb
@@ -0,0 +1,35 @@
+
+
+
+ 指派给 |
+ 所有 |
+ 需求 |
+ 任务 |
+ 缺陷 |
+ 支持 |
+ 周报 |
+
+
+
+ <% @results.each do |k,v|%>
+
+ <%= v[:name] %> |
+ <%= v[0] %> |
+ <%= v[2] %> |
+ <%= v[4] %> |
+ <%= v[1] %> |
+ <%= v[3] %> |
+ <%= v[5] %> |
+
+ <% end %>
+
+ Total |
+ <%= @alltotal[0] %> |
+ <%= @alltotal[2] %> |
+ <%= @alltotal[4] %> |
+ <%= @alltotal[1] %> |
+ <%= @alltotal[3] %> |
+ <%= @alltotal[5] %> |
+
+
+
\ No newline at end of file
diff --git a/app/views/issues/_statistics_lock.html.erb b/app/views/issues/_statistics_lock.html.erb
new file mode 100644
index 000000000..f8628144e
--- /dev/null
+++ b/app/views/issues/_statistics_lock.html.erb
@@ -0,0 +1,37 @@
+
+
+
+ 指派给 |
+ 所有 |
+ 需求 |
+ 任务 |
+ 缺陷 |
+ 支持 |
+ 周报 |
+
+
+
+ <% @results.each do |k,v|%>
+ <% if v[12] > 0 %>
+
+ <%= v[:name] %> |
+ <%= v[12] %> |
+ <%= v[14] %> |
+ <%= v[16] %> |
+ <%= v[13] %> |
+ <%= v[15] %> |
+ <%= v[17] %> |
+
+ <% end %>
+ <% end %>
+
+ Total |
+ <%= @closetotal[0] %> |
+ <%= @closetotal[2] %> |
+ <%= @closetotal[4] %> |
+ <%= @closetotal[1] %> |
+ <%= @closetotal[3] %> |
+ <%= @closetotal[5] %> |
+
+
+
\ No newline at end of file
diff --git a/app/views/issues/_statistics_open.html.erb b/app/views/issues/_statistics_open.html.erb
new file mode 100644
index 000000000..d5eb843f7
--- /dev/null
+++ b/app/views/issues/_statistics_open.html.erb
@@ -0,0 +1,37 @@
+
+
+
+ 指派给 |
+ 所有 |
+ 需求 |
+ 任务 |
+ 缺陷 |
+ 支持 |
+ 周报 |
+
+
+
+ <% @results.each do |k,v|%>
+ <% if v[6] > 0 %>
+
+ <%= v[:name] %> |
+ <%= v[6] %> |
+ <%= v[8] %> |
+ <%= v[10] %> |
+ <%= v[7] %> |
+ <%= v[9] %> |
+ <%= v[11] %> |
+
+ <% end %>
+ <% end %>
+
+ Total |
+ <%= @opentotal[0] %> |
+ <%= @opentotal[2] %> |
+ <%= @opentotal[4] %> |
+ <%= @opentotal[1] %> |
+ <%= @opentotal[3] %> |
+ <%= @opentotal[5] %> |
+
+
+
\ No newline at end of file
diff --git a/app/views/issues/index.html.erb b/app/views/issues/index.html.erb
index 7a899f87b..a9f70f999 100644
--- a/app/views/issues/index.html.erb
+++ b/app/views/issues/index.html.erb
@@ -203,7 +203,7 @@
-