Merge branch 'develop' of https://git.trustie.net/jacknudt/trustieforge into develop
This commit is contained in:
commit
5d234dc849
|
@ -60,13 +60,13 @@ class IssuesController < ApplicationController
|
||||||
def index
|
def index
|
||||||
if params[:set_filter] != "1"
|
if params[:set_filter] != "1"
|
||||||
@project_base_tag = (params[:project_id] || @issue.project) ? 'base_projects':'base'
|
@project_base_tag = (params[:project_id] || @issue.project) ? 'base_projects':'base'
|
||||||
@issues = @project.issues.visible.all
|
@issues_filter = Issue.where(:project_id => @project.id).order('updated_on desc')
|
||||||
@issue_count = @issues.count
|
@issue_count = @issues_filter.count
|
||||||
@limit = 10
|
@limit = 10
|
||||||
@is_remote = true
|
@is_remote = true
|
||||||
@issue_pages = Paginator.new @issue_count, @limit, params['page'] || 1
|
@issue_pages = Paginator.new @issue_count, @limit, params['page'] || 1
|
||||||
@offset ||= @issue_pages.offset
|
@offset ||= @issue_pages.offset
|
||||||
@issues = paginateHelper @issues, @limit
|
@issues = paginateHelper @issues_filter, @limit
|
||||||
# if params[:set_filter]
|
# if params[:set_filter]
|
||||||
# @set_filter = params[:set_filter]
|
# @set_filter = params[:set_filter]
|
||||||
# end
|
# end
|
||||||
|
|
|
@ -80,14 +80,11 @@ class VersionsController < ApplicationController
|
||||||
all
|
all
|
||||||
}
|
}
|
||||||
format.api
|
format.api
|
||||||
format.xls {
|
# format.xls {
|
||||||
@issues = @version.fixed_issues.visible.
|
# @issues = @version.fixed_issues.visible.includes(:status, :tracker, :priority).reorder("#{Tracker.table_name}.position, #{Issue.table_name}.id").all
|
||||||
includes(:status, :tracker, :priority).
|
# filename = "#{@version.name.to_s}_#{l(:label_issue_list_xls)}.xls"
|
||||||
reorder("#{Tracker.table_name}.position, #{Issue.table_name}.id").
|
# send_data(issue_list_xls(@issues), :type => 'application/octet-stream', :filename => filename_for_content_disposition(filename))
|
||||||
all
|
# }
|
||||||
filename = "#{@version.name.to_s}_#{l(:label_issue_list_xls)}.xls"
|
|
||||||
send_data(issue_list_xls(@issues), :type => 'application/octet-stream', :filename => filename_for_content_disposition(filename))
|
|
||||||
}
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -44,12 +44,30 @@
|
||||||
// });
|
// });
|
||||||
}
|
}
|
||||||
|
|
||||||
function remote_function_export() {
|
function remote_function_export(project_id) {
|
||||||
$("#export_issue_hidden").attr("value","1");
|
// $("#export_issue_hidden").attr("value","1");
|
||||||
// $("#issue_query_form").attr("format","xls");
|
// $("#issue_query_form").attr("set_filter","1");
|
||||||
$("#issue_query_form").submit();
|
// $("#issue_query_form").attr("action","/projects/"+project_id+"/issues.xls");
|
||||||
|
// $("#issue_query_form").submit();
|
||||||
|
// $("#issue_query_form").attr("action","/projects/"+project_id+"/issues");
|
||||||
// $("#issue_query_form").removeAttr("format");
|
// $("#issue_query_form").removeAttr("format");
|
||||||
$("#export_issue_hidden").attr("value","0");
|
// $("#issue_query_form").attr("set_filter","0");
|
||||||
|
// $("#export_issue_hidden").attr("value","0");
|
||||||
|
|
||||||
|
var tracker_id = $("#tracker_id").attr("value");
|
||||||
|
var subject = $("#v_subject").attr("value");
|
||||||
|
var assigned_to_id = $("#assigned_to_id").attr("value");
|
||||||
|
var fixed_version_id = $("#fixed_version_id").attr("value");
|
||||||
|
var status_id = $("#status_id").attr("value");
|
||||||
|
var done_ratio = $("#done_ratio").attr("value");
|
||||||
|
var test = $("#test").attr("value");
|
||||||
|
var author_id = $("#author_id").attr("value");
|
||||||
|
var issue_create_date_start = $("#issue_date_start_issue_export").attr("value");
|
||||||
|
var issue_create_date_end = $("#issue_date_end_issue_export").attr("value");
|
||||||
|
$("#sendexcel").attr("href","/projects/"+project_id+"/issues.xls?export=true&set_filter=1&tracker_id="+tracker_id+"&assigned_to_id="+assigned_to_id+"&fixed_version_id="+fixed_version_id+"&status_id="+status_id+"&done_ratio="+done_ratio+"&test="+test+"&author_id="+author_id+"&subject="+subject+"&issue_create_date_start="+issue_create_date_start+"&issue_create_date_end="+issue_create_date_end);
|
||||||
|
///projects/1811/issues.xls?export=true&set_filter=1
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// function nh_reset_form() {
|
// function nh_reset_form() {
|
||||||
|
@ -106,11 +124,11 @@
|
||||||
<li>关闭<a class="issues_greycirbg_btn "><%#= @issues_filter_author_count %><%= @project.issues.where(:status_id => 5 ).visible.all.count %></a></li>
|
<li>关闭<a class="issues_greycirbg_btn "><%#= @issues_filter_author_count %><%= @project.issues.where(:status_id => 5 ).visible.all.count %></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div><!--issues_statistics end-->
|
</div><!--issues_statistics end-->
|
||||||
<!--<input type="button" class="hw_btn_blue fr" value="导出EXCEL" onclick="remote_function_export()">-->
|
<!--<input type="button" class="hw_btn_blue fr" value="导出EXCEL" onclick="remote_function_export('<%= @project.id %>')">-->
|
||||||
<a href="<%=project_issues_path(:project_id => @project, :format => 'xls', :export => true, :set_filter => "1")%>" class="hw_btn_blue fr" alt="导出EXCEL" onclick="remote_function_export()">导出EXCEL</a>
|
<a href="<%=project_issues_path(:project_id => @project, :format => 'xls', :export => true, :set_filter => "1")%>" id="sendexcel" class="hw_btn_blue fr" alt="导出EXCEL" onclick="remote_function_export('<%= @project.id %>')">导出EXCEL</a>
|
||||||
</div>
|
</div>
|
||||||
<% unless @project.enabled_modules.where("name = 'issue_tracking'").empty? %>
|
<% 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 %>
|
<%= form_tag({:controller => 'issues', :action => 'index', :project_id => @project},:remote=>'xls', :method => :get,:id=>"issue_query_form", :class => 'query_form') do %>
|
||||||
<%= hidden_field_tag 'set_filter', '1' %>
|
<%= hidden_field_tag 'set_filter', '1' %>
|
||||||
<%= hidden_field_tag 'export_issue_hidden', '0' %>
|
<%= hidden_field_tag 'export_issue_hidden', '0' %>
|
||||||
<!--<input id="exprot_issues_hidden" value="0" type="hidden">-->
|
<!--<input id="exprot_issues_hidden" value="0" type="hidden">-->
|
||||||
|
@ -122,12 +140,12 @@
|
||||||
<a href="javascript:void(0);" class="sy_btn_grey fl ml5" onclick="all_reset_form();">清除</a>
|
<a href="javascript:void(0);" class="sy_btn_grey fl ml5" onclick="all_reset_form();">清除</a>
|
||||||
|
|
||||||
<div class="calendar_div fr">
|
<div class="calendar_div fr">
|
||||||
<input name="issue_create_date_end" nhname="date_val" type="hidden"/>
|
<input id="issue_date_end_issue_export" name="issue_create_date_end" nhname="date_val" type="hidden"/>
|
||||||
<input type="text" nhname="date_show" id="issue_create_date_end_show" class="InputBox fl W120 calendar_input" readonly="readonly" size="13" placeholder="结束日期">
|
<input type="text" nhname="date_show" id="issue_create_date_end_show" class="InputBox fl W120 calendar_input" readonly="readonly" size="13" placeholder="结束日期">
|
||||||
<%= calendar_for('issue_create_date_end_show')%>
|
<%= calendar_for('issue_create_date_end_show')%>
|
||||||
</div>
|
</div>
|
||||||
<div class="calendar_div fr">
|
<div class="calendar_div fr">
|
||||||
<input name="issue_create_date_start" nhname="date_val" type="hidden"/>
|
<input id="issue_date_start_issue_export" name="issue_create_date_start" nhname="date_val" type="hidden"/>
|
||||||
<input type="text" nhname="date_show" id="issue_create_date_start_show" class="InputBox fl W120 calendar_input" readonly="readonly" size="13" placeholder="开始日期">
|
<input type="text" nhname="date_show" id="issue_create_date_start_show" class="InputBox fl W120 calendar_input" readonly="readonly" size="13" placeholder="开始日期">
|
||||||
<%= calendar_for('issue_create_date_start_show')%>
|
<%= calendar_for('issue_create_date_start_show')%>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -25,13 +25,13 @@
|
||||||
<p class="sy_cgrey">
|
<p class="sy_cgrey">
|
||||||
<span class=" mr15">项目评分:
|
<span class=" mr15">项目评分:
|
||||||
<% if @project.project_type == 0 %>
|
<% if @project.project_type == 0 %>
|
||||||
<% unless static_project_score(@project.project_score) == 0 %>
|
<%# unless static_project_score(@project.project_score) == 0 %>
|
||||||
<%= link_to(format("%.2f" ,static_project_score(@project.project_score)).to_i,
|
<%= link_to(format("%.2f" ,static_project_score(@project.project_score)).to_i,
|
||||||
{:controller => 'projects',
|
{:controller => 'projects',
|
||||||
:action => 'show_projects_score',
|
:action => 'show_projects_score',
|
||||||
:remote => true,
|
:remote => true,
|
||||||
:id => @project.id}, :class => "sy_cblue" ) %>
|
:id => @project.id}, :class => "sy_cblue" ) %>
|
||||||
<% end %>
|
<%# end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</span>
|
</span>
|
||||||
<span class=" mr15">浏览:<a class="sy_corange"><%= @project.visits.to_i %></a></span>
|
<span class=" mr15">浏览:<a class="sy_corange"><%= @project.visits.to_i %></a></span>
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
div.respond-form .reply_btn{margin-left:565px;margin-top:5px;}
|
div.respond-form .reply_btn{margin-left:565px;margin-top:5px;}
|
||||||
div.recall_con{width:570px;}
|
div.recall_con{width:570px;}
|
||||||
div.recall_con .reply_btn{margin-left:525px;margin-top:5px;}
|
div.recall_con .reply_btn{margin-left:585px;margin-top:5px;}
|
||||||
</style>
|
</style>
|
||||||
<%= content_for(:header_tags) do %>
|
<%= content_for(:header_tags) do %>
|
||||||
<%= import_ke(enable_at: false, prettify: false, init_activity: false) %>
|
<%= import_ke(enable_at: false, prettify: false, init_activity: false) %>
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
<li id="pro_st_tb_5" class="<%= show_memu == 'join_org' ? 'pro_st_hovertab' : 'pro_st_normaltab'%>" onclick="project_setting(5);">组织</li>
|
<li id="pro_st_tb_5" class="<%= show_memu == 'join_org' ? 'pro_st_hovertab' : 'pro_st_normaltab'%>" onclick="project_setting(5);">组织</li>
|
||||||
<% if User.current.allowed_to?(:manage_versions, @project) %>
|
<% if User.current.allowed_to?(:manage_versions, @project) %>
|
||||||
<li id="pro_st_tb_4" class="<%= show_memu == 'manage_versions' ? 'pro_st_hovertab' : 'pro_st_normaltab'%>" onclick="project_setting(4);">版本</li>
|
<li id="pro_st_tb_4" class="<%= show_memu == 'manage_versions' ? 'pro_st_hovertab' : 'pro_st_normaltab'%>" onclick="project_setting(4);"><%= l(:milestone) %></li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<!--<li id="pro_st_tb_5" class="pro_st_normaltab" onclick="project_setting(5);">问题类别</li>-->
|
<!--<li id="pro_st_tb_5" class="pro_st_normaltab" onclick="project_setting(5);">问题类别</li>-->
|
||||||
<% if User.current.allowed_to?(:manage_repository, @project) %>
|
<% if User.current.allowed_to?(:manage_repository, @project) %>
|
||||||
|
|
|
@ -95,7 +95,9 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
|
<div id="div_user_issue_reply_<%=user_activity_id%>">
|
||||||
|
<%= render :partial => 'users/project_issue_reply', :locals => {:activity => activity, :user_activity_id => user_activity_id} %>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(function(){
|
$(function(){
|
||||||
|
|
|
@ -58,7 +58,7 @@
|
||||||
<div class="roadmap_list">
|
<div class="roadmap_list">
|
||||||
<p class="f14 mb5">»<%= l(:label_versions_description)%></p>
|
<p class="f14 mb5">»<%= l(:label_versions_description)%></p>
|
||||||
<p><%=h version.description %></p>
|
<p><%=h version.description %></p>
|
||||||
<p class="f14 mb5">»<%= link_to "导出:Excel", version_path(version, :format => 'xls') %></p>
|
<!--p class="f14 mb5">»<%#= link_to "导出:Excel", version_path(version, :format => 'xls') %></p-->
|
||||||
</div><!--roadmap_list end-->
|
</div><!--roadmap_list end-->
|
||||||
</div><!--roadmap_box end-->
|
</div><!--roadmap_box end-->
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -623,7 +623,7 @@ zh:
|
||||||
label_course_news_description: '课程必须是高校正式开设的课程,或是围绕特定主题定期发布课程资料的公共开放课程;<br/>如果您想创建一个协作研究空间,请您前往“我的项目”页面创建项目,谢谢!'
|
label_course_news_description: '课程必须是高校正式开设的课程,或是围绕特定主题定期发布课程资料的公共开放课程;<br/>如果您想创建一个协作研究空间,请您前往“我的项目”页面创建项目,谢谢!'
|
||||||
label_course_board: 讨论区
|
label_course_board: 讨论区
|
||||||
label_version: 版本
|
label_version: 版本
|
||||||
label_version_new: 新建版本
|
label_version_new: 新建里程碑
|
||||||
|
|
||||||
label_close_versions: 关闭已完成的版本
|
label_close_versions: 关闭已完成的版本
|
||||||
label_confirmation: 确认
|
label_confirmation: 确认
|
||||||
|
|
Loading…
Reference in New Issue