summaryrefslogtreecommitdiffstats
path: root/app/views/gantts
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2012-07-21 11:00:59 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2012-07-21 11:00:59 +0000
commitd41d4931287e0e335f3839181c3c677722e0027d (patch)
treefe83aabbc1e30224e8d2d2022fa91ae17e71837b /app/views/gantts
parentdadd294a2552c17868d8fce5f1568ddda8de3c4c (diff)
downloadredmine-d41d4931287e0e335f3839181c3c677722e0027d.tar.gz
redmine-d41d4931287e0e335f3839181c3c677722e0027d.zip
code layout cleanup app/views/gantts/show.html.erb
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10064 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/gantts')
-rw-r--r--app/views/gantts/show.html.erb19
1 files changed, 10 insertions, 9 deletions
diff --git a/app/views/gantts/show.html.erb b/app/views/gantts/show.html.erb
index aeeb127e4..989ff3675 100644
--- a/app/views/gantts/show.html.erb
+++ b/app/views/gantts/show.html.erb
@@ -32,7 +32,8 @@
<%= error_messages_for 'query' %>
<% if @query.valid? %>
-<% zoom = 1
+<%
+zoom = 1
@gantt.zoom.times { zoom = zoom * 2 }
subject_width = 330
@@ -53,13 +54,12 @@ end
# Width of the entire chart
g_width = ((@gantt.date_to - @gantt.date_from + 1) * zoom).to_i
-
-@gantt.render(:top => headers_height + 8, :zoom => zoom, :g_width => g_width, :subject_width => subject_width)
-
+@gantt.render(:top => headers_height + 8,
+ :zoom => zoom,
+ :g_width => g_width,
+ :subject_width => subject_width)
g_height = [(20 * (@gantt.number_of_rows + 6)) + 150, 206].max
t_height = g_height + headers_height
-
-
%>
<% if @gantt.truncated %>
@@ -161,8 +161,9 @@ end %>
#
# 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;">&nbsp;</div>
+%>
+<% 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;">&nbsp;</div>
<% end %>
</div>
@@ -184,7 +185,7 @@ if Date.today >= @gantt.date_from and Date.today <= @gantt.date_to %>
<% end # query.valid? %>
<% content_for :sidebar do %>
- <%= render :partial => 'issues/sidebar' %>
+ <%= render :partial => 'issues/sidebar' %>
<% end %>
<% html_title(l(:label_gantt)) -%>