Project

General

Profile

Feature #615 » _list_simple.rhtml

David Petersen, 2008-02-07 19:47

 
1
<% if !entries.empty? %>
2
<table class="list">
3
<thead>
4
<th><%= l(:label_activity) %></th>
5
<th><%= l(:label_issue) %></th>
6
<th><%= l(:field_comments) %></th>
7
<th><%= l(:field_hours) %></th>
8
<th></th>
9
</thead>
10
<tbody>
11
<% @totalHours=0 %>
12
<% entries.each do |entry| %>
13
<% @totalHours = @totalHours + entry.hours%>
14
<tr class="<%= cycle("odd", "even") %>">
15
<td align="center"><%= entry.activity.name %></td>
16
<td align="center">
17
    <% if entry.issue %>
18
    <div class="tooltip">
19
    <%= link_to_issue entry.issue %>
20
    <span class="tip">
21
    <%= render_issue_tooltip entry.issue %>
22
    </span>		
23
	</div>
24
	<% end %>
25
</td>
26
<td><%=h entry.comments %></td>
27
<td align="center"><strong><%= entry.hours %></strong></td>
28
<td align="center" style="width:55px;"><%= link_to(l(:button_edit), {:controller => 'timelog', :action => 'edit', :id => entry}, :class => "icon icon-edit")%></td>
29
</tr>
30
<% end %>
31
<tr>
32
	<td></td>
33
	<td></td>
34
	<td align="right"><strong>Total:</strong></td>
35
	<td align="center"><strong><%= @totalHours %></strong></td>
36
	<td></td>
37
</tr>
38
</tbody>
39
</table>
40
<% else %>
41
	<i><%=l(:label_no_data)%></i>
42
<% end %>
(5-5/7)