Project

General

Profile

Feature #3034 » rmo-3034.diff

Diff between posted view of #3034#note-4 and 2.2-stable_r11610 - Mischa The Evil, 2013-03-20 23:28

View differences:

D:/Redmine/show-patched_rmo3034-4.html.erb wo mrt 20 22:35:52 2013
44 44
  headers_height = header_heigth
45 45
  show_weeks = false
46 46
  show_days  = false
47
  show_day_num = false
47 48

  
48 49
  if @gantt.zoom > 1
49 50
    show_weeks = true
......
51 52
    if @gantt.zoom > 2
52 53
        show_days = true
53 54
        headers_height = 3 * header_heigth
55
        if @gantt.zoom > 3
56
          show_day_num = true
57
          headers_height = 4 * header_heigth
58
        end
54 59
    end
55 60
  end
56 61

  
......
185 190
  <% end %>
186 191
<% end %>
187 192

  
193
<%
194
#
195
# Days headers Num
196
#
197
if show_day_num
198
  left = 0
199
  height = g_height + header_heigth*2 - 1
200
  wday = @gantt.date_from.cwday
201
  day_num = @gantt.date_from
202
  (@gantt.date_to - @gantt.date_from + 1).to_i.times do
203
  width =  zoom - 1 
204
%>
205
  <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">
206
  <%= day_num.day %>
207
  </div>
208
  <%
209
   left = left + width+1
210
   day_num = day_num + 1
211
   wday = wday + 1
212
   wday = 1 if wday > 7
213
   end
214
end %> 
215

  
188 216
<% ###### Days headers ####### %>
189 217
<% if show_days %>
190 218
  <%
191 219
    left = 0
192 220
    height = g_height + header_heigth - 1
221
    top = (show_day_num ? 55 : 37)
193 222
    wday = @gantt.date_from.cwday
194 223
  %>
195 224
  <% (@gantt.date_to - @gantt.date_from + 1).to_i.times do %>
......
197 226
      width =  zoom - 1
198 227
      style  = ""
199 228
      style += "left: #{left}px;"
200
      style += "top:37px;"
229
      style += "top: #{top}px;"
201 230
      style += "width: #{width}px;"
202 231
      style += "height: #{height}px;"
203 232
      style += "font-size:0.7em;"
(3-3/6)