annotate app/views/timelog/_list.rhtml @ 904:0a8317a50fa0 redmine-1.1

Close obsolete branch redmine-1.1
author Chris Cannam
date Fri, 14 Jan 2011 12:53:21 +0000
parents 94944d00e43c
children cbce1fd3b1b7
rev   line source
Chris@0 1 <table class="list time-entries">
Chris@0 2 <thead>
Chris@0 3 <tr>
Chris@0 4 <%= sort_header_tag('spent_on', :caption => l(:label_date), :default_order => 'desc') %>
Chris@0 5 <%= sort_header_tag('user', :caption => l(:label_member)) %>
Chris@0 6 <%= sort_header_tag('activity', :caption => l(:label_activity)) %>
Chris@0 7 <%= sort_header_tag('project', :caption => l(:label_project)) %>
Chris@0 8 <%= sort_header_tag('issue', :caption => l(:label_issue), :default_order => 'desc') %>
Chris@0 9 <th><%= l(:field_comments) %></th>
Chris@0 10 <%= sort_header_tag('hours', :caption => l(:field_hours)) %>
Chris@0 11 <th></th>
Chris@0 12 </tr>
Chris@0 13 </thead>
Chris@0 14 <tbody>
Chris@0 15 <% entries.each do |entry| -%>
Chris@0 16 <tr class="time-entry <%= cycle("odd", "even") %>">
Chris@0 17 <td class="spent_on"><%= format_date(entry.spent_on) %></td>
Chris@0 18 <td class="user"><%=h entry.user %></td>
Chris@0 19 <td class="activity"><%=h entry.activity %></td>
Chris@0 20 <td class="project"><%=h entry.project %></td>
Chris@0 21 <td class="subject">
Chris@0 22 <% if entry.issue -%>
Chris@0 23 <%= entry.issue.visible? ? link_to_issue(entry.issue, :truncate => 50) : "##{entry.issue.id}" -%>
Chris@0 24 <% end -%>
Chris@0 25 </td>
Chris@0 26 <td class="comments"><%=h entry.comments %></td>
Chris@0 27 <td class="hours"><%= html_hours("%.2f" % entry.hours) %></td>
Chris@0 28 <td align="center">
Chris@0 29 <% if entry.editable_by?(User.current) -%>
Chris@0 30 <%= link_to image_tag('edit.png'), {:controller => 'timelog', :action => 'edit', :id => entry, :project_id => nil},
Chris@0 31 :title => l(:button_edit) %>
Chris@0 32 <%= link_to image_tag('delete.png'), {:controller => 'timelog', :action => 'destroy', :id => entry, :project_id => nil},
Chris@0 33 :confirm => l(:text_are_you_sure),
chris@37 34 :method => :delete,
Chris@0 35 :title => l(:button_delete) %>
Chris@0 36 <% end -%>
Chris@0 37 </td>
Chris@0 38 </tr>
Chris@0 39 <% end -%>
Chris@0 40 </tbody>
Chris@0 41 </table>