1
0
mirror of https://github.com/meineerde/redmine.git synced 2026-03-11 03:33:07 +00:00

Display the correct week number in the calendar

This commit is contained in:
Holger Just 2010-06-19 23:24:18 +02:00
parent e9bdced53b
commit 0989c759da

View File

@ -6,7 +6,7 @@
<tr>
<% day = calendar.startdt
while day <= calendar.enddt %>
<%= "<td class='week-number' title='#{ l(:label_week) }'>#{day.cweek}</td>" if day.cwday == calendar.first_wday %>
<%= "<td class='week-number' title='#{ l(:label_week) }'>#{(day+(11-day.cwday)%7).cweek}</td>" if day.cwday == calendar.first_wday %>
<td class="<%= day.month==calendar.month ? 'even' : 'odd' %><%= ' today' if Date.today == day %>">
<p class="day-num"><%= day.day %></p>
<% calendar.events_on(day).each do |i| %>