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
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 -%>
|
||||
|
||||
Reference in New Issue
Block a user