_list_simple.rhtml

David Petersen, 2008-02-07 19:49

Download (1.15 KB)

 
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
</tbody>
32
<tfoot>
33
        <tr>
34
                <td></td>
35
                <td></td>
36
                <td align="right"><strong>Total:</strong></td>
37
                <td align="center"><strong><%= @totalHours %></strong></td>
38
                <td></td>
39
        </tr>
40
</tfoot>
41
</table>
42
<% else %>
43
        <i><%=l(:label_no_data)%></i>
44
<% end %>