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
This commit is contained in:
Toshi MARUYAMA 2012-09-07 14:35:33 +00:00
parent b9586dd570
commit 2af4bb6a86
1 changed files with 9 additions and 3 deletions

View File

@ -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 %>
<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