annotate app/views/common/_calendar.rhtml @ 507:0c939c159af4 redmine-1.2

Update to Redmine 1.2.1 on 1.2-stable branch (Redmine SVN rev 6270)
author Chris Cannam
date Thu, 14 Jul 2011 10:32:19 +0100
parents 513646585e45
children
rev   line source
Chris@0 1 <table class="cal">
Chris@0 2 <thead>
Chris@0 3 <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>
Chris@0 4 </thead>
Chris@0 5 <tbody>
Chris@0 6 <tr>
Chris@0 7 <% day = calendar.startdt
Chris@0 8 while day <= calendar.enddt %>
Chris@0 9 <%= "<td class='week-number' title='#{ l(:label_week) }'>#{(day+(11-day.cwday)%7).cweek}</td>" if day.cwday == calendar.first_wday %>
Chris@0 10 <td class="<%= day.month==calendar.month ? 'even' : 'odd' %><%= ' today' if Date.today == day %>">
Chris@0 11 <p class="day-num"><%= day.day %></p>
Chris@0 12 <% calendar.events_on(day).each do |i| %>
Chris@0 13 <% if i.is_a? Issue %>
Chris@0 14 <div class="<%= i.css_classes %> <%= 'starting' if day == i.start_date %> <%= 'ending' if day == i.due_date %> tooltip">
Chris@0 15 <%= h("#{i.project} -") unless @project && @project == i.project %>
Chris@0 16 <%= link_to_issue i, :truncate => 30 %>
Chris@0 17 <span class="tip"><%= render_issue_tooltip i %></span>
Chris@0 18 </div>
Chris@0 19 <% else %>
Chris@0 20 <span class="icon icon-package">
Chris@0 21 <%= h("#{i.project} -") unless @project && @project == i.project %>
Chris@0 22 <%= link_to_version i%>
Chris@0 23 </span>
Chris@0 24 <% end %>
Chris@0 25 <% end %>
Chris@0 26 </td>
Chris@0 27 <%= '</tr><tr>' if day.cwday==calendar.last_wday and day!=calendar.enddt %>
Chris@0 28 <% day = day + 1
Chris@0 29 end %>
Chris@0 30 </tr>
Chris@0 31 </tbody>
Chris@0 32 </table>