From 8a0e7d5af74c24c3413628daf1afb98abdfbbecb Mon Sep 17 00:00:00 2001 From: Julien Lancelot Date: Wed, 10 Jul 2013 12:17:49 +0200 Subject: [PATCH] SONAR-4445 Improve Plan action of issue detail to include "Unplan" in the select box and remove the unplan button --- .../app/views/issue/_plan_form.html.erb | 21 +++++++------------ 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/issue/_plan_form.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/issue/_plan_form.html.erb index 879e6331dba..5c167cd23b2 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/issue/_plan_form.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/issue/_plan_form.html.erb @@ -13,15 +13,14 @@ <% else first_plan = plans[0] - plan_options = options_for_select(plans.map { |plan| - if plan.deadLine - label = "#{h plan.name} (#{format_date(plan.deadLine)})" - else - label = h plan.name - end + options = plans.map { |plan| + label = plan.deadLine ? "#{h plan.name} (#{format_date(plan.deadLine)})" : h(plan.name) [label, plan.key] - }, first_plan.key) - + } + if @issue.actionPlanKey + options.unshift([escape_javascript(message('issue.unplan.submit')), '']) + end + plan_options = options_for_select(options, first_plan.key) %>
@@ -31,12 +30,6 @@   - <% if @issue.actionPlanKey %> - <%= image_tag 'sep12.png' -%> -   - - <% end %> <%= link_to_function message('cancel'), 'closeIssueForm(this)' -%>  -- 2.39.5