Mercurial > hg > soundsoftware-site
comparison .svn/pristine/bf/bf27e7a4eaace3c336ad2614552c89b7687ffee1.svn-base @ 1295:622f24f53b42 redmine-2.3
Update to Redmine SVN revision 11972 on 2.3-stable branch
author | Chris Cannam |
---|---|
date | Fri, 14 Jun 2013 09:02:21 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
1294:3e4c3460b6ca | 1295:622f24f53b42 |
---|---|
1 <h3><%=l(:label_spent_time)%> (<%= l(:label_last_n_days, 7) %>)</h3> | |
2 <% | |
3 entries = timelog_items | |
4 entries_by_day = entries.group_by(&:spent_on) | |
5 %> | |
6 | |
7 <div class="total-hours"> | |
8 <p><%= l(:label_total_time) %>: <%= html_hours("%.2f" % entries.sum(&:hours).to_f) %></p> | |
9 </div> | |
10 | |
11 <% if entries.any? %> | |
12 <table class="list time-entries"> | |
13 <thead><tr> | |
14 <th><%= l(:label_activity) %></th> | |
15 <th><%= l(:label_project) %></th> | |
16 <th><%= l(:field_comments) %></th> | |
17 <th><%= l(:field_hours) %></th> | |
18 <th></th> | |
19 </tr></thead> | |
20 <tbody> | |
21 <% entries_by_day.keys.sort.reverse.each do |day| %> | |
22 <tr class="odd"> | |
23 <td><strong><%= day == Date.today ? l(:label_today).titleize : format_date(day) %></strong></td> | |
24 <td colspan="2"></td> | |
25 <td class="hours"><em><%= html_hours("%.2f" % entries_by_day[day].sum(&:hours).to_f) %></em></td> | |
26 <td></td> | |
27 </tr> | |
28 <% entries_by_day[day].each do |entry| -%> | |
29 <tr class="time-entry" style="border-bottom: 1px solid #f5f5f5;"> | |
30 <td class="activity"><%=h entry.activity %></td> | |
31 <td class="subject"><%=h entry.project %> <%= h(' - ') + link_to_issue(entry.issue, :truncate => 50) if entry.issue %></td> | |
32 <td class="comments"><%=h entry.comments %></td> | |
33 <td class="hours"><%= html_hours("%.2f" % entry.hours) %></td> | |
34 <td align="center"> | |
35 <% if entry.editable_by?(@user) -%> | |
36 <%= link_to image_tag('edit.png'), {:controller => 'timelog', :action => 'edit', :id => entry}, | |
37 :title => l(:button_edit) %> | |
38 <%= link_to image_tag('delete.png'), {:controller => 'timelog', :action => 'destroy', :id => entry}, | |
39 :data => {:confirm => l(:text_are_you_sure)}, | |
40 :method => :delete, | |
41 :title => l(:button_delete) %> | |
42 <% end -%> | |
43 </td> | |
44 </tr> | |
45 <% end -%> | |
46 <% end -%> | |
47 </tbody> | |
48 </table> | |
49 <% end %> |