]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-5535 refine layout of size widget (generated_sloc under sloc)
authorJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Fri, 3 Oct 2014 12:17:43 +0000 (14:17 +0200)
committerJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Fri, 3 Oct 2014 12:17:49 +0000 (14:17 +0200)
plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/SizeWidget.java
plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/size.html.erb
sonar-core/src/main/resources/org/sonar/l10n/core.properties

index b3330c7833f478734aa1d580d1160b5a0d4df651..5f97c30c27200b81e762edfe58376dd6bb6f6e16 100644 (file)
@@ -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");
   }
 }
index cda33b0714f17041799a7d65ec4512c4f3ed2a70..0a28f86c05c5ef730cd9bb9c65d37a9fb049e439 100644 (file)
             <%= 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 %>
         </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">
       </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 %>
index b8a6816bb2e8a40145b2bd81d6b3d98b349e5d13..d7232b4533412f118b7e5414af917c3b0108c63b 100644 (file)
@@ -72,6 +72,7 @@ help=Help
 hide=Hide
 identifier_abbreviated=Id
 inactive=Inactive
+including_abbreviated=incl.
 info=Info
 issue=Issue
 issues=Issues