summaryrefslogtreecommitdiffstats
path: root/app/views/timelog/_list.rhtml
blob: 929d8f7ddd1402586ff91dbb7c9f6545bd13da90 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<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)) %>
<%= 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>
<td class="user"><%= entry.user.name %></td>
<td class="activity"><%= entry.activity.name %></td>
<td class="subject">
  <% if entry.issue -%>
  <div class="tooltip"><%= link_to_issue entry.issue %>: <%= h(truncate(entry.issue.subject, 50)) -%>
  <span class="tip"><%= render_issue_tooltip entry.issue %></span>
  </div>
  <% end -%>
</td>
<td class="comments"><%=h entry.comments %></td>
<td class="hours"><%= entry.hours %></td>
<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>