diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-04-04 11:53:03 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-04-04 11:53:03 +0000 |
commit | ab31a114fd9a972e0d850c3438abaf031ebf84cd (patch) | |
tree | ad6632509f84adbda48e11c270057f4b5dd8b61b | |
parent | f6c5426605d721a4e1dca0315ed031d617b85212 (diff) | |
download | redmine-ab31a114fd9a972e0d850c3438abaf031ebf84cd.tar.gz redmine-ab31a114fd9a972e0d850c3438abaf031ebf84cd.zip |
add controller for bulk edit time entries (#7996).
Contributed by Adam Soltys.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5312 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | app/controllers/context_menus_controller.rb | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/app/controllers/context_menus_controller.rb b/app/controllers/context_menus_controller.rb index 373938abe..f2ff7020e 100644 --- a/app/controllers/context_menus_controller.rb +++ b/app/controllers/context_menus_controller.rb @@ -40,5 +40,18 @@ class ContextMenusController < ApplicationController render :layout => false end - + + def time_entries + @time_entries = TimeEntry.all( + :conditions => {:id => params[:ids]}, :include => :project) + @projects = @time_entries.collect(&:project).compact.uniq + @project = @projects.first if @projects.size == 1 + @activities = TimeEntryActivity.shared.active + @can = {:edit => User.current.allowed_to?(:log_time, @projects), + :update => User.current.allowed_to?(:log_time, @projects), + :delete => User.current.allowed_to?(:log_time, @projects) + } + @back = back_url + render :layout => false + end end |