aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>2014-10-03 14:17:43 +0200
committerJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>2014-10-03 14:17:49 +0200
commit8ffe4556e3862d804624719c0ac66b52080ef125 (patch)
tree55f040db4dedf29708a84644ba96b9fb2ba114e7
parent928ef1264282f09bd869191f7f0d83b5f4235f0d (diff)
downloadsonarqube-8ffe4556e3862d804624719c0ac66b52080ef125.tar.gz
sonarqube-8ffe4556e3862d804624719c0ac66b52080ef125.zip
SONAR-5535 refine layout of size widget (generated_sloc under sloc)
-rw-r--r--plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/SizeWidget.java2
-rw-r--r--plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/size.html.erb23
-rw-r--r--sonar-core/src/main/resources/org/sonar/l10n/core.properties1
3 files changed, 14 insertions, 12 deletions
diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/SizeWidget.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/SizeWidget.java
index b3330c7833f..5f97c30c272 100644
--- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/SizeWidget.java
+++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/SizeWidget.java
@@ -22,6 +22,6 @@ package org.sonar.plugins.core.widgets;
public class SizeWidget extends CoreWidget {
public SizeWidget() {
- super("size", "Size metrics", "/org/sonar/plugins/core/widgets/size.html.erb");
+ super("size", "Size metrics", "/Users/jean-baptiste.lievremont/Dev/Source/sonar/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/size.html.erb");
}
}
diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/size.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/size.html.erb
index cda33b0714f..0a28f86c05c 100644
--- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/size.html.erb
+++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/size.html.erb
@@ -29,6 +29,13 @@
<%= dashboard_configuration.selected_period? ? format_variation(ncloc) : trend_icon(ncloc) -%>
</span>
</p>
+ <% if generated_ncloc && generated_ncloc.value>0 %>
+ <p class="widget-label nowrap" style="margin-bottom: 7px">
+ <%= message('including_abbreviated') -%>
+ <%= format_measure(generated_ncloc, :url => url_for_drilldown(generated_ncloc)) -%> <%= dashboard_configuration.selected_period? ? format_variation(generated_ncloc) : trend_icon(generated_ncloc) -%>
+ <%= message('metric.generated_ncloc.name.suffix') -%>
+ </p>
+ <% end %>
<% if ncloc_language_dist_hash %>
<% if ncloc_language_dist_hash.size > 1 %>
@@ -105,16 +112,6 @@
</p>
<% end %>
- <% if ncloc && generated_ncloc && generated_ncloc.value > 0 %>
- <p>
- <%= format_measure(generated_ncloc, :url => url_for_drilldown(generated_ncloc)) -%>
- <span class="nowrap">
- <%= dashboard_configuration.selected_period? ? format_variation(generated_ncloc) : trend_icon(generated_ncloc) %>
- <span class="widget-label"><%= message('metric.generated_ncloc.name.suffix') -%></span>
- </span>
- </p>
- <% end %>
-
<p class="widget-measure">
<span class="widget-label"><%= message('metric.lines.name') -%></span>
<span class="nowrap">
@@ -124,7 +121,11 @@
</p>
<% if generated_lines && generated_lines.value>0 %>
- <p>incl. <%= format_measure(generated_lines, :suffix => ' ' + message('metric.generated_lines.name.suffix'), :url => url_for_drilldown(generated_lines)) -%> <%= dashboard_configuration.selected_period? ? format_variation(generated_lines) : trend_icon(generated_lines) -%></p>
+ <p class="widget-label nowrap" style="margin-bottom: 7px">
+ <%= message('including_abbreviated') -%>
+ <%= format_measure(generated_lines, :url => url_for_drilldown(generated_lines)) -%> <%= dashboard_configuration.selected_period? ? format_variation(generated_lines) : trend_icon(generated_lines) -%>
+ <%= message('metric.generated_lines.name.suffix') -%>
+ </p>
<% end %>
<% if projects %>
diff --git a/sonar-core/src/main/resources/org/sonar/l10n/core.properties b/sonar-core/src/main/resources/org/sonar/l10n/core.properties
index b8a6816bb2e..d7232b45334 100644
--- a/sonar-core/src/main/resources/org/sonar/l10n/core.properties
+++ b/sonar-core/src/main/resources/org/sonar/l10n/core.properties
@@ -72,6 +72,7 @@ help=Help
hide=Hide
identifier_abbreviated=Id
inactive=Inactive
+including_abbreviated=incl.
info=Info
issue=Issue
issues=Issues