@@ -35,33 +35,33 | |||
|
35 | 35 | <%= error_messages_for 'query' %> |
|
36 | 36 | <% if @query.valid? %> |
|
37 | 37 | <% |
|
38 | zoom = 1 | |
|
39 | @gantt.zoom.times { zoom = zoom * 2 } | |
|
38 | zoom = 1 | |
|
39 | @gantt.zoom.times { zoom = zoom * 2 } | |
|
40 | 40 | |
|
41 | subject_width = 330 | |
|
42 | header_heigth = 18 | |
|
41 | subject_width = 330 | |
|
42 | header_heigth = 18 | |
|
43 | 43 | |
|
44 | headers_height = header_heigth | |
|
45 | show_weeks = false | |
|
46 | show_days = false | |
|
44 | headers_height = header_heigth | |
|
45 | show_weeks = false | |
|
46 | show_days = false | |
|
47 | 47 | |
|
48 | if @gantt.zoom > 1 | |
|
48 | if @gantt.zoom > 1 | |
|
49 | 49 | show_weeks = true |
|
50 | 50 | headers_height = 2 * header_heigth |
|
51 | 51 | if @gantt.zoom > 2 |
|
52 | 52 | show_days = true |
|
53 | 53 | headers_height = 3 * header_heigth |
|
54 | 54 | end |
|
55 | end | |
|
55 | end | |
|
56 | 56 | |
|
57 | # Width of the entire chart | |
|
58 | g_width = ((@gantt.date_to - @gantt.date_from + 1) * zoom).to_i | |
|
59 | @gantt.render(:top => headers_height + 8, | |
|
60 | :zoom => zoom, | |
|
61 | :g_width => g_width, | |
|
62 | :subject_width => subject_width) | |
|
63 | g_height = [(20 * (@gantt.number_of_rows + 6)) + 150, 206].max | |
|
64 | t_height = g_height + headers_height | |
|
57 | # Width of the entire chart | |
|
58 | g_width = ((@gantt.date_to - @gantt.date_from + 1) * zoom).to_i | |
|
59 | @gantt.render(:top => headers_height + 8, | |
|
60 | :zoom => zoom, | |
|
61 | :g_width => g_width, | |
|
62 | :subject_width => subject_width) | |
|
63 | g_height = [(20 * (@gantt.number_of_rows + 6)) + 150, 206].max | |
|
64 | t_height = g_height + headers_height | |
|
65 | 65 | %> |
|
66 | 66 | |
|
67 | 67 | <% if @gantt.truncated %> |
General Comments 0
You need to be logged in to leave comments.
Login now