adding "all" action to work with the new design

pull/6827/head
Romano Licker 13 years ago
parent e1b01f1c13
commit 9aec1d5de4
  1. 2
      app/views/hooks/different_formats/_view_issues_sidebar_issues_bottom.rhtml
  2. 2
      app/views/hooks/printable_issues/_view_issues_sidebar_issues_bottom.rhtml
  3. 2
      lib/xls_report/cost_reports_controller_patch.rb
  4. 2
      lib/xls_report/issues_controller_patch.rb

@ -1,5 +1,5 @@
<h3><%= l(:different_formats) %></h3>
<% if params[:action] == "index" %>
<% if params[:action] == "index" or params[:action] == "all" %>
<%= link_to l(:print_with_description), :controller => 'issues', :action => 'printable', :project_id => @project %><br />
<%= link_to l(:export_to_excel), :controller => 'issues', :action => 'index', :format => 'xls', :project_id => @project %><br />
<% end %>

@ -1,3 +1,3 @@
<% if params[:action] == "index" %>
<% if params[:action] == "index" or params[:action] == "all" %>
<%= link_to l(:print_with_description), :controller => 'issues', :action => 'printable', :project_id => @project %><br />
<% end %>

@ -18,7 +18,7 @@ if require_dependency 'cost_reports_controller'
module InstanceMethods
def excel_export?
params["action"] == "index" && params["format"] == "xls"
(params["action"] == "index" or params[:action] == "all") && params["format"] == "xls"
end
def ensure_project_scope_with_excel_export?

@ -16,7 +16,7 @@ module XlsReport
# If the index action is called, hook the xls format into the issues controller
def respond_to(&block)
if (params["action"].to_sym == :index && params["format"].to_s.downcase == "xls")
if ((params["action"].to_sym == :index or params[:action] == "all") && params["format"].to_s.downcase == "xls")
super do |format|
yield format
format.xls do

Loading…
Cancel
Save