_list.rhtml
32 lines
| 1.4 KiB
| text/html+ruby
|
RhtmlLexer
|
r1159 | <table class="list time-entries"> | ||
<thead> | ||||
<%= sort_header_tag('spent_on', :caption => l(:label_date), :default_order => 'desc') %> | ||||
<%= sort_header_tag('user_id', :caption => l(:label_member)) %> | ||||
<%= sort_header_tag('activity_id', :caption => l(:label_activity)) %> | ||||
|
r1162 | <%= sort_header_tag("#{Project.table_name}.name", :caption => l(:label_project)) %> | ||
|
r1159 | <%= sort_header_tag('issue_id', :caption => l(:label_issue), :default_order => 'desc') %> | ||
<th><%= l(:field_comments) %></th> | ||||
<%= sort_header_tag('hours', :caption => l(:field_hours)) %> | ||||
<th></th> | ||||
</thead> | ||||
<tbody> | ||||
<% entries.each do |entry| -%> | ||||
<tr class="time-entry <%= cycle("odd", "even") %>"> | ||||
<td class="spent_on"><%= format_date(entry.spent_on) %></td> | ||||
|
r1162 | <td class="user"><%=h entry.user %></td> | ||
<td class="activity"><%=h entry.activity %></td> | ||||
<td class="project"><%=h entry.project %></td> | ||||
|
r1159 | <td class="subject"> | ||
|
r1162 | <% if entry.issue -%> | ||
<%= link_to_issue entry.issue %>: <%= h(truncate(entry.issue.subject, 50)) -%> | ||||
<% end -%> | ||||
|
r1159 | </td> | ||
<td class="comments"><%=h entry.comments %></td> | ||||
|
r1162 | <td class="hours"><%= html_hours("%.2f" % entry.hours) %></td> | ||
|
r1159 | <td align="center"><%= link_to_if_authorized(l(:button_edit), | ||
{:controller => 'timelog', :action => 'edit', :id => entry}, | ||||
:class => 'icon icon-edit') if entry.editable_by?(User.current) %></td> | ||||
</tr> | ||||
<% end -%> | ||||
</tbdoy> | ||||
</table> | ||||