diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2009-02-21 19:29:33 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2009-02-21 19:29:33 +0000 |
commit | 57d10ed89396d7df1344dc1a9446cedf3c602933 (patch) | |
tree | 1708a40b5bf16e6b89ab2f1555e74d065b6ba93b | |
parent | 28e4ff8957170c61f5cd0b7e7ab4f8e40e1afc80 (diff) | |
download | redmine-57d10ed89396d7df1344dc1a9446cedf3c602933.tar.gz redmine-57d10ed89396d7df1344dc1a9446cedf3c602933.zip |
Merged r2262, r2341 and r2486 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/0.8-stable@2513 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | app/helpers/application_helper.rb | 10 | ||||
-rw-r--r-- | app/views/layouts/base.rhtml | 2 | ||||
-rw-r--r-- | doc/CHANGELOG | 3 | ||||
-rw-r--r-- | lib/redmine/export/pdf.rb | 2 | ||||
-rw-r--r-- | test/functional/issues_controller_test.rb | 2 |
5 files changed, 12 insertions, 7 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index c1acc5eb0..f82c01384 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -487,11 +487,11 @@ module ApplicationHelper full_messages = [] object.errors.each do |attr, msg| next if msg.nil? - msg = msg.first if msg.is_a? Array + msg = [msg] unless msg.is_a?(Array) if attr == "base" - full_messages << l(msg) + full_messages << l(*msg) else - full_messages << "« " + (l_has_string?("field_" + attr) ? l("field_" + attr) : object.class.human_attribute_name(attr)) + " » " + l(msg) unless attr == "custom_values" + full_messages << "« " + (l_has_string?("field_" + attr) ? l("field_" + attr) : object.class.human_attribute_name(attr)) + " » " + l(*msg) unless attr == "custom_values" end end # retrieve custom values error messages @@ -499,8 +499,8 @@ module ApplicationHelper object.custom_values.each do |v| v.errors.each do |attr, msg| next if msg.nil? - msg = msg.first if msg.is_a? Array - full_messages << "« " + v.custom_field.name + " » " + l(msg) + msg = [msg] unless msg.is_a?(Array) + full_messages << "« " + v.custom_field.name + " » " + l(*msg) end end end diff --git a/app/views/layouts/base.rhtml b/app/views/layouts/base.rhtml index 0de3b0e3d..2d0cc2cf5 100644 --- a/app/views/layouts/base.rhtml +++ b/app/views/layouts/base.rhtml @@ -58,7 +58,7 @@ <div id="ajax-indicator" style="display:none;"><span><%= l(:label_loading) %></span></div> <div id="footer"> - Powered by <%= link_to Redmine::Info.app_name, Redmine::Info.url %> © 2006-2008 Jean-Philippe Lang + Powered by <%= link_to Redmine::Info.app_name, Redmine::Info.url %> © 2006-2009 Jean-Philippe Lang </div> </div> <%= call_hook :view_layouts_base_body_bottom %> diff --git a/doc/CHANGELOG b/doc/CHANGELOG index 7b94aa9d3..0bd3b8a19 100644 --- a/doc/CHANGELOG +++ b/doc/CHANGELOG @@ -9,6 +9,9 @@ http://www.redmine.org/ * Send an email to the user when an administrator activates a registered user * Strip keywords from received email body +* Footer updated to 2009 +* Fixed: exporting an issue with attachments to PDF raises an error +* Fixed: "too few arguments" error may occur on activerecord error translation == 2009-02-15 v0.8.1 diff --git a/lib/redmine/export/pdf.rb b/lib/redmine/export/pdf.rb index 5d75494ed..932f1a812 100644 --- a/lib/redmine/export/pdf.rb +++ b/lib/redmine/export/pdf.rb @@ -21,6 +21,8 @@ require 'rfpdf/chinese' module Redmine module Export module PDF + include ActionView::Helpers::NumberHelper + class IFPDF < FPDF include GLoc attr_accessor :footer_date diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb index d282d09e6..9228f7c02 100644 --- a/test/functional/issues_controller_test.rb +++ b/test/functional/issues_controller_test.rb @@ -253,7 +253,7 @@ class IssuesControllerTest < Test::Unit::TestCase end def test_show_export_to_pdf - get :show, :id => 1, :format => 'pdf' + get :show, :id => 3, :format => 'pdf' assert_response :success assert_equal 'application/pdf', @response.content_type assert @response.body.starts_with?('%PDF') |