height = (show_weeks ? header_heigth : header_heigth + g_height)
%>
<% @gantt.months.times do %>
- <% width = (((month_f >> 1) - month_f) * zoom - 1).to_i %>
- <div style="left:<%= left %>px;width:<%= width %>px;height:<%= height %>px;" class="gantt_hdr">
+ <%
+ 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}" %>
- </div>
+ <% end %>
<%
left = left + width + 1
month_f = month_f >> 1