summaryrefslogtreecommitdiffstats
path: root/app/views/my
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2014-10-04 07:26:48 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2014-10-04 07:26:48 +0000
commitefdf2584b68bfde062507965811f0f416f42dcbc (patch)
treeb77c263f28b080ca51fdf7d9a92cfcf2f6181541 /app/views/my
parent15d5c331ebc15caee6d8acf89d81b506102c8fa4 (diff)
downloadredmine-efdf2584b68bfde062507965811f0f416f42dcbc.tar.gz
redmine-efdf2584b68bfde062507965811f0f416f42dcbc.zip
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
Diffstat (limited to 'app/views/my')
-rw-r--r--app/views/my/blocks/_timelog.html.erb6
1 files changed, 6 insertions, 0 deletions
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) %>
+<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>