]> source.dussan.org Git - sonarqube.git/commitdiff
Do not display "Profiles:" in the widget "description" when empty
authorSimon Brandhof <simon.brandhof@sonarsource.com>
Thu, 26 Jun 2014 13:51:38 +0000 (15:51 +0200)
committerSimon Brandhof <simon.brandhof@sonarsource.com>
Thu, 26 Jun 2014 13:52:01 +0000 (15:52 +0200)
plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/description.html.erb

index 20b6dad36b83807400f4b35fc8b8c13de5da87eb..e0c8c4103e4389dadd59224958e24defcf884dc4 100644 (file)
@@ -13,6 +13,7 @@
      qprofiles_measure = measure(Metric::QUALITY_PROFILES)
      if qprofiles_measure && !qprofiles_measure.data.blank?
        qprofiles = JSON.parse qprofiles_measure.data
+       if qprofiles.size>0
   %>
     <p class="description-widget-description">
       <%= message('widget.description.profiles') -%>:
@@ -26,7 +27,8 @@
           </span>
           <% if i < (qprofiles.size - 1) %>,<% end %>
         </span>
-      <% end %>
+      <%   end
+         end %>
     </p>
   <%
      else