Issue统计页面,增加用户筛选过滤条件的提示
This commit is contained in:
parent
c2924e06e6
commit
de44385548
|
@ -1,3 +1,4 @@
|
|||
#coding=utf-8
|
||||
# Redmine - project management software
|
||||
# Copyright (C) 2006-2013 Jean-Philippe Lang
|
||||
#
|
||||
|
@ -676,6 +677,59 @@ class IssuesController < ApplicationController
|
|||
|
||||
def statistics
|
||||
@project = Project.find(params[:id])
|
||||
params[:author_id].to_i != 0 ? (@author = User.find(params[:author_id].to_i).show_name) : @author = 0
|
||||
case params[:tracker_id].to_i
|
||||
when 1
|
||||
@tracker = "缺陷"
|
||||
when 2
|
||||
@tracker = "功能"
|
||||
when 3
|
||||
@tracker = "支持"
|
||||
when 4
|
||||
@tracker = "任务"
|
||||
when 5
|
||||
@tracker = "周报"
|
||||
when 0
|
||||
@tracker = 0
|
||||
end
|
||||
params[:subject].blank? ? @search = 0 : @search = params[:subject]
|
||||
params[:assigned_to_id].to_i != 0 ? (@assigned = User.find(params[:assigned_to_id].to_i).show_name) : @assigned = 0
|
||||
params[:fixed_version_id].to_i != 0 ? (@version = Version.find(params[:fixed_version_id].to_i).name) : @version = 0
|
||||
params[:done_ratio].to_i != -1 ? (@done = params[:done_ratio].to_i) : @done = -1
|
||||
case params[:priority_id].to_i
|
||||
when 1
|
||||
@prior = "低"
|
||||
when 2
|
||||
@prior = "正常"
|
||||
when 3
|
||||
@prior = "高"
|
||||
when 4
|
||||
@prior = "紧急"
|
||||
when 5
|
||||
@prior = "立刻"
|
||||
when 0
|
||||
@prior = 0
|
||||
end
|
||||
case params[:status_id].to_i
|
||||
when 1
|
||||
@status = "新增"
|
||||
when 2
|
||||
@status = "正在解决"
|
||||
when 3
|
||||
@status = "已解决"
|
||||
when 4
|
||||
@status = "反馈"
|
||||
when 5
|
||||
@status = "关闭"
|
||||
when 6
|
||||
@status = "拒绝"
|
||||
when 0
|
||||
@status = 0
|
||||
end
|
||||
params[:issue_create_date_start].blank? ? @start_time = 0 : @start_time = params[:issue_create_date_start]
|
||||
params[:issue_create_date_end].blank? ? @end_time = 0 : @end_time = params[:issue_create_date_end]
|
||||
@filter_condition = true
|
||||
@filter_condition = false if (@author == 0 && @tracker == 0 && @search == 0 && @assigned == 0 && @version == 0 && @done == -1 && @prior ==0 && @status == 0 && @start_time ==0 && @end_time)
|
||||
if @project.nil?
|
||||
render_404
|
||||
end
|
||||
|
|
|
@ -2,6 +2,48 @@
|
|||
<div class="myissues_head mb5">
|
||||
<h2 class="ml15">issue统计</h2>
|
||||
</div>
|
||||
<div class="fl" style="color:#7f7f7f;">
|
||||
<div class="fl" style="width: auto;">
|
||||
过滤条件:
|
||||
</div>
|
||||
<div class="fl" style="width: 880px;">
|
||||
<% if @filter_condition %>
|
||||
<% if @search != 0%>
|
||||
搜索关键字:“<span class="c_red"><%= @search %></span>”、
|
||||
<% end%>
|
||||
<% if @start_time != 0%>
|
||||
开始日期:“<span class="c_red"><%= @start_time %></span>”、
|
||||
<% end %>
|
||||
<% if @end_time != 0 %>
|
||||
结束日期:“<span class="c_red"><%= @end_time %></span>”、
|
||||
<% end %>
|
||||
<% if @author != 0 %>
|
||||
发布人:“<span class="c_red"><%= @author %></span>”、
|
||||
<% end %>
|
||||
<% if @assigned != 0 %>
|
||||
指派人:“<span class="c_red"><%= @assigned %></span>”、
|
||||
<% end %>
|
||||
<% if @tracker != 0 %>
|
||||
类型:“<span class="c_red"><%= @tracker %></span>”、
|
||||
<% end %>
|
||||
<% if @prior != 0 %>
|
||||
优先度:“<span class="c_red"><%= @prior %></span>”、
|
||||
<% end %>
|
||||
<% if @version != 0 %>
|
||||
里程碑:“<span class="c_red"><%= @version %></span>”、
|
||||
<% end %>
|
||||
<% if @status != 0 %>
|
||||
状态:“<span class="c_red"><%= @status %></span>”、
|
||||
<% end %>
|
||||
<% if @done != -1 %>
|
||||
完成度:“<span class="c_red"><%= @done %>%</span>”、
|
||||
<% end %>
|
||||
<% else %>
|
||||
无
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="clear">
|
||||
<div>
|
||||
<ul class="new_roadmap_nav fl" style="margin-left: 0px">
|
||||
|
@ -22,7 +64,7 @@
|
|||
<%= render "issues/statistics_all" %>
|
||||
</div>
|
||||
<div id="merge_record_2" class="undis">
|
||||
<%= render "issues/statistics_open" %>
|
||||
<%= render "issues/statistics_open" %>
|
||||
</div>
|
||||
<div id="merge_record_3" class="undis">
|
||||
<%= render "issues/statistics_lock" %>
|
||||
|
@ -30,7 +72,7 @@
|
|||
|
||||
<script>
|
||||
|
||||
// 导航选择效果
|
||||
// 导航选择效果
|
||||
function g(o){
|
||||
return document.getElementById(o);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue