##// END OF EJS Templates
Merged r2262, r2341 and r2486 from trunk....
Jean-Philippe Lang -
r2450:57d10ed89396
parent child
Show More
@@ -487,11 +487,11 module ApplicationHelper
487 full_messages = []
487 full_messages = []
488 object.errors.each do |attr, msg|
488 object.errors.each do |attr, msg|
489 next if msg.nil?
489 next if msg.nil?
490 msg = msg.first if msg.is_a? Array
490 msg = [msg] unless msg.is_a?(Array)
491 if attr == "base"
491 if attr == "base"
492 full_messages << l(msg)
492 full_messages << l(*msg)
493 else
493 else
494 full_messages << "&#171; " + (l_has_string?("field_" + attr) ? l("field_" + attr) : object.class.human_attribute_name(attr)) + " &#187; " + l(msg) unless attr == "custom_values"
494 full_messages << "&#171; " + (l_has_string?("field_" + attr) ? l("field_" + attr) : object.class.human_attribute_name(attr)) + " &#187; " + l(*msg) unless attr == "custom_values"
495 end
495 end
496 end
496 end
497 # retrieve custom values error messages
497 # retrieve custom values error messages
@@ -499,8 +499,8 module ApplicationHelper
499 object.custom_values.each do |v|
499 object.custom_values.each do |v|
500 v.errors.each do |attr, msg|
500 v.errors.each do |attr, msg|
501 next if msg.nil?
501 next if msg.nil?
502 msg = msg.first if msg.is_a? Array
502 msg = [msg] unless msg.is_a?(Array)
503 full_messages << "&#171; " + v.custom_field.name + " &#187; " + l(msg)
503 full_messages << "&#171; " + v.custom_field.name + " &#187; " + l(*msg)
504 end
504 end
505 end
505 end
506 end
506 end
@@ -58,7 +58,7
58 <div id="ajax-indicator" style="display:none;"><span><%= l(:label_loading) %></span></div>
58 <div id="ajax-indicator" style="display:none;"><span><%= l(:label_loading) %></span></div>
59
59
60 <div id="footer">
60 <div id="footer">
61 Powered by <%= link_to Redmine::Info.app_name, Redmine::Info.url %> &copy; 2006-2008 Jean-Philippe Lang
61 Powered by <%= link_to Redmine::Info.app_name, Redmine::Info.url %> &copy; 2006-2009 Jean-Philippe Lang
62 </div>
62 </div>
63 </div>
63 </div>
64 <%= call_hook :view_layouts_base_body_bottom %>
64 <%= call_hook :view_layouts_base_body_bottom %>
@@ -9,6 +9,9 http://www.redmine.org/
9
9
10 * Send an email to the user when an administrator activates a registered user
10 * Send an email to the user when an administrator activates a registered user
11 * Strip keywords from received email body
11 * Strip keywords from received email body
12 * Footer updated to 2009
13 * Fixed: exporting an issue with attachments to PDF raises an error
14 * Fixed: "too few arguments" error may occur on activerecord error translation
12
15
13
16
14 == 2009-02-15 v0.8.1
17 == 2009-02-15 v0.8.1
@@ -21,6 +21,8 require 'rfpdf/chinese'
21 module Redmine
21 module Redmine
22 module Export
22 module Export
23 module PDF
23 module PDF
24 include ActionView::Helpers::NumberHelper
25
24 class IFPDF < FPDF
26 class IFPDF < FPDF
25 include GLoc
27 include GLoc
26 attr_accessor :footer_date
28 attr_accessor :footer_date
@@ -253,7 +253,7 class IssuesControllerTest < Test::Unit::TestCase
253 end
253 end
254
254
255 def test_show_export_to_pdf
255 def test_show_export_to_pdf
256 get :show, :id => 1, :format => 'pdf'
256 get :show, :id => 3, :format => 'pdf'
257 assert_response :success
257 assert_response :success
258 assert_equal 'application/pdf', @response.content_type
258 assert_equal 'application/pdf', @response.content_type
259 assert @response.body.starts_with?('%PDF')
259 assert @response.body.starts_with?('%PDF')
General Comments 0
You need to be logged in to leave comments. Login now