From f185818faa11af412a75e33bf844bd3f21929e03 Mon Sep 17 00:00:00 2001 From: Fabrice Bellingard Date: Thu, 26 Jan 2012 10:48:05 +0100 Subject: [PATCH] SONAR-2124 Fix some issues --- .../views/rules_configuration/_active_rule_note.html.erb | 2 +- .../WEB-INF/app/views/rules_configuration/_rule.html.erb | 2 +- .../app/views/rules_configuration/_rule_param.html.erb | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/rules_configuration/_active_rule_note.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/rules_configuration/_active_rule_note.html.erb index cc1280f30c4..abb7ffb3795 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/rules_configuration/_active_rule_note.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/rules_configuration/_active_rule_note.html.erb @@ -29,7 +29,7 @@ <% end %>

<%= note.html_text -%>

- <% elsif is_admin %> + <% elsif is_admin && !active_rule.rules_profile.provided? %> <% end %> diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/rules_configuration/_rule.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/rules_configuration/_rule.html.erb index a2e6f2b29f2..faa8602dd0c 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/rules_configuration/_rule.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/rules_configuration/_rule.html.erb @@ -74,7 +74,7 @@ %> <%= render :partial => 'rule_param', :object => nil, - :locals => {:parameter => parameter, :active_parameter => active_parameter, :profile => profile, + :locals => {:parameter => parameter, :active_parameter => active_parameter, :profile => profile, :rule => rule, :active_rule => active_rule, :ancestor_active_rule => ancestor_active_rule, :is_admin => is_admin } %> <% end %> diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/rules_configuration/_rule_param.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/rules_configuration/_rule_param.html.erb index 49a625cd712..c47005939de 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/rules_configuration/_rule_param.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/rules_configuration/_rule_param.html.erb @@ -14,9 +14,9 @@ <%= form_remote_tag :url => {:action => 'update_param', :id => active_param_id, :profile_id => profile.id, :param_id => parameter.id, :active_rule_id => active_rule_id}, - :update => "rule_#{active_rule.rule_id}", + :update => "rule_#{rule.id}", :loading => "$('param_loading_#{parameter.id}').show();", - :complete => "$('desc_#{active_rule.rule_id}').show();" %> + :complete => "$('desc_#{rule.id}').show();" %> <% span_id = "text_#{parameter.id}" %> <% read_only = !active_rule || !enable_modification %> @@ -35,7 +35,7 @@ <% end %> <% - if active_rule.overrides? && ancestor_active_rule + if active_rule && active_rule.overrides? && ancestor_active_rule ancestor_param = ancestor_active_rule.active_param_by_param_id(parameter.id) ancestor_value = ancestor_param.value unless ancestor_param.value.blank? -- 2.39.5