From: Jean-Philippe Lang Date: Sat, 4 Oct 2014 07:26:48 +0000 (+0000) Subject: Adds a link to /time_entries/new from My Page Spent Time block (#17955). X-Git-Tag: 2.6.0~19 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=efdf2584b68bfde062507965811f0f416f42dcbc;p=redmine.git Adds a link to /time_entries/new from My Page Spent Time block (#17955). git-svn-id: http://svn.redmine.org/redmine/trunk@13423 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/views/my/blocks/_timelog.html.erb b/app/views/my/blocks/_timelog.html.erb index fbd83c382..f88de9549 100644 --- a/app/views/my/blocks/_timelog.html.erb +++ b/app/views/my/blocks/_timelog.html.erb @@ -7,6 +7,12 @@ 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) %>