summaryrefslogtreecommitdiffstats
path: root/app/views/timelog
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2018-12-16 16:28:22 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2018-12-16 16:28:22 +0000
commit2fdbcd35dd8cc2f6b98340825a57afd24ff89670 (patch)
treebf05ccb4c0ad1109229cea2b5309fab4c27f8e51 /app/views/timelog
parent537f162f27d91ad99fadd4be74c878adf33f0583 (diff)
downloadredmine-2fdbcd35dd8cc2f6b98340825a57afd24ff89670.tar.gz
redmine-2fdbcd35dd8cc2f6b98340825a57afd24ff89670.zip
Adds a permission to log time for another user (#3848).
Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@17755 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/timelog')
-rw-r--r--app/views/timelog/_form.html.erb3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/views/timelog/_form.html.erb b/app/views/timelog/_form.html.erb
index aa62ffc78..691da9ed1 100644
--- a/app/views/timelog/_form.html.erb
+++ b/app/views/timelog/_form.html.erb
@@ -16,6 +16,9 @@
<%= link_to_issue(@time_entry.issue) if @time_entry.issue.try(:visible?) %>
</span>
</p>
+ <% if User.current.allowed_to?(:log_time_for_other_users, @project) %>
+ <p><%= f.select :user_id, user_collection_for_select_options(@time_entry), :required => true %></p>
+ <% end %>
<p><%= f.date_field :spent_on, :size => 10, :required => true %><%= calendar_for('time_entry_spent_on') %></p>
<p><%= f.hours_field :hours, :size => 6, :required => true %></p>
<p><%= f.text_field :comments, :size => 100, :maxlength => 1024, :required => Setting.timelog_required_fields.include?('comments') %></p>