summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@sonarsource.com>2014-06-27 09:43:59 +0200
committerJulien Lancelot <julien.lancelot@sonarsource.com>2014-06-27 09:43:59 +0200
commit29aa9a7835286030f5480c855772ac535ba0e884 (patch)
tree16ac1a216356871bfc2e17df22b82cd3b043dfe2
parent753506782189f9917f5836632c3a6f89450f56a5 (diff)
downloadsonarqube-29aa9a7835286030f5480c855772ac535ba0e884.tar.gz
sonarqube-29aa9a7835286030f5480c855772ac535ba0e884.zip
SONAR-5149 Add a link on the number of rules to directly go to the Coding Rules page
-rw-r--r--sonar-core/src/main/resources/org/sonar/l10n/core.properties2
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/profiles/index.html.erb12
2 files changed, 12 insertions, 2 deletions
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 93e5f0f0b79..ee234b23f74 100644
--- a/sonar-core/src/main/resources/org/sonar/l10n/core.properties
+++ b/sonar-core/src/main/resources/org/sonar/l10n/core.properties
@@ -1617,7 +1617,9 @@ quality_profiles.restore_built_in_profiles_confirmation=Are you sure you want to
quality_profiles.including=including
quality_profiles.deprecated=deprecated
quality_profiles.manage_rules_tooltip=Manage rules of this profile
+quality_profiles.manage_rules_tooltip_x_profile=Manage rules of profile '{0}'
quality_profiles.see_rules_tooltip=See rules of this profile
+quality_profiles.see_rules_tooltip_x_profile=See rules of profile '{0}'
quality_profiles.severity_set_to_x=Severity set to {0}<b>{1}</b>
quality_profiles.changelog_from=Changelog from
quality_profiles.changelog.empty=No changes have been done.
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/profiles/index.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/profiles/index.html.erb
index b1c97367d3b..5770af503fe 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/profiles/index.html.erb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/profiles/index.html.erb
@@ -54,16 +54,24 @@
projects_count = projects_count(profile)
is_default_profile = default_profile && default_profile==profile.key()
%>
- <tr class="<%= cycle 'even', 'odd', :name => language.getKey() -%>" id="<%= u profile.key() %>">
+ <tr class="<%= cycle 'even', 'odd', :name => language.getKey() -%> hoverable" id="<%= u profile.key() %>">
<td width="40%">
<a href="<%= url_for :controller => 'profiles', :action => 'show', :key => profile.key() -%>"
id="rules-<%= profile.key() -%>"><%= h profile.name() -%></a>
</td>
<td align="right" width="10%">
- <span id="activated_rules_<%= u profile.key() -%>">
+ <%
+ rules_tooltip = message('quality_profiles.see_rules_tooltip_x_profile', :params => [profile.name()])
+ rules_tooltip = message('quality_profiles.manage_rules_tooltip_x_profile', :params => [profile.name()]) if profiles_administrator?
+ %>
+ <a class="widget-link"
+ href="<%= "#{ApplicationController.root_context}/coding_rules#qprofile=#{profile.key()}|activation=true|languages=#{profile.language()}" -%>"
+ title="<%= rules_tooltip %>">
+ <span id="activated_rules_<%= u profile.key() -%>">
<%= @active_rule_counts[profile.key()] || 0 -%>
</span>
+ </a>
</td>
<td align="right" width="10%" nowrap>