summaryrefslogtreecommitdiffstats
path: root/app/views
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2016-10-29 11:59:52 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2016-10-29 11:59:52 +0000
commit420ebc0d1f4b7ed63f55bd5325d39311c455e5ec (patch)
treea7d532ab89747bfe8f9d4cc3084126d236ab50c0 /app/views
parent37921422450f4b2a82699035b5842187bb5bf3f6 (diff)
downloadredmine-420ebc0d1f4b7ed63f55bd5325d39311c455e5ec.tar.gz
redmine-420ebc0d1f4b7ed63f55bd5325d39311c455e5ec.zip
Display hours in block title.
git-svn-id: http://svn.redmine.org/redmine/trunk@15934 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views')
-rw-r--r--app/views/my/blocks/_timelog.html.erb14
1 files 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 @@
-<h3>
- <%= link_to l(:label_spent_time), time_entries_path(:user_id => 'me') %>
- (<%= l(:label_last_n_days, 7) %>)
-</h3>
<%
entries = timelog_items
entries_by_day = entries.group_by(&:spent_on)
%>
-
<% if User.current.allowed_to?(:log_time, nil, :global => true) %>
<div class="contextual">
<%= link_to l(:button_log_time), new_time_entry_path, :class => "icon icon-add" %>
</div>
<% end %>
-<div class="total-hours">
-<p><%= l(:label_total_time) %>: <%= html_hours("%.2f" % entries.sum(&:hours).to_f) %></p>
-</div>
+<h3>
+ <%= link_to l(:label_spent_time), time_entries_path(:user_id => 'me') %>
+ (<%= l(:label_last_n_days, 7) %>: <%= l_hours_short entries.sum(&:hours) %>)
+</h3>
<% if entries.any? %>
<table class="list time-entries">
@@ -56,4 +52,6 @@ entries_by_day = entries.group_by(&:spent_on)
<% end -%>
</tbody>
</table>
+<% else %>
+ <p class="nodata"><%= l(:label_no_data) %></p>
<% end %>