]> source.dussan.org Git - redmine.git/commitdiff
gantt: use content_tag instead of html tag at the label on the right
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Tue, 11 Sep 2012 03:44:52 +0000 (03:44 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Tue, 11 Sep 2012 03:44:52 +0000 (03:44 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10361 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redmine/helpers/gantt.rb

index 763342345b6715ba8479ffc1c5ff1a32df7c9aee..46f6ec6a0a0074a32578788c297d05012a5fed36 100644 (file)
@@ -759,9 +759,13 @@ module Redmine
         end
         # Renders the label on the right
         if options[:label]
-          output << "<div style='top:#{ params[:top] }px;left:#{ (coords[:bar_end] || 0) + 8 }px;' class='#{options[:css]} label'>".html_safe
-          output << options[:label]
-          output << "</div>".html_safe
+          style = ""
+          style << "top:#{params[:top]}px;"
+          style << "left:#{(coords[:bar_end] || 0) + 8}px;"
+          style << "width:15px;"
+          output << view.content_tag(:div, options[:label],
+                                     :style => style,
+                                     :class => "#{options[:css]} label")
         end
         # Renders the tooltip
         if options[:issue] && coords[:bar_start] && coords[:bar_end]