Project

General

Profile

Feature #615 » _list_simple.rhtml

David Petersen, 2008-02-07 19:49

 
<% if !entries.empty? %>
<table class="list">
<thead>
<th><%= l(:label_activity) %></th>
<th><%= l(:label_issue) %></th>
<th><%= l(:field_comments) %></th>
<th><%= l(:field_hours) %></th>
<th></th>
</thead>
<tbody>
<% @totalHours=0 %>
<% entries.each do |entry| %>
<% @totalHours = @totalHours + entry.hours%>
<tr class="<%= cycle("odd", "even") %>">
<td align="center"><%= entry.activity.name %></td>
<td align="center">
<% if entry.issue %>
<div class="tooltip">
<%= link_to_issue entry.issue %>
<span class="tip">
<%= render_issue_tooltip entry.issue %>
</span>
</div>
<% end %>
</td>
<td><%=h entry.comments %></td>
<td align="center"><strong><%= entry.hours %></strong></td>
<td align="center" style="width:55px;"><%= link_to(l(:button_edit), {:controller => 'timelog', :action => 'edit', :id => entry}, :class => "icon icon-edit")%></td>
</tr>
<% end %>
</tbody>
<tfoot>
<tr>
<td></td>
<td></td>
<td align="right"><strong>Total:</strong></td>
<td align="center"><strong><%= @totalHours %></strong></td>
<td></td>
</tr>
</tfoot>
</table>
<% else %>
<i><%=l(:label_no_data)%></i>
<% end %>
(6-6/7)