]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-4347 Fix a regression on duplications widget
authorJulien HENRY <julien.henry@sonarsource.com>
Wed, 10 Jul 2013 14:31:33 +0000 (16:31 +0200)
committerJulien HENRY <julien.henry@sonarsource.com>
Wed, 10 Jul 2013 15:14:19 +0000 (17:14 +0200)
plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/duplications_widget.html.erb

index df4065d87b5b5f549676c4e568f21263f0f81a62..7730b4e0f6006da96a7e6b7c8d94a656db062dba 100644 (file)
@@ -1,6 +1,6 @@
 <%
-  duplications=measure('duplicated_lines_density')
-  if duplications
+  duplicated_lines_density=measure('duplicated_lines_density')
+  if duplicated_lines_density
 %>
 <table width="100%">
   <tbody>
@@ -9,21 +9,19 @@
         <div class="dashbox">
           <p class="title"><%= message('widget.duplications.duplications') -%></p>
           <p>
-            <span class="big">
-              <%= format_measure('duplicated_lines_density',:url => url_for_drilldown('duplicated_lines_density'))%></span>
-              <%= dashboard_configuration.selected_period? ? format_variation('duplicated_lines_density') : trend_icon('duplicated_lines_density') -%>
-            </span>
+            <span class="big"><%= format_measure(duplicated_lines_density, :suffix => '', :url => url_for_drilldown(Metric::DUPLICATED_LINES, :highlight =>  'duplicated_lines_density')) %></span>
+            <%= dashboard_configuration.selected_period? ? format_variation('duplicated_lines_density') : trend_icon('duplicated_lines_density') -%>
           </p>
           <p>
-            <%= format_measure(measure('duplicated_lines'),:url => url_for_drilldown('duplicated_lines'), :suffix =>  ' ' + message('widget.duplications.lines.suffix'))%>
+            <%= format_measure(measure('duplicated_lines'),:url => url_for_drilldown('duplicated_lines'), :suffix => message('widget.duplications.lines.suffix'))%>
               <%= dashboard_configuration.selected_period? ? format_variation('duplicated_lines') : trend_icon('duplicated_lines') -%>
           </p>
           <p>
-            <%= format_measure(measure('duplicated_blocks'),:url => url_for_drilldown('duplicated_blocks'), :suffix =>  ' ' + message('widget.duplications.blocks.suffix'))%>
+            <%= format_measure(measure('duplicated_blocks'),:url => url_for_drilldown('duplicated_blocks'), :suffix => message('widget.duplications.blocks.suffix'))%>
               <%= dashboard_configuration.selected_period? ? format_variation('duplicated_blocks') : trend_icon('duplicated_blocks') -%>
           </p>
           <p>
-            <%= format_measure(measure('duplicated_files'),:url => url_for_drilldown('duplicated_files'), :suffix =>  ' ' + message('widget.duplications.files.suffix'))%>
+            <%= format_measure(measure('duplicated_files'),:url => url_for_drilldown('duplicated_files'), :suffix => message('widget.duplications.files.suffix'))%>
               <%= dashboard_configuration.selected_period? ? format_variation('duplicated_files') : trend_icon('duplicated_files') -%>
           </p>
        </div>