##// END OF EJS Templates
Do not display items without valid selection in context menu when on different projects. #4998...
Jean-Baptiste Barth -
r3945:a9f5a17c678d
parent child
Show More
@@ -13,8 +13,8 class ContextMenusController < ApplicationController
13 13 memo & s
14 14 end
15 15 end
16 projects = @issues.collect(&:project).compact.uniq
17 @project = projects.first if projects.size == 1
16 @projects = @issues.collect(&:project).compact.uniq
17 @project = @projects.first if @projects.size == 1
18 18
19 19 @can = {:edit => (@project && User.current.allowed_to?(:edit_issues, @project)),
20 20 :log_time => (@project && User.current.allowed_to?(:log_time, @project)),
@@ -32,6 +32,8
32 32 </ul>
33 33 </li>
34 34 <% end %>
35
36 <% if @projects.size == 1 %>
35 37 <li class="folder">
36 38 <a href="#" class="submenu"><%= l(:field_priority) %></a>
37 39 <ul>
@@ -41,6 +43,8
41 43 <% end -%>
42 44 </ul>
43 45 </li>
46 <% end %>
47
44 48 <% unless @project.nil? || @project.shared_versions.open.empty? -%>
45 49 <li class="folder">
46 50 <a href="#" class="submenu"><%= l(:field_fixed_version) %></a>
@@ -80,7 +84,8
80 84 </ul>
81 85 </li>
82 86 <% end -%>
83 <% if Issue.use_field_for_done_ratio? %>
87
88 <% if Issue.use_field_for_done_ratio? && @projects.size == 1 %>
84 89 <li class="folder">
85 90 <a href="#" class="submenu"><%= l(:field_done_ratio) %></a>
86 91 <ul>
@@ -91,6 +96,7
91 96 </ul>
92 97 </li>
93 98 <% end %>
99
94 100 <% if !@issue.nil? %>
95 101 <% if @can[:log_time] -%>
96 102 <li><%= context_menu_link l(:button_log_time), {:controller => 'timelog', :action => 'edit', :issue_id => @issue},
General Comments 0
You need to be logged in to leave comments. Login now