summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/views/common/_calendar.html.erb20
1 files changed, 13 insertions, 7 deletions
diff --git a/app/views/common/_calendar.html.erb b/app/views/common/_calendar.html.erb
index 942fb3452..63cb43c97 100644
--- a/app/views/common/_calendar.html.erb
+++ b/app/views/common/_calendar.html.erb
@@ -11,9 +11,13 @@
</thead>
<tbody>
<tr>
-<% day = calendar.startdt
-while day <= calendar.enddt %>
-<%= ("<td class='week-number' title='#{ l(:label_week) }'>#{(day+(11-day.cwday)%7).cweek}</td>".html_safe) if day.cwday == calendar.first_wday %>
+<% day = calendar.startdt %>
+<% while day <= calendar.enddt %>
+ <% if day.cwday == calendar.first_wday %>
+ <td class='week-number' title='<%= l(:label_week) %>'>
+ <%= (day + (11 - day.cwday) % 7).cweek %>
+ </td>
+ <% end %>
<td class="<%= calendar_day_css_classes(calendar, day) %>">
<p class="day-num"><%= day.day %></p>
<% calendar.events_on(day).each do |i| %>
@@ -27,14 +31,16 @@ while day <= calendar.enddt %>
<% else %>
<span class="icon icon-package">
<%= "#{i.project} -" unless @project && @project == i.project %>
- <%= link_to_version i%>
+ <%= link_to_version i %>
</span>
<% end %>
<% end %>
</td>
-<%= '</tr><tr>'.html_safe if day.cwday==calendar.last_wday and day!=calendar.enddt %>
-<% day = day + 1
-end %>
+<% if day.cwday==calendar.last_wday and day!=calendar.enddt %>
+ </tr><tr>
+<% end %>
+<% day = day + 1 %>
+<% end %>
</tr>
</tbody>
</table>