Mercurial > hg > soundsoftware-site
comparison .svn/pristine/e9/e907a83f032fcb91aee4dcf2f7e14ae7c9fab77a.svn-base @ 1464:261b3d9a4903 redmine-2.4
Update to Redmine 2.4 branch rev 12663
author | Chris Cannam |
---|---|
date | Tue, 14 Jan 2014 14:37:42 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
1296:038ba2d95de8 | 1464:261b3d9a4903 |
---|---|
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 <% | |
6 entries = timelog_items | |
7 entries_by_day = entries.group_by(&:spent_on) | |
8 %> | |
9 | |
10 <div class="total-hours"> | |
11 <p><%= l(:label_total_time) %>: <%= html_hours("%.2f" % entries.sum(&:hours).to_f) %></p> | |
12 </div> | |
13 | |
14 <% if entries.any? %> | |
15 <table class="list time-entries"> | |
16 <thead><tr> | |
17 <th><%= l(:label_activity) %></th> | |
18 <th><%= l(:label_project) %></th> | |
19 <th><%= l(:field_comments) %></th> | |
20 <th><%= l(:field_hours) %></th> | |
21 <th></th> | |
22 </tr></thead> | |
23 <tbody> | |
24 <% entries_by_day.keys.sort.reverse.each do |day| %> | |
25 <tr class="odd"> | |
26 <td><strong><%= day == Date.today ? l(:label_today).titleize : format_date(day) %></strong></td> | |
27 <td colspan="2"></td> | |
28 <td class="hours"><em><%= html_hours("%.2f" % entries_by_day[day].sum(&:hours).to_f) %></em></td> | |
29 <td></td> | |
30 </tr> | |
31 <% entries_by_day[day].each do |entry| -%> | |
32 <tr class="time-entry" style="border-bottom: 1px solid #f5f5f5;"> | |
33 <td class="activity"><%=h entry.activity %></td> | |
34 <td class="subject"><%=h entry.project %> <%= h(' - ') + link_to_issue(entry.issue, :truncate => 50) if entry.issue %></td> | |
35 <td class="comments"><%=h entry.comments %></td> | |
36 <td class="hours"><%= html_hours("%.2f" % entry.hours) %></td> | |
37 <td class="buttons"> | |
38 <% if entry.editable_by?(@user) -%> | |
39 <%= link_to image_tag('edit.png'), {:controller => 'timelog', :action => 'edit', :id => entry}, | |
40 :title => l(:button_edit) %> | |
41 <%= link_to image_tag('delete.png'), {:controller => 'timelog', :action => 'destroy', :id => entry}, | |
42 :data => {:confirm => l(:text_are_you_sure)}, | |
43 :method => :delete, | |
44 :title => l(:button_delete) %> | |
45 <% end -%> | |
46 </td> | |
47 </tr> | |
48 <% end -%> | |
49 <% end -%> | |
50 </tbody> | |
51 </table> | |
52 <% end %> |