summaryrefslogtreecommitdiffstats
path: root/app/views/gantts
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2012-09-08 00:59:42 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2012-09-08 00:59:42 +0000
commiteeedd287adf3bebc4792eb9447b548ddd6176789 (patch)
tree1fe0966450bef524f86f4ede52a6ff290a945fae /app/views/gantts
parent2edb8d597a3757301c95861767d2cdadffd264d0 (diff)
downloadredmine-eeedd287adf3bebc4792eb9447b548ddd6176789.tar.gz
redmine-eeedd287adf3bebc4792eb9447b548ddd6176789.zip
gantt: code layout cleanup html months headers
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10321 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/gantts')
-rw-r--r--app/views/gantts/show.html.erb19
1 files changed, 8 insertions, 11 deletions
diff --git a/app/views/gantts/show.html.erb b/app/views/gantts/show.html.erb
index 4fe9f4095..603fe6214 100644
--- a/app/views/gantts/show.html.erb
+++ b/app/views/gantts/show.html.erb
@@ -105,18 +105,15 @@ t_height = g_height + headers_height
<div style="position:relative;height:<%= t_height + 24 %>px;overflow:auto;">
<div style="width:<%= g_width - 1 %>px;height:<%= headers_height %>px;background: #eee;"
class="gantt_hdr">&nbsp;</div>
+
+<% ###### Months headers ###### %>
<%
-#
-# Months headers
-#
-%>
-<%
-month_f = @gantt.date_from
-left = 0
-height = (show_weeks ? header_heigth : header_heigth + g_height)
+ month_f = @gantt.date_from
+ 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
style = ""
style += "left: #{left}px;"
@@ -129,8 +126,8 @@ height = (show_weeks ? header_heigth : header_heigth + g_height)
:title => "#{month_name(month_f.month)} #{month_f.year}" %>
<% end %>
<%
- left = left + width + 1
- month_f = month_f >> 1
+ left = left + width + 1
+ month_f = month_f >> 1
%>
<% end %>