From c48e40af3157ddcda367844fafdad492e06729af Mon Sep 17 00:00:00 2001 From: Eric Davis Date: Mon, 20 Sep 2010 03:58:50 +0000 Subject: [PATCH] Merged r4059 from trunk. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@4129 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/context_menus_controller.rb | 4 ++-- app/views/context_menus/issues.html.erb | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/app/controllers/context_menus_controller.rb b/app/controllers/context_menus_controller.rb index e437a18dc..5f4b02ca2 100644 --- a/app/controllers/context_menus_controller.rb +++ b/app/controllers/context_menus_controller.rb @@ -13,8 +13,8 @@ class ContextMenusController < ApplicationController memo & s end end - projects = @issues.collect(&:project).compact.uniq - @project = projects.first if projects.size == 1 + @projects = @issues.collect(&:project).compact.uniq + @project = @projects.first if @projects.size == 1 @can = {:edit => (@project && User.current.allowed_to?(:edit_issues, @project)), :log_time => (@project && User.current.allowed_to?(:log_time, @project)), diff --git a/app/views/context_menus/issues.html.erb b/app/views/context_menus/issues.html.erb index efd8cde0e..94d4e802f 100644 --- a/app/views/context_menus/issues.html.erb +++ b/app/views/context_menus/issues.html.erb @@ -32,6 +32,8 @@ <% end %> + + <% if @projects.size == 1 %>
  • <%= l(:field_priority) %>
  • + <% end %> + <% unless @project.nil? || @project.shared_versions.open.empty? -%>
  • <%= l(:field_fixed_version) %> @@ -80,7 +84,8 @@
  • <% end -%> - <% if Issue.use_field_for_done_ratio? %> + + <% if Issue.use_field_for_done_ratio? && @projects.size == 1 %>
  • <%= l(:field_done_ratio) %>
  • <% end %> + <% if !@issue.nil? %> <% if @can[:log_time] -%>
  • <%= context_menu_link l(:button_log_time), {:controller => 'timelog', :action => 'edit', :issue_id => @issue}, -- 2.39.5