]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-5149 Add tooltip on number of rules
authorJulien Lancelot <julien.lancelot@sonarsource.com>
Wed, 18 Jun 2014 13:13:14 +0000 (15:13 +0200)
committerJulien Lancelot <julien.lancelot@sonarsource.com>
Wed, 18 Jun 2014 13:13:14 +0000 (15:13 +0200)
sonar-core/src/main/resources/org/sonar/l10n/core.properties
sonar-server/src/main/webapp/WEB-INF/app/views/profiles/show.html.erb

index fdd8d4224a19c9643708d2326ba35941e07b06a1..10b3ef7cfaca90369252213958841dbb5e6e0bec 100644 (file)
@@ -1625,6 +1625,8 @@ quality_profiles.restore_built_in_profiles=Restore Built-in Profiles
 quality_profiles.restore_built_in_profiles_confirmation=Are you sure you want to restore '{0}' profile(s) for '{1}' ?
 quality_profiles.including=including
 quality_profiles.deprecated=deprecated
+quality_profiles.manage_rules_tooltip=Manage rules of this profile
+quality_profiles.see_rules_tooltip=See rules of this profile
 
 #------------------------------------------------------------------------------
 #
index b9818a6f0c597fff6477eba066143b063a4dd5fe..618276a7670a8f4275281504303b5787f735d9ad 100644 (file)
         <div class="widget-measure widget-measure-main">
           <span class="widget-label"><%= message('rules') -%></span>
           <span nowrap>
-            <a class="widget-link" href="<%= "#{ApplicationController.root_context}/coding_rules#qprofile=#{@profile.key().toString()}|activation=true|languages=#{@profile.language()}" -%>">
+            <% tooltip = message('quality_profiles.see_rules_tooltip')
+               tooltip = message('quality_profiles.manage_rules_tooltip') if profiles_administrator?
+            %>
+            <a class="widget-link"
+               href="<%= "#{ApplicationController.root_context}/coding_rules#qprofile=#{@profile.key().toString()}|activation=true|languages=#{@profile.language()}" -%>"
+               title="<%= tooltip %>">
               <span><%= active_rules -%></span>
             </a>
           </span>
         </div>
         <% if @deprecated_active_rules > 0 %>
           <div class="widget-measure">
-            <%= message('quality_profiles.including') %>&nbsp;<a href="<%= "#{ApplicationController.root_context}/coding_rules#qprofile=#{@profile.key().toString()}|activation=true|languages=#{@profile.language()}|statuses=DEPRECATED" -%>"><%= @deprecated_active_rules -%></a>&nbsp;<%= message('quality_profiles.deprecated') %>
+            <%= message('quality_profiles.including') %>&nbsp;
+            <a href="<%= "#{ApplicationController.root_context}/coding_rules#qprofile=#{@profile.key().toString()}|activation=true|languages=#{@profile.language()}|statuses=DEPRECATED" -%>">
+                <%= @deprecated_active_rules -%>
+            </a>&nbsp;<%= message('quality_profiles.deprecated') %>
           </div>
         <% end %>
       </div>