summaryrefslogtreecommitdiffstats
path: root/app/controllers/context_menus_controller.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2013-06-11 18:33:06 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2013-06-11 18:33:06 +0000
commit60d2a5e322cb0da01dd5e372d004aa1b65a5280d (patch)
tree8065271506ba15df4c10e2df2a9bdb7ca3b5f21d /app/controllers/context_menus_controller.rb
parent7371077fa27cfc7442a74be5e1c53b40fa6724d8 (diff)
downloadredmine-60d2a5e322cb0da01dd5e372d004aa1b65a5280d.tar.gz
redmine-60d2a5e322cb0da01dd5e372d004aa1b65a5280d.zip
Use #find_issues as before filter for issues context menu.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11961 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/context_menus_controller.rb')
-rw-r--r--app/controllers/context_menus_controller.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/app/controllers/context_menus_controller.rb b/app/controllers/context_menus_controller.rb
index bc434ea12..d78ef3d3e 100644
--- a/app/controllers/context_menus_controller.rb
+++ b/app/controllers/context_menus_controller.rb
@@ -19,17 +19,15 @@ class ContextMenusController < ApplicationController
helper :watchers
helper :issues
+ before_filter :find_issues, :only => :issues
+
def issues
- @issues = Issue.visible.all(:conditions => {:id => params[:ids]}, :include => :project)
- (render_404; return) unless @issues.present?
if (@issues.size == 1)
@issue = @issues.first
end
@issue_ids = @issues.map(&:id).sort
@allowed_statuses = @issues.map(&:new_statuses_allowed_to).reduce(:&)
- @projects = @issues.collect(&:project).compact.uniq
- @project = @projects.first if @projects.size == 1
@can = {:edit => User.current.allowed_to?(:edit_issues, @projects),
:log_time => (@project && User.current.allowed_to?(:log_time, @project)),