From 420ebc0d1f4b7ed63f55bd5325d39311c455e5ec Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 29 Oct 2016 11:59:52 +0000 Subject: [PATCH] Display hours in block title. git-svn-id: http://svn.redmine.org/redmine/trunk@15934 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/my/blocks/_timelog.html.erb | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/app/views/my/blocks/_timelog.html.erb b/app/views/my/blocks/_timelog.html.erb index 14a0711e9..6f4081f4e 100644 --- a/app/views/my/blocks/_timelog.html.erb +++ b/app/views/my/blocks/_timelog.html.erb @@ -1,21 +1,17 @@ -

- <%= link_to l(:label_spent_time), time_entries_path(:user_id => 'me') %> - (<%= l(:label_last_n_days, 7) %>) -

<% entries = timelog_items entries_by_day = entries.group_by(&:spent_on) %> - <% if User.current.allowed_to?(:log_time, nil, :global => true) %>
<%= link_to l(:button_log_time), new_time_entry_path, :class => "icon icon-add" %>
<% end %> -
-

<%= l(:label_total_time) %>: <%= html_hours("%.2f" % entries.sum(&:hours).to_f) %>

-
+

+ <%= link_to l(:label_spent_time), time_entries_path(:user_id => 'me') %> + (<%= l(:label_last_n_days, 7) %>: <%= l_hours_short entries.sum(&:hours) %>) +

<% if entries.any? %> @@ -56,4 +52,6 @@ entries_by_day = entries.group_by(&:spent_on) <% end -%>
+<% else %> +

<%= l(:label_no_data) %>

<% end %> -- 2.39.5