gantt: code cleanup html today red line

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10319 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2012-09-08 00:58:41 +00:00
parent 822a627c44
commit 23eae0bf3c
1 changed files with 2 additions and 1 deletions

View File

@ -200,11 +200,12 @@ height = (show_weeks ? header_heigth : header_heigth + g_height)
<% ###### Today red line (excluded from cache) ###### %> <% ###### Today red line (excluded from cache) ###### %>
<% if Date.today >= @gantt.date_from and Date.today <= @gantt.date_to %> <% if Date.today >= @gantt.date_from and Date.today <= @gantt.date_to %>
<% <%
today_left = (((Date.today - @gantt.date_from + 1) * zoom).floor() - 1).to_i
style = "" style = ""
style += "position: absolute;" style += "position: absolute;"
style += "height: #{g_height}px;" style += "height: #{g_height}px;"
style += "top: #{headers_height + 1}px;" style += "top: #{headers_height + 1}px;"
style += "left: #{(((Date.today - @gantt.date_from + 1) * zoom).floor() - 1).to_i}px;" style += "left: #{today_left}px;"
style += "width:10px;" style += "width:10px;"
style += "border-left: 1px dashed red;" style += "border-left: 1px dashed red;"
%> %>