From 7c76584e14b656e8a64898133f520aa9cf5fc422 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Tue, 27 Sep 2016 19:44:24 +0800 Subject: [PATCH] =?UTF-8?q?issue=E5=8A=9F=E8=83=BD=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/issues_controller.rb | 6 +++--- app/controllers/versions_controller.rb | 13 +++++-------- app/views/projects/_project_jours.html.erb | 2 +- app/views/projects/settings.html.erb | 2 +- app/views/versions/index.html.erb | 2 +- 5 files changed, 11 insertions(+), 14 deletions(-) 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/projects/_project_jours.html.erb b/app/views/projects/_project_jours.html.erb index a9f145c8a..6db3995ff 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:606px;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 %>
»<%= l(:label_versions_description)%>
<%=h version.description %>
-»<%= link_to "导出:Excel", version_path(version, :format => 'xls') %>
+