diff app/views/my/blocks/_timelog.html.erb @ 1298:4f746d8966dd redmine_2.3_integration

Merge from redmine-2.3 branch to create new branch redmine-2.3-integration
author Chris Cannam
date Fri, 14 Jun 2013 09:28:30 +0100
parents 622f24f53b42
children
line wrap: on
line diff
--- a/app/views/my/blocks/_timelog.html.erb	Fri Jun 14 09:07:32 2013 +0100
+++ b/app/views/my/blocks/_timelog.html.erb	Fri Jun 14 09:28:30 2013 +0100
@@ -1,14 +1,11 @@
 <h3><%=l(:label_spent_time)%> (<%= l(:label_last_n_days, 7) %>)</h3>
 <%
-entries = TimeEntry.find(:all,
-        :conditions => ["#{TimeEntry.table_name}.user_id = ? AND #{TimeEntry.table_name}.spent_on BETWEEN ? AND ?", @user.id, Date.today - 6, Date.today],
-        :include => [:activity, :project, {:issue => [:tracker, :status]}],
-        :order => "#{TimeEntry.table_name}.spent_on DESC, #{Project.table_name}.name ASC, #{Tracker.table_name}.position ASC, #{Issue.table_name}.id ASC")
+entries = timelog_items
 entries_by_day = entries.group_by(&:spent_on)
 %>
 
 <div class="total-hours">
-<p><%= l(:label_total) %>: <%= html_hours("%.2f" % entries.sum(&:hours).to_f) %></p>
+<p><%= l(:label_total_time) %>: <%= html_hours("%.2f" % entries.sum(&:hours).to_f) %></p>
 </div>
 
 <% if entries.any? %>