Feature #3034 » 3034-11.diff
| app/views/gantts/show.html.erb (working copy) | ||
|---|---|---|
| 90 | 90 |
headers_height = header_height |
| 91 | 91 |
show_weeks = false |
| 92 | 92 |
show_days = false |
| 93 |
show_day_num = false |
|
| 93 | 94 | |
| 94 | 95 |
if @gantt.zoom > 1 |
| 95 | 96 |
show_weeks = true |
| ... | ... | |
| 97 | 98 |
if @gantt.zoom > 2 |
| 98 | 99 |
show_days = true |
| 99 | 100 |
headers_height = 3 * header_height |
| 101 |
if @gantt.zoom > 3 |
|
| 102 |
show_day_num = true |
|
| 103 |
headers_height = 4 * header_height |
|
| 104 |
end |
|
| 100 | 105 |
end |
| 101 | 106 |
end |
| 102 | 107 | |
| ... | ... | |
| 231 | 236 |
<% end %> |
| 232 | 237 |
<% end %> |
| 233 | 238 | |
| 239 |
<% |
|
| 240 |
# |
|
| 241 |
# Days headers Num |
|
| 242 |
# |
|
| 243 |
if show_day_num |
|
| 244 |
left = 0 |
|
| 245 |
height = g_height + header_height*2 - 1 |
|
| 246 |
wday = @gantt.date_from.cwday |
|
| 247 |
day_num = @gantt.date_from |
|
| 248 |
(@gantt.date_to - @gantt.date_from + 1).to_i.times do |
|
| 249 |
width = zoom - 1 |
|
| 250 |
%> |
|
| 251 |
<div style="left:<%= left %>px;top:37px;width:<%= width %>px;height:<%= height %>px;font-size:0.7em;<%= "background:#f1f1f1;" if wday > 5 %><%= "color:blue;" if wday == 6 %><%= "color:red;" if wday == 7 %>" class="gantt_hdr"> |
|
| 252 |
<%= day_num.day %> |
|
| 253 |
</div> |
|
| 254 |
<% |
|
| 255 |
left = left + width+1 |
|
| 256 |
day_num = day_num + 1 |
|
| 257 |
wday = wday + 1 |
|
| 258 |
wday = 1 if wday > 7 |
|
| 259 |
end |
|
| 260 |
end %> |
|
| 261 | ||
| 234 | 262 |
<% ###### Days headers ####### %> |
| 235 | 263 |
<% if show_days %> |
| 236 | 264 |
<% |
| 237 | 265 |
left = 0 |
| 238 | 266 |
height = g_height + header_height - 1 |
| 267 |
top = (show_day_num ? 55 : 37) |
|
| 239 | 268 |
wday = @gantt.date_from.cwday |
| 240 | 269 |
%> |
| 241 | 270 |
<% (@gantt.date_to - @gantt.date_from + 1).to_i.times do %> |
| ... | ... | |
| 243 | 272 |
width = zoom - 1 |
| 244 | 273 |
style = "" |
| 245 | 274 |
style += "left: #{left}px;"
|
| 246 |
style += "top:37px;"
|
|
| 275 |
style += "top: #{top}px;"
|
|
| 247 | 276 |
style += "width: #{width}px;"
|
| 248 | 277 |
style += "height: #{height}px;"
|
| 249 | 278 |
style += "font-size:0.7em;" |
- « Previous
- 1
- …
- 4
- 5
- 6
- Next »