]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-4923 Do not display "Add Note" action on inactive rules
authorJulien Lancelot <julien.lancelot@sonarsource.com>
Thu, 16 Jan 2014 10:10:47 +0000 (11:10 +0100)
committerJulien Lancelot <julien.lancelot@sonarsource.com>
Thu, 16 Jan 2014 10:10:47 +0000 (11:10 +0100)
sonar-server/src/main/webapp/WEB-INF/app/views/rules_configuration/_rule.html.erb

index ba0a7f318477a3e96ffca974f87e827549b303f0..35e9051bb61a5b1caadd8c82c22644fa8cebd272 100644 (file)
       </table>
     <% end %>
 
-    <div id="active_rule_note_<%= rule.activeRuleId -%>">
-      <%= render :partial => 'active_rule_note', :locals => {:rule => rule} %>
-    </div>
+    <% if rule.activeRuleId %>
+      <div id="active_rule_note_<%= rule.activeRuleId -%>">
+        <%= render :partial => 'active_rule_note', :locals => {:rule => rule} %>
+      </div>
+    <% end %>
 
     <% if profiles_administrator? %>
       <% if rule.template? %>