From 23eae0bf3c3da3c9bc513c22d7b0a27b2e7c55d8 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Sat, 8 Sep 2012 00:58:41 +0000 Subject: [PATCH] gantt: code cleanup html today red line git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10319 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/gantts/show.html.erb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/gantts/show.html.erb b/app/views/gantts/show.html.erb index b44d7273d..9355c9bd6 100644 --- a/app/views/gantts/show.html.erb +++ b/app/views/gantts/show.html.erb @@ -200,11 +200,12 @@ height = (show_weeks ? header_heigth : header_heigth + g_height) <% ###### Today red line (excluded from cache) ###### %> <% 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 += "position: absolute;" style += "height: #{g_height}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 += "border-left: 1px dashed red;" %>