diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2012-09-07 14:35:20 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2012-09-07 14:35:20 +0000 |
commit | b9586dd5702e8beffbe20d58b29262c1ac5a115f (patch) | |
tree | eb611e6a110db70300286056e6c9f06750a7e308 /app/views/gantts | |
parent | 40df75243b1487ee6e8650ab2308667e3beb1b0d (diff) | |
download | redmine-b9586dd5702e8beffbe20d58b29262c1ac5a115f.tar.gz redmine-b9586dd5702e8beffbe20d58b29262c1ac5a115f.zip |
gantt: code layout cleanup html gantt days headers
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10314 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/gantts')
-rw-r--r-- | app/views/gantts/show.html.erb | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/app/views/gantts/show.html.erb b/app/views/gantts/show.html.erb index 65ee86929..ce53b4615 100644 --- a/app/views/gantts/show.html.erb +++ b/app/views/gantts/show.html.erb @@ -152,23 +152,26 @@ height = (show_weeks ? header_heigth : header_heigth + g_height) # # Days headers # -if show_days +%> +<% if show_days %> + <% left = 0 height = g_height + header_heigth - 1 wday = @gantt.date_from.cwday - (@gantt.date_to - @gantt.date_from + 1).to_i.times do - width = zoom - 1 - %> - <div style="left:<%= left %>px;top:37px;width:<%= width %>px;height:<%= height %>px;font-size:0.7em;<%= "background:#f1f1f1;" if wday > 5 %>" - class="gantt_hdr"> - <%= day_letter(wday) %> - </div> + %> + <% (@gantt.date_to - @gantt.date_from + 1).to_i.times do %> + <% width = zoom - 1 %> + <div style="left:<%= left %>px;top:37px;width:<%= width %>px;height:<%= height %>px;font-size:0.7em;<%= "background:#f1f1f1;" if wday > 5 %>" + class="gantt_hdr"> + <%= day_letter(wday) %> + </div> <% left = left + width + 1 wday = wday + 1 wday = 1 if wday > 7 - end -end %> + %> + <% end %> +<% end %> <%= @gantt.lines.html_safe %> |