]> source.dussan.org Git - redmine.git/commitdiff
gantt: use content_tag instead of html tag at subject for project
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Tue, 11 Sep 2012 02:16:32 +0000 (02:16 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Tue, 11 Sep 2012 02:16:32 +0000 (02:16 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10359 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redmine/helpers/gantt.rb

index 510da87351cce529c66d71fd843de3b3d649f513..763342345b6715ba8479ffc1c5ff1a32df7c9aee 100644 (file)
@@ -245,9 +245,12 @@ module Redmine
       def subject_for_project(project, options)
         case options[:format]
         when :html
-          subject = "<span class='icon icon-projects #{project.overdue? ? 'project-overdue' : ''}'>".html_safe
-          subject << view.link_to_project(project).html_safe
-          subject << '</span>'.html_safe
+          html_class = ""
+          html_class << 'icon icon-projects '
+          html_class << (project.overdue? ? 'project-overdue' : '')
+          s = view.link_to_project(project).html_safe
+          subject = view.content_tag(:span, s,
+                                     :class => html_class).html_safe
           html_subject(options, subject, :css => "project-name")
         when :image
           image_subject(options, project.name)