diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index 3ddbcd9d6..263155f91 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -60,13 +60,13 @@ class IssuesController < ApplicationController def index if params[:set_filter] != "1" @project_base_tag = (params[:project_id] || @issue.project) ? 'base_projects':'base' - @issues = @project.issues.visible.all - @issue_count = @issues.count + @issues_filter = Issue.where(:project_id => @project.id).order('updated_on desc') + @issue_count = @issues_filter.count @limit = 10 @is_remote = true @issue_pages = Paginator.new @issue_count, @limit, params['page'] || 1 @offset ||= @issue_pages.offset - @issues = paginateHelper @issues, @limit + @issues = paginateHelper @issues_filter, @limit # if params[:set_filter] # @set_filter = params[:set_filter] # end diff --git a/app/controllers/versions_controller.rb b/app/controllers/versions_controller.rb index 2dce0f37f..7e9d63e58 100644 --- a/app/controllers/versions_controller.rb +++ b/app/controllers/versions_controller.rb @@ -80,14 +80,11 @@ class VersionsController < ApplicationController all } format.api - format.xls { - @issues = @version.fixed_issues.visible. - includes(:status, :tracker, :priority). - reorder("#{Tracker.table_name}.position, #{Issue.table_name}.id"). - 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)) - } + # format.xls { + # @issues = @version.fixed_issues.visible.includes(:status, :tracker, :priority).reorder("#{Tracker.table_name}.position, #{Issue.table_name}.id").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 diff --git a/app/views/issues/index.html.erb b/app/views/issues/index.html.erb index d1bde712e..73decbf95 100644 --- a/app/views/issues/index.html.erb +++ b/app/views/issues/index.html.erb @@ -44,12 +44,30 @@ // }); } - function remote_function_export() { - $("#export_issue_hidden").attr("value","1"); -// $("#issue_query_form").attr("format","xls"); - $("#issue_query_form").submit(); + function remote_function_export(project_id) { +// $("#export_issue_hidden").attr("value","1"); +// $("#issue_query_form").attr("set_filter","1"); +// $("#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"); - $("#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() { @@ -106,11 +124,11 @@
  • 关闭<%#= @issues_filter_author_count %><%= @project.issues.where(:status_id => 5 ).visible.all.count %>
  • - - " class="hw_btn_blue fr" alt="导出EXCEL" onclick="remote_function_export()">导出EXCEL + + " id="sendexcel" class="hw_btn_blue fr" alt="导出EXCEL" onclick="remote_function_export('<%= @project.id %>')">导出EXCEL <% 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 'export_issue_hidden', '0' %> @@ -122,12 +140,12 @@ 清除
    - + <%= calendar_for('issue_create_date_end_show')%>
    - + <%= calendar_for('issue_create_date_start_show')%>
    diff --git a/app/views/layouts/_base_project_top.html.erb b/app/views/layouts/_base_project_top.html.erb index c99155fad..2610b585b 100644 --- a/app/views/layouts/_base_project_top.html.erb +++ b/app/views/layouts/_base_project_top.html.erb @@ -25,13 +25,13 @@

    项目评分: <% 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, {:controller => 'projects', :action => 'show_projects_score', :remote => true, :id => @project.id}, :class => "sy_cblue" ) %> - <% end %> + <%# end %> <% end %> 浏览:<%= @project.visits.to_i %> diff --git a/app/views/projects/_project_jours.html.erb b/app/views/projects/_project_jours.html.erb index a9f145c8a..248834823 100644 --- a/app/views/projects/_project_jours.html.erb +++ b/app/views/projects/_project_jours.html.erb @@ -9,7 +9,7 @@ div.respond-form .reply_btn{margin-left:565px;margin-top:5px;} 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;} <%= content_for(:header_tags) do %> <%= import_ke(enable_at: false, prettify: false, init_activity: false) %> diff --git a/app/views/projects/settings.html.erb b/app/views/projects/settings.html.erb index faf3a48f8..0d4a55ff9 100644 --- a/app/views/projects/settings.html.erb +++ b/app/views/projects/settings.html.erb @@ -40,7 +40,7 @@ <% end %>

  • 组织
  • <% if User.current.allowed_to?(:manage_versions, @project) %> -
  • 版本
  • +
  • <%= l(:milestone) %>
  • <% end %> <% if User.current.allowed_to?(:manage_repository, @project) %> diff --git a/app/views/users/_project_issue.html.erb b/app/views/users/_project_issue.html.erb index e4f24d4e0..5a0065f86 100644 --- a/app/views/users/_project_issue.html.erb +++ b/app/views/users/_project_issue.html.erb @@ -95,7 +95,9 @@
    - +
    + <%= render :partial => 'users/project_issue_reply', :locals => {:activity => activity, :user_activity_id => user_activity_id} %> +