summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2012-09-11 00:09:01 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2012-09-11 00:09:01 +0000
commitffb981255cfc3e80eebbb63fe43259d2b3dc6c15 (patch)
treea3d71586be22e1bc75b2bd7757f4e01f6cc6da44
parent3bbb2566c8277c75771d594a6b8c46628815412c (diff)
downloadredmine-ffb981255cfc3e80eebbb63fe43259d2b3dc6c15.tar.gz
redmine-ffb981255cfc3e80eebbb63fe43259d2b3dc6c15.zip
gantt: use content_tag instead of html tag at helper subject_for_version method
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10352 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--lib/redmine/helpers/gantt.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/redmine/helpers/gantt.rb b/lib/redmine/helpers/gantt.rb
index d73a92ec0..912e7b044 100644
--- a/lib/redmine/helpers/gantt.rb
+++ b/lib/redmine/helpers/gantt.rb
@@ -281,9 +281,13 @@ module Redmine
def subject_for_version(version, options)
case options[:format]
when :html
- subject = "<span class='icon icon-package #{version.behind_schedule? ? 'version-behind-schedule' : ''} #{version.overdue? ? 'version-overdue' : ''}'>".html_safe
- subject << view.link_to_version(version).html_safe
- subject << '</span>'.html_safe
+ html_class = ""
+ html_class << 'icon icon-package '
+ html_class << (version.behind_schedule? ? 'version-behind-schedule' : '') << " "
+ html_class << (version.overdue? ? 'version-overdue' : '')
+ s = view.link_to_version(version).html_safe
+ subject = view.content_tag(:span, s,
+ :class => html_class).html_safe
html_subject(options, subject, :css => "version-name")
when :image
image_subject(options, version.to_s_with_project)