From: Jean-Philippe Lang Date: Sun, 8 Jul 2012 13:19:46 +0000 (+0000) Subject: Show shared versions when editing issues from different projects with the context... X-Git-Tag: 2.1.0~355 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=23a1ef543fcf40af6b48a5cf1f164d8e82e3d419;p=redmine.git Show shared versions when editing issues from different projects with the context menu (#11345). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9961 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/controllers/context_menus_controller.rb b/app/controllers/context_menus_controller.rb index f371b2e04..329c0d0c1 100644 --- a/app/controllers/context_menus_controller.rb +++ b/app/controllers/context_menus_controller.rb @@ -48,6 +48,7 @@ class ContextMenusController < ApplicationController @assignables = @projects.map(&:assignable_users).reduce(:&) @trackers = @projects.map(&:trackers).reduce(:&) end + @versions = @projects.map {|p| p.shared_versions.open}.reduce(:&) @priorities = IssuePriority.active.reverse @back = back_url diff --git a/app/views/context_menus/issues.html.erb b/app/views/context_menus/issues.html.erb index f90cbf0e5..f029ca408 100644 --- a/app/views/context_menus/issues.html.erb +++ b/app/views/context_menus/issues.html.erb @@ -45,12 +45,11 @@ <% end %> - <% #TODO: allow editing versions when multiple projects %> - <% if @safe_attributes.include?('fixed_version_id') && @project && @project.shared_versions.open.any? -%> + <% if @safe_attributes.include?('fixed_version_id') && @versions.any? -%>
  • <%= l(:field_fixed_version) %>