diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2012-09-07 23:03:40 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2012-09-07 23:03:40 +0000 |
commit | 3431b860ad6bf4c2ec217d39c6f37cb9f165f7c7 (patch) | |
tree | c7f77fbf4fe4e480d9168569dd24b181592459de /app/views/gantts | |
parent | 34839381851c31de2de2461fa3418b8463e35047 (diff) | |
download | redmine-3431b860ad6bf4c2ec217d39c6f37cb9f165f7c7.tar.gz redmine-3431b860ad6bf4c2ec217d39c6f37cb9f165f7c7.zip |
gantt: use content_tag instead of html tag at gantt today red line
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10317 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/gantts')
-rw-r--r-- | app/views/gantts/show.html.erb | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/app/views/gantts/show.html.erb b/app/views/gantts/show.html.erb index 786c9ff30..ca5bf622a 100644 --- a/app/views/gantts/show.html.erb +++ b/app/views/gantts/show.html.erb @@ -197,13 +197,18 @@ height = (show_weeks ? header_heigth : header_heigth + g_height) <%= @gantt.lines.html_safe %> -<% -# -# Today red line (excluded from cache) -# -%> +<% ###### Today red line (excluded from cache) ###### %> <% if Date.today >= @gantt.date_from and Date.today <= @gantt.date_to %> - <div style="position: absolute;height:<%= g_height %>px;top:<%= headers_height + 1 %>px;left:<%= (((Date.today - @gantt.date_from + 1) * zoom).floor() - 1).to_i %>px;width:10px;border-left: 1px dashed red;"> </div> + <% + 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 += "width:10px;" + style += "border-left: 1px dashed red;" + %> + <%= content_tag(:div, ' '.html_safe, :style => style) %> <% end %> </div> |