From b22c2f7ec2c79d8f962e0b39f216124f336de475 Mon Sep 17 00:00:00 2001 From: simonbrandhof Date: Fri, 18 Mar 2011 19:01:25 +0100 Subject: [PATCH] Improve rendering of violations --- .../webapp/WEB-INF/app/views/resource/index.html.erb | 2 ++ sonar-server/src/main/webapp/stylesheets/style.css | 10 +++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/resource/index.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/index.html.erb index 0500fc1c5c8..e4f575a928d 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/resource/index.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/index.html.erb @@ -97,9 +97,11 @@
<%= line.source -%>
<% if @display_violations && line.violations? %> +
<% line.violations.each do |violation| %> <%= render :partial => 'violation', :locals => {:violation => violation} -%> <% end %> +
<% end %> diff --git a/sonar-server/src/main/webapp/stylesheets/style.css b/sonar-server/src/main/webapp/stylesheets/style.css index 2e666eebf99..9698968edec 100644 --- a/sonar-server/src/main/webapp/stylesheets/style.css +++ b/sonar-server/src/main/webapp/stylesheets/style.css @@ -650,11 +650,15 @@ ul.operations li a { .sources2 span.author, .sources2 span.author a { font-size: 85%; } +.sources2 div.violations { + background-color: #EFEFEF; + margin: 2px; + border: 1px solid #DDD; +} .sources2 div.violation { - padding: 3px 0.5em; - border: 1px solid #DDDDDD; background-color: #EFEFEF; - margin: 5px 10px; + margin: 0; + padding: 3px 5px; } span.rulename, span.rulename a { color: #4183C4; -- 2.39.5