diff --git a/app/models/time_booking.rb b/app/models/time_booking.rb
index 3141b793..20cfce64 100644
--- a/app/models/time_booking.rb
+++ b/app/models/time_booking.rb
@@ -159,6 +159,10 @@ def update_time(start, stop)
self.time_entry.update_attributes!(:spent_on => start, :hours => self.hours_spent) #also update TimeEntry
end
+ def user_id
+ self.time_entry.user_id
+ end
+
def activity_id
self.time_entry.activity_id
end
diff --git a/app/views/time_bookings/_list_bookings.html.erb b/app/views/time_bookings/_list_bookings.html.erb
index bbb0efa0..2db6f08a 100644
--- a/app/views/time_bookings/_list_bookings.html.erb
+++ b/app/views/time_bookings/_list_bookings.html.erb
@@ -55,7 +55,7 @@
<% end %>
<% end -%>
diff --git a/app/views/time_bookings/_list_entry.html.erb b/app/views/time_bookings/_list_entry.html.erb
index ecd985ba..e3960359 100644
--- a/app/views/time_bookings/_list_entry.html.erb
+++ b/app/views/time_bookings/_list_entry.html.erb
@@ -5,7 +5,7 @@
<%= raw query.columns.map { |column| "#{column_content(column, entry)} | " }.join %>
<% tt = TimeTracker.where(:user_id => User.current.id).first %>
- <% if show_resume && tt.nil? && User.current.allowed_to_globally?({:controller => 'time_trackers', :action => 'start'}, {}) %>
+ <% if entry.user_id == User.current.id && tt.nil? && User.current.allowed_to_globally?({:controller => 'time_trackers', :action => 'start'}, {}) %>
<%= link_to '',
{:controller => 'time_trackers', :action => 'start', :time_tracker => {:issue_id => entry.virtual? ? nil : entry.time_entry.issue.id, :comments => entry.comments}},
:class => 'icon-start tt_list_button'
diff --git a/app/views/tt_bookings_list/_list.html.erb b/app/views/tt_bookings_list/_list.html.erb
index 983292fb..00e6a192 100644
--- a/app/views/tt_bookings_list/_list.html.erb
+++ b/app/views/tt_bookings_list/_list.html.erb
@@ -49,7 +49,7 @@
<% end %>
|
<% end -%>