You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

_calendar.rhtml 1.2KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <table class="cal">
  2. <thead>
  3. <tr><td></td><% 7.times do |i| %><th><%= day_name( (calendar.first_wday+i)%7 ) %></th><% end %></tr>
  4. </thead>
  5. <tbody>
  6. <tr>
  7. <% day = calendar.startdt
  8. while day <= calendar.enddt %>
  9. <%= "<th>#{day.cweek}</th>" if day.cwday == calendar.first_wday %>
  10. <td class="<%= day.month==calendar.month ? 'even' : 'odd' %><%= ' today' if Date.today == day %>">
  11. <p class="day-num"><%= day.day %></p>
  12. <% calendar.events_on(day).each do |i| %>
  13. <% if i.is_a? Issue %>
  14. <div class="tooltip">
  15. <%= if day == i.start_date && day == i.due_date
  16. image_tag('arrow_bw.png')
  17. elsif day == i.start_date
  18. image_tag('arrow_from.png')
  19. elsif day == i.due_date
  20. image_tag('arrow_to.png')
  21. end %>
  22. <%= h("#{i.project} -") unless @project && @project == i.project %>
  23. <%= link_to_issue i %>: <%= h(truncate(i.subject, 30)) %>
  24. <span class="tip"><%= render_issue_tooltip i %></span>
  25. </div>
  26. <% else %>
  27. <span class="icon icon-package">
  28. <%= h("#{i.project} -") unless @project && @project == i.project %>
  29. <%= link_to_version i%>
  30. </span>
  31. <% end %>
  32. <% end %>
  33. </td>
  34. <%= '</tr><tr>' if day.cwday==calendar.last_wday and day!=calendar.enddt %>
  35. <% day = day + 1
  36. end %>
  37. </tr>
  38. </tbody>
  39. </table>