]> source.dussan.org Git - redmine.git/commitdiff
Allows bulk change issue private flag (#10042).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Mon, 23 Jan 2012 18:35:11 +0000 (18:35 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Mon, 23 Jan 2012 18:35:11 +0000 (18:35 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8696 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/issues_controller.rb
app/views/issues/bulk_edit.html.erb

index e3e6ffedc27427c7ef0716b685c7fa8fa7c8d819..9a64ba062914e655d97addcbeea3396a8e502fe5 100644 (file)
@@ -228,6 +228,7 @@ class IssuesController < ApplicationController
     @assignables = target_projects.map(&:assignable_users).inject{|memo,a| memo & a}
     @trackers = target_projects.map(&:trackers).inject{|memo,t| memo & t}
 
+    @safe_attributes = @issues.map(&:safe_attribute_names).inject {|memo,attrs| memo & attrs}
     render :layout => false if request.xhr?
   end
 
index dfba2fe951f7779900beac7e2b2c6860f5f6e8c1..cd33d3734d34981d5bccaf365d2ab45884f55a58 100644 (file)
 </div>
 
 <div class="splitcontentright">
+<% if @safe_attributes.include?('is_private') %>
+<p>
+  <label for='issue_is_private'><%= l(:field_is_private) %></label>
+  <%= select_tag('issue[is_private]', content_tag('option', l(:label_no_change_option), :value => '') +
+                                content_tag('option', l(:general_text_Yes), :value => '1') +
+                                content_tag('option', l(:general_text_No), :value => '0')) %>
+</p>
+<% end %>
 <% if @project && User.current.allowed_to?(:manage_subtasks, @project) %>
 <p>
   <label for='issue_parent_issue_id'><%= l(:field_parent_issue) %></label>