]> source.dussan.org Git - redmine.git/commitdiff
Merged r17204 from trunk to 3.4-stable (#28168).
authorGo MAEDA <maeda@farend.jp>
Sun, 18 Feb 2018 12:25:26 +0000 (12:25 +0000)
committerGo MAEDA <maeda@farend.jp>
Sun, 18 Feb 2018 12:25:26 +0000 (12:25 +0000)
git-svn-id: http://svn.redmine.org/redmine/branches/3.4-stable@17205 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/views/context_menus/issues.html.erb

index c24a7aeca7aa0b23c8fe3f222a79dd746e539022..244f9c54e0dd148889873e5d0443fc0ce597521d 100644 (file)
@@ -39,7 +39,7 @@
     <ul>
     <% @priorities.each do |p| -%>
         <li><%= context_menu_link p.name, bulk_update_issues_path(:ids => @issue_ids, :issue => {'priority_id' => p}, :back_url => @back), :method => :post,
-                                  :selected => (@issue && p == @issue.priority), :disabled => (!@can[:edit]) %></li>
+                                  :selected => (@issue && p == @issue.priority), :disabled => (!@can[:edit] || @issues.any?(&:priority_derived?)) %></li>
     <% end -%>
     </ul>
   </li>
@@ -97,7 +97,7 @@
     <ul>
     <% (0..10).map{|x|x*10}.each do |p| -%>
         <li><%= context_menu_link "#{p}%", bulk_update_issues_path(:ids => @issue_ids, :issue => {'done_ratio' => p}, :back_url => @back), :method => :post,
-                                      :selected => (@issue && p == @issue.done_ratio), :disabled => (!@can[:edit] || @issues.detect {|i| !i.leaf?}) %></li>
+                                      :selected => (@issue && p == @issue.done_ratio), :disabled => (!@can[:edit] || @issues.any?(&:done_ratio_derived?)) %></li>
     <% end -%>
     </ul>
   </li>