]> source.dussan.org Git - redmine.git/commitdiff
Adds a link to /time_entries/new from My Page Spent Time block (#17955).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 4 Oct 2014 07:26:48 +0000 (07:26 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 4 Oct 2014 07:26:48 +0000 (07:26 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@13423 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/views/my/blocks/_timelog.html.erb

index fbd83c38293e23031e212dab15d3196d61e7d0eb..f88de954901f74d5cc4a54461e9daa8e6fa3222a 100644 (file)
@@ -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>