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.html.erb 1.4KB

123456789101112131415161718192021222324252627282930313233343536
  1. <%= form_tag({}, :data => {:cm_url => issues_context_menu_path}) do -%>
  2. <table class="cal">
  3. <thead>
  4. <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>
  5. </thead>
  6. <tbody>
  7. <tr>
  8. <% day = calendar.startdt
  9. while day <= calendar.enddt %>
  10. <%= ("<td class='week-number' title='#{ l(:label_week) }'>#{(day+(11-day.cwday)%7).cweek}</td>".html_safe) if day.cwday == calendar.first_wday %>
  11. <td class="<%= calendar_day_css_classes(calendar, day) %>">
  12. <p class="day-num"><%= day.day %></p>
  13. <% calendar.events_on(day).each do |i| %>
  14. <% if i.is_a? Issue %>
  15. <div class="<%= i.css_classes %> <%= 'starting' if day == i.start_date %> <%= 'ending' if day == i.due_date %> tooltip hascontextmenu">
  16. <%= "#{i.project} -" unless @project && @project == i.project %>
  17. <%= link_to_issue i, :truncate => 30 %>
  18. <span class="tip"><%= render_issue_tooltip i %></span>
  19. <%= check_box_tag 'ids[]', i.id, false, :style => 'display:none;', :id => nil %>
  20. </div>
  21. <% else %>
  22. <span class="icon icon-package">
  23. <%= "#{i.project} -" unless @project && @project == i.project %>
  24. <%= link_to_version i%>
  25. </span>
  26. <% end %>
  27. <% end %>
  28. </td>
  29. <%= '</tr><tr>'.html_safe if day.cwday==calendar.last_wday and day!=calendar.enddt %>
  30. <% day = day + 1
  31. end %>
  32. </tr>
  33. </tbody>
  34. </table>
  35. <% end %>
  36. <%= context_menu %>