Adds label_total_time string (#13337).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11582 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2013-03-10 13:01:46 +00:00
parent 3126ff8388
commit 06a92fe0d0
53 changed files with 62 additions and 15 deletions
+2 -2
View File
@@ -107,14 +107,14 @@ module TimelogHelper
# Column headers
headers = report.criteria.collect {|criteria| l(report.available_criteria[criteria][:label]) }
headers += report.periods
headers << l(:label_total)
headers << l(:label_total_time)
csv << headers.collect {|c| Redmine::CodesetUtil.from_utf8(
c.to_s,
l(:general_csv_encoding) ) }
# Content
report_criteria_to_csv(csv, report.available_criteria, report.columns, report.criteria, report.periods, report.hours)
# Total row
str_total = Redmine::CodesetUtil.from_utf8(l(:label_total), l(:general_csv_encoding))
str_total = Redmine::CodesetUtil.from_utf8(l(:label_total_time), l(:general_csv_encoding))
row = [ str_total ] + [''] * (report.criteria.size - 1)
total = 0
report.periods.each do |period|
+1 -1
View File
@@ -5,7 +5,7 @@ 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? %>
+1 -1
View File
@@ -13,7 +13,7 @@
<% end %>
<div class="total-hours">
<p><%= l(:label_total) %>: <%= html_hours(l_hours(@total_hours)) %></p>
<p><%= l(:label_total_time) %>: <%= html_hours(l_hours(@total_hours)) %></p>
</div>
<% unless @entries.empty? %>
+3 -3
View File
@@ -30,7 +30,7 @@
<% unless @report.criteria.empty? %>
<div class="total-hours">
<p><%= l(:label_total) %>: <%= html_hours(l_hours(@report.total_hours)) %></p>
<p><%= l(:label_total_time) %>: <%= html_hours(l_hours(@report.total_hours)) %></p>
</div>
<% unless @report.hours.empty? %>
@@ -45,13 +45,13 @@
<% @report.periods.each do |period| %>
<th class="period" width="<%= columns_width %>%"><%= period %></th>
<% end %>
<th class="total" width="<%= columns_width %>%"><%= l(:label_total) %></th>
<th class="total" width="<%= columns_width %>%"><%= l(:label_total_time) %></th>
</tr>
</thead>
<tbody>
<%= render :partial => 'report_criteria', :locals => {:criterias => @report.criteria, :hours => @report.hours, :level => 0} %>
<tr class="total">
<td><%= l(:label_total) %></td>
<td><%= l(:label_total_time) %></td>
<%= ('<td></td>' * (@report.criteria.size - 1)).html_safe %>
<% total = 0 -%>
<% @report.periods.each do |period| -%>