From: Toshi MARUYAMA Date: Sat, 21 Jul 2012 11:00:59 +0000 (+0000) Subject: code layout cleanup app/views/gantts/show.html.erb X-Git-Tag: 2.1.0~258 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=d41d4931287e0e335f3839181c3c677722e0027d;p=redmine.git 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 --- 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 %> -
 
+%> +<% if Date.today >= @gantt.date_from and Date.today <= @gantt.date_to %> +
 
<% end %> @@ -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)) -%>