From 2af4bb6a868a21aa77b8b0b548fd4ba26a084063 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Fri, 7 Sep 2012 14:35:33 +0000 Subject: [PATCH] gantt: use content_tag instead of html tag at gantt months headers git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10315 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/gantts/show.html.erb | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/app/views/gantts/show.html.erb b/app/views/gantts/show.html.erb index ce53b4615..018ccf32a 100644 --- a/app/views/gantts/show.html.erb +++ b/app/views/gantts/show.html.erb @@ -99,12 +99,18 @@ left = 0 height = (show_weeks ? header_heigth : header_heigth + g_height) %> <% @gantt.months.times do %> - <% width = (((month_f >> 1) - month_f) * zoom - 1).to_i %> -
+ <% + width = (((month_f >> 1) - month_f) * zoom - 1).to_i + style = "" + style += "left: #{left}px;" + style += "width: #{width}px;" + style += "height: #{height}px;" + %> + <%= content_tag(:div, :style => style, :class => "gantt_hdr") do %> <%= link_to h("#{month_f.year}-#{month_f.month}"), @gantt.params.merge(:year => month_f.year, :month => month_f.month), :title => "#{month_name(month_f.month)} #{month_f.year}" %> -
+ <% end %> <% left = left + width + 1 month_f = month_f >> 1 -- 2.39.5