From 2bcc6521a02e26303497abfc490cade9ece5d51c Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Tue, 22 Jul 2014 14:25:39 +0200 Subject: [PATCH] SONAR-5478 In issues widget, the technical debt should be placed before the issues --- .../core/widgets/issues/issues.html.erb | 73 ++++++++++--------- 1 file changed, 37 insertions(+), 36 deletions(-) diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/issues.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/issues.html.erb index fc796c160b1..ec65a4520f2 100644 --- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/issues.html.erb +++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/issues.html.erb @@ -11,6 +11,43 @@ new_technical_debt = @snapshot.measure('new_technical_debt') %>
+ + <% if technical_debt %> +
+
+
+ <%= message('widget.rules.technical_debt') -%> + + <%= format_measure(technical_debt) -%> + + <%= dashboard_configuration.selected_period? ? format_variation(technical_debt) : trend_icon(technical_debt) -%> +
+
+ <% + if @dashboard_configuration.selected_period? + technical_debt_variation = variation_value(technical_debt) + new_technical_debt_variation = variation_value(new_technical_debt) + estimated_cleared_technical_debt = (new_technical_debt_variation - technical_debt_variation).to_i if technical_debt_variation && new_technical_debt_variation + %> + <% if new_technical_debt_variation && new_technical_debt_variation > 0 %> +

+ <%= message('widget.rules.added') %> + <%= format_variation(new_technical_debt, :style => 'none', :default => '-') -%> +

+ <% end %> + <% if estimated_cleared_technical_debt && estimated_cleared_technical_debt > 0 %> +

+ <%= message('widget.rules.removed') %> + <%= Internal.i18n.formatLongDuration(estimated_cleared_technical_debt, 'SHORT') -%> +

+ <% end %> + <% end %> +
+
+
+ <% end %> +
@@ -47,42 +84,6 @@
- <% if technical_debt %> -
-
-
- <%= message('widget.rules.technical_debt') -%> - - <%= format_measure(technical_debt) -%> - - <%= dashboard_configuration.selected_period? ? format_variation(technical_debt) : trend_icon(technical_debt) -%> -
-
- <% - if @dashboard_configuration.selected_period? - technical_debt_variation = variation_value(technical_debt) - new_technical_debt_variation = variation_value(new_technical_debt) - estimated_cleared_technical_debt = (new_technical_debt_variation - technical_debt_variation).to_i if technical_debt_variation && new_technical_debt_variation - %> - <% if new_technical_debt_variation && new_technical_debt_variation > 0 %> -

- <%= message('widget.rules.added') %> - <%= format_variation(new_technical_debt, :style => 'none', :default => '-') -%> -

- <% end %> - <% if estimated_cleared_technical_debt && estimated_cleared_technical_debt > 0 %> -

- <%= message('widget.rules.removed') %> - <%= Internal.i18n.formatLongDuration(estimated_cleared_technical_debt, 'SHORT') -%> -

- <% end %> - <% end %> -
-
-
- <% end %> -
<% values = [blocker_issues, critical_issues, major_issues, minor_issues, info_issues] -- 2.39.5