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