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.

_list.rhtml 1.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <table class="list time-entries">
  2. <thead>
  3. <tr>
  4. <%= sort_header_tag('spent_on', :caption => l(:label_date), :default_order => 'desc') %>
  5. <%= sort_header_tag('user', :caption => l(:label_member)) %>
  6. <%= sort_header_tag('activity', :caption => l(:label_activity)) %>
  7. <%= sort_header_tag('project', :caption => l(:label_project)) %>
  8. <%= sort_header_tag('issue', :caption => l(:label_issue), :default_order => 'desc') %>
  9. <th><%= l(:field_comments) %></th>
  10. <%= sort_header_tag('hours', :caption => l(:field_hours)) %>
  11. <th></th>
  12. </tr>
  13. </thead>
  14. <tbody>
  15. <% entries.each do |entry| -%>
  16. <tr class="time-entry <%= cycle("odd", "even") %>">
  17. <td class="spent_on"><%= format_date(entry.spent_on) %></td>
  18. <td class="user"><%=h entry.user %></td>
  19. <td class="activity"><%=h entry.activity %></td>
  20. <td class="project"><%=h entry.project %></td>
  21. <td class="subject">
  22. <% if entry.issue -%>
  23. <%= link_to_issue entry.issue %>: <%= h(truncate(entry.issue.subject, 50)) -%>
  24. <% end -%>
  25. </td>
  26. <td class="comments"><%=h entry.comments %></td>
  27. <td class="hours"><%= html_hours("%.2f" % entry.hours) %></td>
  28. <td align="center">
  29. <% if entry.editable_by?(User.current) -%>
  30. <%= link_to image_tag('edit.png'), {:controller => 'timelog', :action => 'edit', :id => entry},
  31. :title => l(:button_edit) %>
  32. <%= link_to image_tag('delete.png'), {:controller => 'timelog', :action => 'destroy', :id => entry},
  33. :confirm => l(:text_are_you_sure),
  34. :method => :post,
  35. :title => l(:button_delete) %>
  36. <% end -%>
  37. </td>
  38. </tr>
  39. <% end -%>
  40. </tbody>
  41. </table>