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
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
<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 %>
* 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
module Redmine
module Export
module PDF
+ include ActionView::Helpers::NumberHelper
+
class IFPDF < FPDF
include GLoc
attr_accessor :footer_date
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')