summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-07-08 13:19:46 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-07-08 13:19:46 +0000
commit23a1ef543fcf40af6b48a5cf1f164d8e82e3d419 (patch)
treeed4ed3e4440f194b74ec742f92d6e52242f98469 /app
parent7acd04fb87229cd35c5c7a765bf1cfe9aaf69052 (diff)
downloadredmine-23a1ef543fcf40af6b48a5cf1f164d8e82e3d419.tar.gz
redmine-23a1ef543fcf40af6b48a5cf1f164d8e82e3d419.zip
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
Diffstat (limited to 'app')
-rw-r--r--app/controllers/context_menus_controller.rb1
-rw-r--r--app/views/context_menus/issues.html.erb5
2 files changed, 3 insertions, 3 deletions
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 @@
</li>
<% 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? -%>
<li class="folder">
<a href="#" class="submenu"><%= l(:field_fixed_version) %></a>
<ul>
- <% @project.shared_versions.open.sort.each do |v| -%>
+ <% @versions.sort.each do |v| -%>
<li><%= context_menu_link format_version_name(v), {:controller => 'issues', :action => 'bulk_update', :ids => @issues.collect(&:id), :issue => {'fixed_version_id' => v}, :back_url => @back}, :method => :post,
:selected => (@issue && v == @issue.fixed_version), :disabled => !@can[:update] %></li>
<% end -%>