issue列表过滤条件
This commit is contained in:
parent
ca00f0b9f8
commit
56ac8b61c9
|
@ -76,12 +76,14 @@ class IssuesController < ApplicationController
|
|||
# else
|
||||
# @limit = 10#per_page_option
|
||||
# end
|
||||
@tracker_id = params[:tracker_id]
|
||||
@assign_to_id = params[:assigned_to_id]
|
||||
@author_id = params[:author_id]
|
||||
@priority_id = params[:priority_id]
|
||||
@status_id = params[:status_id]
|
||||
@subject = params[:subject]
|
||||
@done_ratio = params[:done_ratio]
|
||||
@fixed_version_id = params[:fixed_version_id]
|
||||
@issue_count = @query.issue_count
|
||||
# @issue_pages = Paginator.new @issue_count, @limit, params['page']
|
||||
# params[:page] = (params[:page] || 1).to_i + 1 #页码需要加1
|
||||
|
|
|
@ -126,6 +126,10 @@ module IssuesHelper
|
|||
end
|
||||
end
|
||||
|
||||
def options_for_version_isuue_list(project)
|
||||
versions = Version.where(:project_id => project, :status => "open").map{|version| version.name}.unshift(["里程碑", 0])
|
||||
end
|
||||
|
||||
def render_issue_subject_with_tree(issue)
|
||||
s = ''
|
||||
ancestors = issue.root? ? [] : issue.ancestors.visible.all
|
||||
|
|
|
@ -0,0 +1,91 @@
|
|||
<div class="issues_con fl">
|
||||
<div class="clear mb5">
|
||||
<a href="<%= new_project_issue_path(@project)%>" class="sy_btn_green fl mr10">新 增</a>
|
||||
<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>
|
||||
</ul>
|
||||
</div><!--issues_statistics end-->
|
||||
<a href="<%=project_issues_path(:project_id => @project, :format => 'xls')%>" class="hw_btn_blue fr" alt="导出EXCEL">导出EXCEL</a>
|
||||
</div>
|
||||
<% unless @project.enabled_modules.where("name = 'issue_tracking'").empty? %>
|
||||
<%= form_tag({:controller => 'issues', :action => 'index', :project_id => @project},:remote=>'true', :method => :get,:id=>"issue_query_form", :class => 'query_form') do %>
|
||||
<%= hidden_field_tag 'set_filter', '1' %>
|
||||
<div class="clear mb10">
|
||||
<div class="hw_search_box fl ">
|
||||
<input class="hw_search-input" placeholder="请输入问题名称" type="text" id="v_subject" name="subject" onkeypress="EnterPress(event)" onkeydown="EnterPress()">
|
||||
<a href="javascript:void(0);" class="hw_btn_search" onclick="remote_function();" ></a>
|
||||
</div>
|
||||
<a href="javascript:void(0);" class="sy_btn_grey fl ml5" onclick="nh_reset_form();">清除</a>
|
||||
<div class="issues_filter_data fr">
|
||||
<input name="issue_create_date_start" nhname="date_val" type="hidden"/>
|
||||
<%= text_field_tag 'issue_create_date_start_show', '开始日期', :readonly => true, :size => 13, :nhname => 'date_show', :class => 'issues_calendar_input fl '%>
|
||||
<%= calendar_for('issue_create_date_start_show') %>
|
||||
|
||||
<input name="issue_create_date_end" nhname="date_val" type="hidden"/>
|
||||
<%= text_field_tag 'issue_create_date_end_show', '结束日期', :readonly => true, :size => 13, :nhname => 'date_show', :class => 'issues_calendar_input fl'%>
|
||||
<%= calendar_for('issue_create_date_end_show') %>
|
||||
|
||||
<!--<input type="text" placeholder="开始日期" class="issues_calendar_input fl " ><a href="" class="issues_data_img fl" style="border-right:none;"></a>-->
|
||||
<!--<input type="text" placeholder="结束日期" class="issues_calendar_input fl " ><a href="" class="issues_data_img fl"></a>-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="issues_con_list" style="position: relative;">
|
||||
<ul id="issues_list_nav" >
|
||||
<li id="issues_list_nav_1" class="issues_nav_hover" onclick="HoverLi(1);">
|
||||
<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>
|
||||
</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>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
</ul>
|
||||
<div class="issues_filter ">
|
||||
<div class="issues_form_filter mt5 mr5">
|
||||
<%= select(:issue, :tracker_id, [["缺陷",1],["功能",2],["支持",3],["任务",4],["周报",5]].unshift(["类型",0]),
|
||||
{:include_blank => false, :selected => @tracker_id ? @tracker_id : 0},
|
||||
{:onchange => "remote_function();", :id => "tracker_id", :name => "tracker_id", :class => "fl issues_filter_select_min"}) %>
|
||||
<%= select( :issue, :user_id, principals_options_for_isuue_list(@project),
|
||||
{ :include_blank => false,:selected=>@assign_to_id ? @assign_to_id : 0},
|
||||
{:onchange=>"remote_function();",:id=>"assigned_to_id",:name=>"assigned_to_id",:class=>"fl"})
|
||||
%>
|
||||
|
||||
<%= select(:issue, :fixed_version_id, options_for_version_isuue_list(@project),
|
||||
{:include_blank => false, :selected => @fixed_version_id ? @fixed_version_id : 0},
|
||||
{:onchange => "remote_function();", :id => "fixed_version_id", :name => "fixed_version_id", :class => "f1"}) %>
|
||||
|
||||
<%= select( :issue,:status, [["新增",1],["正在解决",2],["已解决",3],["反馈",4],["关闭",5],["拒绝",6]].unshift(["状态",0]),
|
||||
{ :include_blank => false,:selected=>@status_id ? @status_id : 0
|
||||
},
|
||||
{:onchange=>"remote_function();",:id=>"status_id",:name=>"status_id",:class=>"fl issues_filter_select_min"}
|
||||
) %>
|
||||
|
||||
<%= select(:issue, :done_ratio, [["10%",1],["20%",2],["30%",3],["40%",4],["50%",5],["60%",6],["70%",7],["80%",8],["90%",9],["10%",10]].unshift(["完成度",0]),
|
||||
{:include_blank => false, :selected => @done_ratio ? @done_ratio : 0 },
|
||||
{:onchange => "remote_function();", :id => "done_ratio", :name => "done_ratio", :class => "f1"}) %>
|
||||
|
||||
<%= select(:issue, :test, [["最早创建",1],["最早更新",2]].unshift(["排序",0]),
|
||||
{:include_blank => false, :selected => @order ? @order : 0 },
|
||||
{:onchange => "remote_function();", :id => "test", :name => "test", :class => "fr issues_filter_select_min"}) %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div><!--issues_filter end-->
|
||||
<% if @issues.empty? %>
|
||||
<p class="nodata"><%= l(:label_no_data) %></p>
|
||||
<% else %>
|
||||
<div id="issue_list">
|
||||
<%= render :partial => 'issues/all_list', :locals => {:issues => @issues, :query => @query,:issue_pages=>@issue_pages,:issue_count=>@issue_count,:project=>@project,:subject=>@subject} %>
|
||||
</div>
|
||||
<% end %>
|
||||
<%#= render :partial => 'issues/all_list', :locals => {:issues => @issues, :query => @query,:issue_pages=>@issue_pages,:issue_count=>@issue_count,:project=>@project,:subject=>@subject} %>
|
||||
</div><!--issues_con_list end-->
|
||||
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
|
@ -1,183 +1,3 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>缺陷列表及头部</title>
|
||||
<link href="css/common.css" rel="stylesheet" type="text/css" />
|
||||
<link href="css/style.css" rel="stylesheet" type="text/css" />
|
||||
<script type="text/javascript" language="javascript">
|
||||
//issues列表
|
||||
function g(o){
|
||||
return document.getElementById(o);
|
||||
}
|
||||
function HoverLi(n){
|
||||
//如果有N个标签,就将i<=N;
|
||||
for(var i=1;i<=3;i++){
|
||||
g('issues_list_nav_'+i).className='issues_nav_nomal';
|
||||
g('issues_list_content_'+i).className='undis';
|
||||
}
|
||||
g('issues_list_content_'+n).className='dis';
|
||||
g('issues_list_nav_'+n).className='issues_nav_hover';
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="sy_contanier" style=" width:1000px; margin:0 auto;">
|
||||
<div class="sy_class_infobox mb10 clear">
|
||||
<div class="homepagePostSetting" >
|
||||
<ul>
|
||||
<li class="homepagePostSettingIcon">
|
||||
<ul class="homepagePostSettiongText">
|
||||
<li><a href="javascript:void(0);" class="postOptionLink">项目配置</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="sy_class_logo fl"><img src="images/project/logo_pro.jpg" width="110" height="110" alt="班级logo" /></div>
|
||||
<div class="sy_class_id fl"><p>邀请码<br /><span class="sy_corange">Y7AUZ</span></p></div>
|
||||
<div class="sy_class_info fl ml15">
|
||||
<div class="sy_class_titbox clear">
|
||||
<h3 class="fl sy_class_title"><a href="javascript:void(0);"class="mr5 c_dark">尹刚</a>/<a href="javascript:void(0);"class=" ml5 c_dark">Trustie Forge</a></h3><span class="sy_new_orange fl ml10 mt5">私有</span>
|
||||
</div>
|
||||
<p class="sy_cgrey ">
|
||||
<span class=" mr15">项目评分:<a href="javascript:void(0);" class="sy_cblue">123</a></span>
|
||||
<span class=" mr15">浏览:<a href="javascript:void(0);" class="sy_corange">123</a></span>
|
||||
<span class=" mr15">关注:<a href="javascript:void(0);" class="sy_corange">123</a></span>
|
||||
<span class=" mr15">成员:<a href="javascript:void(0);" class="sy_corange">123</a></span>
|
||||
</p>
|
||||
<div class="">
|
||||
<a href="javascript:void(0);" class="sy_btn_orange" > 关注</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class=" fl mr10" style="width:240px; height:800px;background:#ddd;"></div>
|
||||
|
||||
<!--缺陷列表开始-->
|
||||
<div class="issues_con fl">
|
||||
<div class="clear mb5">
|
||||
<a href="<%= new_project_issue_path(@project)%>" class="sy_btn_green fl mr10">新 增</a>
|
||||
<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>
|
||||
</ul>
|
||||
</div><!--issues_statistics end-->
|
||||
<a href="<%=project_issues_path(:project_id => @project, :format => 'xls')%>" class="hw_btn_blue fr" alt="导出EXCEL">导出EXCEL</a>
|
||||
</div>
|
||||
<div class="clear mb10">
|
||||
<div class="hw_search_box fl ">
|
||||
<input class="hw_search-input" placeholder="输入学生登录名/姓名/学号进行搜索" type="text" id="v_subject" name="subject" onkeypress="EnterPress(event)" onkeydown="EnterPress()">
|
||||
<a href="javascript:void(0);" class="hw_btn_search" onclick="remote_function();" ></a>
|
||||
</div>
|
||||
<a href="javascript:void(0);" class="sy_btn_grey fl ml5" onclick="nh_reset_form();">清除</a>
|
||||
<div class="issues_filter_data fr">
|
||||
<input type="text" placeholder="开始日期" class="issues_calendar_input fl " ><a href="" class="issues_data_img fl" style="border-right:none;"></a>
|
||||
<input type="text" placeholder="结束日期" class="issues_calendar_input fl " ><a href="" class="issues_data_img fl"></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="issues_con_list" style="position: relative;">
|
||||
<ul id="issues_list_nav" >
|
||||
<li id="issues_list_nav_1" class="issues_nav_hover" onclick="HoverLi(1);">
|
||||
<a href="javascript:void(0);" 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);" id="issues_type_2" >指派给我<span class="issues_nav_tag ml5"><%= @project.issues.where(:assigned_to_id => User.current.id ).visible.all.count %></span></a>
|
||||
</li>
|
||||
<li id="issues_list_nav_3" onclick="HoverLi(3);">
|
||||
<a href="javascript:void(0);" id="issues_type_3" >我的发布<span class="issues_nav_tag ml5"><%= @project.issues.where(:author_id => User.current.id ).visible.all.count %></span></a>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
</ul>
|
||||
<div class="issues_filter ">
|
||||
<form class="issues_form_filter mt5 mr5">
|
||||
<select placeholder=" 类型" class="fl issues_filter_select_min" >
|
||||
<option value="0" selected="selected">类型</option>
|
||||
<option value="8166">缺陷</option>
|
||||
<option value="8166">功能</option>
|
||||
<option value="8166">支持</option>
|
||||
<option value="8166">任务</option>
|
||||
<option value="8166">周报</option>
|
||||
</select>
|
||||
<%= select( :issue, :user_id, principals_options_for_isuue_list(@project),
|
||||
{ :include_blank => false,:selected=>@assign_to_id ? @assign_to_id : 0
|
||||
},
|
||||
{:onchange=>"remote_function();",:id=>"assigned_to_id",:name=>"assigned_to_id",:class=>"fl"}
|
||||
)
|
||||
%>
|
||||
<select placeholder=" 里程碑" class="fl">
|
||||
<option value="0" selected="selected">里程碑</option>
|
||||
<option value="8166">20160505</option>
|
||||
<option value="8166">20160505</option>
|
||||
</select>
|
||||
<%= select( :issue,:status, [["新增",1],["正在解决",2],["已解决",3],["反馈",4],["关闭",5],["拒绝",6]].unshift(["状态",0]),
|
||||
{ :include_blank => false,:selected=>@status_id ? @status_id : 0
|
||||
},
|
||||
{:onchange=>"remote_function();",:id=>"status_id",:name=>"status_id",:class=>"fl issues_filter_select_min"}
|
||||
)
|
||||
%>
|
||||
<select placeholder=" 完成度" class="fl ">
|
||||
<option value="0" selected="selected">完成度</option>
|
||||
<option value="8166">0%</option>
|
||||
<option value="8166">10%</option>
|
||||
<option value="8166">20%</option>
|
||||
<option value="8166">30%</option>
|
||||
<option value="8166">40%</option>
|
||||
<option value="8166">50%</option>
|
||||
<option value="8166">60%</option>
|
||||
<option value="8166">70%</option>
|
||||
<option value="8166">80%</option>
|
||||
<option value="8166">90%</option>
|
||||
<option value="8166">100%</option>
|
||||
</select>
|
||||
<select placeholder=" 排序" class="fl issues_filter_select_min">
|
||||
<option value="0" selected="selected">排序</option>
|
||||
<option value="8166">最新创建</option>
|
||||
<option value="8166">最早创建</option>
|
||||
<option value="8166">最近更新</option>
|
||||
<option value="8166">最早更新</option>
|
||||
</select>
|
||||
</form>
|
||||
<div class="cl"></div>
|
||||
</div><!--issues_filter end-->
|
||||
<div id="issues_list_content_1">
|
||||
<%= render :partial => 'issues/all_list', :locals => {:issues => @issues, :query => @query,:issue_pages=>@issue_pages,:issue_count=>@issue_count,:project=>@project,:subject=>@subject} %>
|
||||
</div><!--issues_list_content_1 end-->
|
||||
|
||||
<div id="issues_list_content_2" class="undis">
|
||||
ddd
|
||||
|
||||
</div><!--issues_list_content_2 end-->
|
||||
<div id="issues_list_content_3" class="undis">
|
||||
|
||||
ddd
|
||||
</div><!--issues_list_content_3 end-->
|
||||
</div><!--issues_con_list end-->
|
||||
|
||||
</div>
|
||||
<!--缺陷列表结束-->
|
||||
</div>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<%= content_for(:header_tags) do %>
|
||||
<%= import_ke(enable_at: true,init_activity: true) %>
|
||||
<% end %>
|
||||
|
@ -239,7 +59,7 @@
|
|||
// 点击的时候让过滤条件选中assign_to
|
||||
function switch_assign_to(assign) {
|
||||
var assign = "option[value =" + assign + "]"
|
||||
$("#assignToMe").click(function(){
|
||||
$("#issues_type_2").click(function(){
|
||||
|
||||
});
|
||||
$("select[id='assigned_to_id']").find(assign).attr("selected", "selected");
|
||||
|
@ -264,152 +84,81 @@
|
|||
|
||||
</script>
|
||||
<div class="homepageRight mt0 ml10" >
|
||||
<div class="homepageRightBanner">
|
||||
<div class="NewsBannerName"><%= l(:label_issue_tracking) %></div>
|
||||
</div>
|
||||
<div class="resources mt10" >
|
||||
<% unless @project.enabled_modules.where("name = 'issue_tracking'").empty? %>
|
||||
<%= form_tag({:controller => 'issues', :action => 'index', :project_id => @project},:remote=>'true', :method => :get,:id=>"issue_query_form", :class => 'query_form') do %>
|
||||
<%= hidden_field_tag 'set_filter', '1' %>
|
||||
<div class="problem_search fr" >
|
||||
<input class="problem_search_input fl" id="v_subject" type="text" name="subject" placeholder="请输入问题名称" onkeypress="EnterPress(event)" onkeydown="EnterPress()">
|
||||
<a href="javascript:void(0)" class="problem_search_btn fl" onclick="remote_function();" >搜索</a>
|
||||
<a href="javascript:void(0)" class="grey_btn fl ml10 f14" onclick="nh_reset_form();" >清空</a>
|
||||
</div><!--problem_search end-->
|
||||
<%#= link_to '新建问题', new_project_issue_path(@project) , :class => "green_u_btn fr ml10" %>
|
||||
<p class="problem_p fl" ><%= l(:label_issues_sum) %>:<a href="javascript:void(0)" class="c_red"><%= @project.project_score.issue_num %></a>
|
||||
<%= l(:lable_issues_undo) %>:<a href="javascript:void(0)" class="c_red"><%= @project.issues.where('status_id in (1,2,4,6)').visible.all.count %> </a>
|
||||
</p>
|
||||
|
||||
<div class="cl"></div>
|
||||
<div id="filter_form" class="fl">
|
||||
|
||||
<%= select( :issue, :user_id, principals_options_for_isuue_list(@project),
|
||||
{ :include_blank => false,:selected=>@assign_to_id ? @assign_to_id : 0
|
||||
},
|
||||
{:onchange=>"remote_function();",:id=>"assigned_to_id",:name=>"assigned_to_id",:class=>"w90 mr18"}
|
||||
)
|
||||
%>
|
||||
<%= select( :issue,:prior, [["低",1],["正常",2],["高",3],["紧急",4],["立刻",5]].unshift(["优先级",0]),
|
||||
{ :include_blank => false,:selected=>@priority_id ? @priority_id : 0
|
||||
},
|
||||
{:onchange=>"remote_function();",:id=>"priority_id",:name=>"priority_id",:class=>"w90 mr18"}
|
||||
)
|
||||
%>
|
||||
<%= select( :issue,:status, [["新增",1],["正在解决",2],["已解决",3],["反馈",4],["关闭",5],["拒绝",6]].unshift(["状态",0]),
|
||||
{ :include_blank => false,:selected=>@status_id ? @status_id : 0
|
||||
},
|
||||
{:onchange=>"remote_function();",:id=>"status_id",:name=>"status_id",:class=>"w90 mr18"}
|
||||
)
|
||||
%>
|
||||
<%= select( :issue,:user_id, @project.members.order("lower(users.login)").map{|c| [c.name, c.user_id]}.unshift(["作者",0]),
|
||||
{ :include_blank => false,:selected=>@author_id ? @author_id : 0
|
||||
},
|
||||
{:onchange=>"remote_function();",:id=>"author_id",:name=>"author_id",:class=>"w90 mr18"}
|
||||
)
|
||||
%>
|
||||
</div><!--filter_form end-->
|
||||
<a href="javascript:void(0);" onclick="switch_assign_to(<%= User.current.id %>)" id="assignToMe">指派我的</a>
|
||||
<a href="javascript:void(0);" onclick="all_reset_form();">所有的</a>
|
||||
<a href="javascript:void(0);" onclick="createByMe(<%= User.current.id %>)" id="createByMe">我发布的</a>
|
||||
|
||||
|
||||
<div>
|
||||
<div class="fl"> </div>
|
||||
<div>
|
||||
<input name="issue_create_date_start" nhname="date_val" type="hidden"/>
|
||||
<%= text_field_tag 'issue_create_date_start_show', '创建日期起始',:readonly=>true, :size=>13, :nhname=>'date_show',:style=>'float:left;'%>
|
||||
<%= calendar_for('issue_create_date_start_show') %>
|
||||
</div>
|
||||
<div style="float:left;"> - </div>
|
||||
<div>
|
||||
<input name="issue_create_date_end" nhname="date_val" type="hidden"/>
|
||||
<%= text_field_tag 'issue_create_date_end_show', '创建日期结束',:readonly=>true, :size=>13, :nhname=>'date_show',:style=>'float:left;'%>
|
||||
<%= calendar_for('issue_create_date_end_show') %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<% end %>
|
||||
|
||||
<div class="cl"></div>
|
||||
<% end %>
|
||||
<%= render :partial => 'issues/new_issue_list', :locals => {:issues => @issues, :query => @query,:issue_pages=>@issue_pages,:issue_count=>@issue_count,:project=>@project,:subject=>@subject} %>
|
||||
<div class="contextual">
|
||||
<% if !@query.new_record? && @query.editable_by?(User.current) %>
|
||||
<%= link_to l(:button_edit), edit_query_path(@query), :class => 'icon icon-edit' %>
|
||||
<%= delete_link query_path(@query) %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<% html_title(@query.new_record? ? l(:label_issue_plural) : @query.name) %>
|
||||
<div style="clear:right; ">
|
||||
</div>
|
||||
|
||||
<div class="contextual">
|
||||
<% if !@query.new_record? && @query.editable_by?(User.current) %>
|
||||
<%= link_to l(:button_edit), edit_query_path(@query), :class => 'icon icon-edit' %>
|
||||
<%= delete_link query_path(@query) %>
|
||||
<% end %>
|
||||
</div>
|
||||
<%= error_messages_for 'query' %>
|
||||
|
||||
<% html_title(@query.new_record? ? l(:label_issue_plural) : @query.name) %>
|
||||
<div style="clear:right; ">
|
||||
</div>
|
||||
|
||||
<%= error_messages_for 'query' %>
|
||||
|
||||
<% if @query.valid? %>
|
||||
<% if @issues.empty? %>
|
||||
<p class="nodata">
|
||||
<%= l(:label_no_data) %>
|
||||
</p>
|
||||
<% else %>
|
||||
<div id="issue_list">
|
||||
<% if @query.valid? %>
|
||||
<% if @issues.empty? %>
|
||||
<p class="nodata">
|
||||
<%= l(:label_no_data) %>
|
||||
</p>
|
||||
<% else %>
|
||||
<div id="issue_list">
|
||||
<%= render :partial => 'issues/list', :locals => {:issues => @issues, :query => @query,:issue_pages=>@issue_pages,:issue_count=>@issue_count,:project=>@project,:subject=>@subject} %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<% end %>
|
||||
|
||||
<div style="float: left; padding-top: 30px">
|
||||
<%= link_to "导出:Excel", project_issues_path(:project_id => @project, :format => 'xls') %>
|
||||
<%# other_formats_links do |f| %>
|
||||
<%#= f.link_to "XLS", :url => params, :remote => false %>
|
||||
<%#= f.link_to 'PDF', :url => params %>
|
||||
<%# end %>
|
||||
</div>
|
||||
|
||||
<div id="csv-export-options" style="display:none;">
|
||||
<h3 class="title"><%= l(:label_export_options, :export_format => 'CSV') %></h3>
|
||||
<%= form_tag(params.merge({:format => 'csv', :page => nil}), :method => :get, :id => 'csv-export-form') do %>
|
||||
<p>
|
||||
<label>
|
||||
<%= radio_button_tag 'columns', 'all' %>
|
||||
<%= l(:description_all_columns) %>
|
||||
</label>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<label>
|
||||
<%= check_box_tag 'description', '1', @query.has_column?(:description) %>
|
||||
<%= l(:field_description) %>
|
||||
</label>
|
||||
</p>
|
||||
|
||||
<p class="buttons">
|
||||
<%= submit_tag l(:button_export), :name => nil, :onclick => "hideModal(this);" %>
|
||||
<%= submit_tag l(:button_cancel), :name => nil, :onclick => "hideModal(this);", :type => 'button' %>
|
||||
</p>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<%= call_hook(:view_issues_index_bottom, {:issues => @issues, :project => @project, :query => @query}) %>
|
||||
<% content_for :sidebar do %>
|
||||
<%= render :partial => 'issues/sidebar' %>
|
||||
<% end %>
|
||||
|
||||
<div style="float: left; padding-top: 30px">
|
||||
<%= link_to "导出:Excel", project_issues_path(:project_id => @project, :format => 'xls') %>
|
||||
<%# other_formats_links do |f| %>
|
||||
<%#= f.link_to "XLS", :url => params, :remote => false %>
|
||||
<%#= f.link_to 'PDF', :url => params %>
|
||||
<%# end %>
|
||||
</div>
|
||||
<% content_for :header_tags do %>
|
||||
<%= auto_discovery_link_tag(:atom,
|
||||
{:query_id => @query, :format => 'atom',
|
||||
:page => nil, :key => User.current.rss_key},
|
||||
:title => l(:label_issue_plural)) %>
|
||||
<%= auto_discovery_link_tag(:atom,
|
||||
{:controller => 'journals', :action => 'index',
|
||||
:query_id => @query, :format => 'atom',
|
||||
:page => nil, :key => User.current.rss_key},
|
||||
:title => l(:label_changes_details)) %>
|
||||
<% end %>
|
||||
|
||||
<div id="csv-export-options" style="display:none;">
|
||||
<h3 class="title"><%= l(:label_export_options, :export_format => 'CSV') %></h3>
|
||||
<%= form_tag(params.merge({:format => 'csv', :page => nil}), :method => :get, :id => 'csv-export-form') do %>
|
||||
<p>
|
||||
<label>
|
||||
<%= radio_button_tag 'columns', 'all' %>
|
||||
<%= l(:description_all_columns) %>
|
||||
</label>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<label>
|
||||
<%= check_box_tag 'description', '1', @query.has_column?(:description) %>
|
||||
<%= l(:field_description) %>
|
||||
</label>
|
||||
</p>
|
||||
|
||||
<p class="buttons">
|
||||
<%= submit_tag l(:button_export), :name => nil, :onclick => "hideModal(this);" %>
|
||||
<%= submit_tag l(:button_cancel), :name => nil, :onclick => "hideModal(this);", :type => 'button' %>
|
||||
</p>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<%= call_hook(:view_issues_index_bottom, {:issues => @issues, :project => @project, :query => @query}) %>
|
||||
<% content_for :sidebar do %>
|
||||
<%= render :partial => 'issues/sidebar' %>
|
||||
<% end %>
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= auto_discovery_link_tag(:atom,
|
||||
{:query_id => @query, :format => 'atom',
|
||||
:page => nil, :key => User.current.rss_key},
|
||||
:title => l(:label_issue_plural)) %>
|
||||
<%= auto_discovery_link_tag(:atom,
|
||||
{:controller => 'journals', :action => 'index',
|
||||
:query_id => @query, :format => 'atom',
|
||||
:page => nil, :key => User.current.rss_key},
|
||||
:title => l(:label_changes_details)) %>
|
||||
<% end %>
|
||||
|
||||
<%= context_menu issues_context_menu_path %>
|
||||
<%= context_menu issues_context_menu_path %>
|
||||
</div>
|
Loading…
Reference in New Issue