##// END OF EJS Templates
Display hours in block title....
Jean-Philippe Lang -
r15552:420ebc0d1f4b
parent child
Show More
@@ -1,21 +1,17
1 <h3>
2 <%= link_to l(:label_spent_time), time_entries_path(:user_id => 'me') %>
3 (<%= l(:label_last_n_days, 7) %>)
4 </h3>
5 1 <%
6 2 entries = timelog_items
7 3 entries_by_day = entries.group_by(&:spent_on)
8 4 %>
9
10 5 <% if User.current.allowed_to?(:log_time, nil, :global => true) %>
11 6 <div class="contextual">
12 7 <%= link_to l(:button_log_time), new_time_entry_path, :class => "icon icon-add" %>
13 8 </div>
14 9 <% end %>
15 10
16 <div class="total-hours">
17 <p><%= l(:label_total_time) %>: <%= html_hours("%.2f" % entries.sum(&:hours).to_f) %></p>
18 </div>
11 <h3>
12 <%= link_to l(:label_spent_time), time_entries_path(:user_id => 'me') %>
13 (<%= l(:label_last_n_days, 7) %>: <%= l_hours_short entries.sum(&:hours) %>)
14 </h3>
19 15
20 16 <% if entries.any? %>
21 17 <table class="list time-entries">
@@ -56,4 +52,6 entries_by_day = entries.group_by(&:spent_on)
56 52 <% end -%>
57 53 </tbody>
58 54 </table>
55 <% else %>
56 <p class="nodata"><%= l(:label_no_data) %></p>
59 57 <% end %>
General Comments 0
You need to be logged in to leave comments. Login now