summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2012-07-21 12:53:06 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2012-07-21 12:53:06 +0000
commitdc393cc480b05df84325fda0436bb585578a2e64 (patch)
tree5e785a2977b7cbca0b498221900e3aebabdf73bd /lib
parentd41d4931287e0e335f3839181c3c677722e0027d (diff)
downloadredmine-dc393cc480b05df84325fda0436bb585578a2e64.tar.gz
redmine-dc393cc480b05df84325fda0436bb585578a2e64.zip
replace tabs to spaces and fix indents at lib/redmine/helpers/gantt.rb
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10065 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib')
-rw-r--r--lib/redmine/helpers/gantt.rb82
1 files changed, 41 insertions, 41 deletions
diff --git a/lib/redmine/helpers/gantt.rb b/lib/redmine/helpers/gantt.rb
index b77c10c1e..fe4b9382b 100644
--- a/lib/redmine/helpers/gantt.rb
+++ b/lib/redmine/helpers/gantt.rb
@@ -433,51 +433,51 @@ module Redmine
# Weeks headers
if show_weeks
- left = subject_width
- height = header_height
- if @date_from.cwday == 1
- # date_from is monday
- week_f = date_from
- else
- # find next monday after date_from
- week_f = @date_from + (7 - @date_from.cwday + 1)
- width = (7 - @date_from.cwday + 1) * zoom
- gc.fill('white')
- gc.stroke('grey')
- gc.stroke_width(1)
- gc.rectangle(left, header_height, left + width, 2*header_height + g_height-1)
- left = left + width
- end
- while week_f <= date_to
- width = (week_f + 6 <= date_to) ? 7 * zoom : (date_to - week_f + 1) * zoom
- gc.fill('white')
- gc.stroke('grey')
- gc.stroke_width(1)
- gc.rectangle(left.round, header_height, left.round + width, 2*header_height + g_height-1)
- gc.fill('black')
- gc.stroke('transparent')
- gc.stroke_width(1)
- gc.text(left.round + 2, header_height + 14, week_f.cweek.to_s)
- left = left + width
- week_f = week_f+7
- end
+ left = subject_width
+ height = header_height
+ if @date_from.cwday == 1
+ # date_from is monday
+ week_f = date_from
+ else
+ # find next monday after date_from
+ week_f = @date_from + (7 - @date_from.cwday + 1)
+ width = (7 - @date_from.cwday + 1) * zoom
+ gc.fill('white')
+ gc.stroke('grey')
+ gc.stroke_width(1)
+ gc.rectangle(left, header_height, left + width, 2*header_height + g_height-1)
+ left = left + width
+ end
+ while week_f <= date_to
+ width = (week_f + 6 <= date_to) ? 7 * zoom : (date_to - week_f + 1) * zoom
+ gc.fill('white')
+ gc.stroke('grey')
+ gc.stroke_width(1)
+ gc.rectangle(left.round, header_height, left.round + width, 2*header_height + g_height-1)
+ gc.fill('black')
+ gc.stroke('transparent')
+ gc.stroke_width(1)
+ gc.text(left.round + 2, header_height + 14, week_f.cweek.to_s)
+ left = left + width
+ week_f = week_f+7
+ end
end
# Days details (week-end in grey)
if show_days
- left = subject_width
- height = g_height + header_height - 1
- wday = @date_from.cwday
- (date_to - @date_from + 1).to_i.times do
- width = zoom
- gc.fill(wday == 6 || wday == 7 ? '#eee' : 'white')
- gc.stroke('#ddd')
- gc.stroke_width(1)
- gc.rectangle(left, 2*header_height, left + width, 2*header_height + g_height-1)
- left = left + width
- wday = wday + 1
- wday = 1 if wday > 7
- end
+ left = subject_width
+ height = g_height + header_height - 1
+ wday = @date_from.cwday
+ (date_to - @date_from + 1).to_i.times do
+ width = zoom
+ gc.fill(wday == 6 || wday == 7 ? '#eee' : 'white')
+ gc.stroke('#ddd')
+ gc.stroke_width(1)
+ gc.rectangle(left, 2*header_height, left + width, 2*header_height + g_height-1)
+ left = left + width
+ wday = wday + 1
+ wday = 1 if wday > 7
+ end
end
# border