2007-10-08 00:07:11 +04:00
|
|
|
<table class="cal">
|
|
|
|
<thead>
|
2010-06-16 03:20:32 +04:00
|
|
|
<tr><th scope="col" title="<%= l(:label_week) %>" class="week-number"></th><% 7.times do |i| %><th scope="col"><%= day_name( (calendar.first_wday+i)%7 ) %></th><% end %></tr>
|
2007-10-08 00:07:11 +04:00
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<tr>
|
|
|
|
<% day = calendar.startdt
|
|
|
|
while day <= calendar.enddt %>
|
2010-06-20 02:52:15 +04:00
|
|
|
<%= "<td class='week-number' title='#{ l(:label_week) }'>#{(day+(11-day.cwday)%7).cweek}</td>" if day.cwday == calendar.first_wday %>
|
2007-10-08 00:07:11 +04:00
|
|
|
<td class="<%= day.month==calendar.month ? 'even' : 'odd' %><%= ' today' if Date.today == day %>">
|
2011-09-17 13:59:03 +04:00
|
|
|
<p class="day-num"><%= day.day %></p>
|
2007-10-08 00:07:11 +04:00
|
|
|
<% calendar.events_on(day).each do |i| %>
|
|
|
|
<% if i.is_a? Issue %>
|
2010-02-24 00:10:15 +03:00
|
|
|
<div class="<%= i.css_classes %> <%= 'starting' if day == i.start_date %> <%= 'ending' if day == i.due_date %> tooltip">
|
2008-04-27 12:20:53 +04:00
|
|
|
<%= h("#{i.project} -") unless @project && @project == i.project %>
|
2009-11-14 15:53:50 +03:00
|
|
|
<%= link_to_issue i, :truncate => 30 %>
|
2007-10-08 00:07:11 +04:00
|
|
|
<span class="tip"><%= render_issue_tooltip i %></span>
|
|
|
|
</div>
|
|
|
|
<% else %>
|
2011-09-17 05:11:14 +04:00
|
|
|
<span class="icon icon-package">
|
2008-04-27 12:20:53 +04:00
|
|
|
<%= h("#{i.project} -") unless @project && @project == i.project %>
|
|
|
|
<%= link_to_version i%>
|
|
|
|
</span>
|
2007-10-08 00:07:11 +04:00
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</td>
|
|
|
|
<%= '</tr><tr>' if day.cwday==calendar.last_wday and day!=calendar.enddt %>
|
|
|
|
<% day = day + 1
|
|
|
|
end %>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|