diff options
author | simonbrandhof <simon.brandhof@gmail.com> | 2011-04-27 23:00:43 +0200 |
---|---|---|
committer | simonbrandhof <simon.brandhof@gmail.com> | 2011-04-27 23:00:43 +0200 |
commit | de1c458b45c0faeed864d91988a8a64c80d9aa43 (patch) | |
tree | 93220133f526ea32a7db2be2cbb7018f02110135 | |
parent | 35a60ed7d1462d51baba0e947cf9049851f15f21 (diff) | |
download | sonarqube-de1c458b45c0faeed864d91988a8a64c80d9aa43.tar.gz sonarqube-de1c458b45c0faeed864d91988a8a64c80d9aa43.zip |
Add header to comparison of quality profiles
4 files changed, 130 insertions, 118 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/profiles/_diff_rule.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/profiles/_diff_rule.html.erb index 9b7acaec2d7..dfa7b21c653 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/profiles/_diff_rule.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/profiles/_diff_rule.html.erb @@ -1,3 +1,3 @@ <%= image_tag "priority/#{arule.priority}.png" %> -<span class="rulename"><a onclick="window.open(this.href,'rule','height=700,width=500,scrollbars=1,resizable=1');return false;" href="<%= url_for :controller => 'rules', :action => 'show', :id => arule.rule.key, :layout => 'false' -%>"><%= h(arule.rule.name) -%></a></span> <em><%= h(arule.rule.plugin_name) -%></em>
\ No newline at end of file +<span class="rulename"><a onclick="window.open(this.href,'rule','height=700,width=500,scrollbars=1,resizable=1');return false;" href="<%= url_for :controller => 'rules', :action => 'show', :id => arule.rule.key, :layout => 'false' -%>"><%= h(arule.rule.name) -%></a></span> <span class="note"><%= h(arule.rule.plugin_name) -%></span>
\ No newline at end of file diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/profiles/compare.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/profiles/compare.html.erb index 8b3957a1e8e..d9db7e9648c 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/profiles/compare.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/profiles/compare.html.erb @@ -1,4 +1,5 @@ -<h1 class="marginbottom10"><%= link_to 'Quality profiles', :controller => 'profiles', :action => 'index' -%> / Compare</h1> +<h1 class="marginbottom10"><%= link_to 'Quality profiles', :controller => 'profiles', :action => 'index' -%> / + Compare</h1> <form method="GET" class="marginbottom10"> <select name="id1" class="small"> @@ -12,125 +13,135 @@ </select> <input type="submit" value="Compare" class="small" id="submit-compare"/> <% if @profile1 && @profile2 %> - <a href="<%= url_for :action => 'compare', :id1 => @profile2.id, :id2 => @profile1.id -%>" id="switch" title="Switch left and right view"><%= image_tag 'switch.png'-%></a> + <a href="<%= url_for :action => 'compare', :id1 => @profile2.id, :id2 => @profile1.id -%>" id="switch" title="Switch left and right view"><%= image_tag 'switch.png' -%></a> <% end %> </form> <% if @profile1 && @profile2 %> -<table class="width100 marginbottom10" id="profile_diff_table"> -<tbody> + <table class="header1"> + <tr> + <td width="25%"> + <p>Only in <%= h(@profile1.name) -%></p> + <span class="big"><a href="#in1"><%= @in1.size -%></a></span> rules + </td> + <td width="25%"> + <p>Only in <%= h(@profile2.name) -%></p> + <span class="big"><a href="#in2"><%= @in2.size -%></a></span> rules + </td> + <td width="25%"> + <p>With different configuration</p> + <span class="big"><a href="#modified"><%= @modified.size -%></a></span> rules + </td> + <td width="25%"> + <p>With same configuration</p> + <span class="big"><%= @sames.size -%></span> rules + </td> + </tr> + </table> -<% unless @in1.empty? %> - <tr> - <td width="49%"> - <table class="data width100 marginbottom10" id="in1-rules"> - <thead> - <tr> - <th><%= @in1.size -%> rules only in <a href="<%= url_for :controller => 'rules_configuration', :action => 'index', :id => @profile1.id -%>"><%= h @profile1.name %></a></th> - </tr> - </thead> - <% @in1.each do |diff| %> - <tr id="rule_<%= u(diff.rule.key) -%>"> - <td class="<%= cycle('even','odd', :name => 'in1')-%>"> - <%= render :partial => 'diff_rule', :locals => {:arule => diff.arule1} %> - </td> - </tr> - <% end %> - </table> - </td> - <td width="2%"> </td> - <td width="49%"> </td> - </tr> -<% end %> + <table class="width100 marginbottom10" id="profile_diff_table"> + <tbody> -<% unless @in2.empty? %> - <tr> - <td width="49%"></td> - <td width="2%"> </td> - <td width="49%"> - <table class="data width100 marginbottom10" id="in2-rules"> - <thead> - <tr> - <th><%= @in2.size -%> rules only in <a href="<%= url_for :controller => 'rules_configuration', :action => 'index', :id => @profile2.id -%>"><%= h @profile2.name %></a></th> - </tr> - </thead> - <% @in2.each do |diff| %> - <tr id="rule_<%= u(diff.rule.key) -%>"> - <td class="<%= cycle('even','odd', :name => 'in2')-%>"> - <%= render :partial => 'diff_rule', :locals => {:arule => diff.arule2} %> - </td> - </tr> - <% end %> - </table> - </td> - </tr> -<% end %> + <% unless @in1.empty? %> + <tr> + <td width="49%"> + <table class="data width100 marginbottom10" id="in1-rules"> + <thead> + <tr> + <th><a name="in1"/><%= @in1.size -%> rules only in + <a href="<%= url_for :controller => 'rules_configuration', :action => 'index', :id => @profile1.id -%>"><%= h @profile1.name %></a> + </th> + </tr> + </thead> + <% @in1.each do |diff| %> + <tr id="rule_<%= u(diff.rule.key) -%>"> + <td class="<%= cycle('even', 'odd', :name => 'in1') -%>"> + <%= render :partial => 'diff_rule', :locals => {:arule => diff.arule1} %> + </td> + </tr> + <% end %> + </table> + </td> + <td width="2%"></td> + <td width="49%"></td> + </tr> + <% end %> + <% unless @in2.empty? %> + <tr> + <td width="49%"></td> + <td width="2%"></td> + <td width="49%"> + <table class="data width100 marginbottom10" id="in2-rules"> + <thead> + <tr> + <th><a name="in2"/><%= @in2.size -%> rules only in + <a href="<%= url_for :controller => 'rules_configuration', :action => 'index', :id => @profile2.id -%>"><%= h @profile2.name %></a> + </th> + </tr> + </thead> + <% @in2.each do |diff| %> + <tr id="rule_<%= u(diff.rule.key) -%>"> + <td class="<%= cycle('even', 'odd', :name => 'in2') -%>"> + <%= render :partial => 'diff_rule', :locals => {:arule => diff.arule2} %> + </td> + </tr> + <% end %> + </table> + </td> + </tr> + <% end %> -<% unless @modified.empty? %> -<tr> - <td colspan="3"> - <table class="data width100 marginbottom10" id="modified-rules"> - <thead> - <tr> - <th width="49%"><%= @modified.size -%> rules have a different configuration<br/> - <a href="<%= url_for :controller => 'rules_configuration', :action => 'index', :id => @profile1.id -%>"><%= h @profile1.name %></a> - </th> - <th width="2%"></th> - <th width="49%"><br/><a href="<%= url_for :controller => 'rules_configuration', :action => 'index', :id => @profile2.id -%>"><%= h @profile2.name %></a></th> - </tr> - </thead> - <% @modified.each do |diff| - td_css=cycle('even','odd', :name => 'modified') - %> - <tr id="rule_<%= u(diff.rule.key) -%>"> - <td class="<%= td_css -%>" width="49%"> - <%= render :partial => 'diff_rule', :locals => {:arule => diff.arule1} %> - <% if diff.removed_params && !diff.removed_params.empty? %> - <ul> - <% diff.removed_params.each do |parameter| %> - <li><%= h(parameter.name) -%>: <span class="diffParam"><%= parameter.value.gsub(',', ', ') -%></span></li> - <% end %> - </ul> - <% end %> - </td> - <td width="2%" class="<%= td_css -%>"> </td> - <td class="<%= td_css -%>" width="49%"> - <%= render :partial => 'diff_rule', :locals => {:arule => diff.arule2} %> - <% if diff.added_params && !diff.added_params.empty? %> - <ul> - <% diff.added_params.each do |parameter| %> - <li><%= h(parameter.name) -%>: <span class="diffParam"><%= parameter.value.gsub(',', ', ') -%></span></li> - <% end %> - </ul> - <% end %> - </td> - </tr> - <% end %> - </table> - </td> - </tr> -<% end %> -<% unless @sames.empty? %> -<tr> - <td colspan="3"> - <table class="data width100 marginbottom10"> - <thead> - <tr> - <th><%= @sames.size -%> rules have the same configuration</th> - </tr> - </thead> - <tbody> - <tr> - <td class="even">Not displayed</td> - </tr> - </tbody> - </table> - </td> - </tr> -<% end %> -</tbody> -</table> + <% unless @modified.empty? %> + <tr> + <td colspan="3"> + <table class="data width100 marginbottom10" id="modified-rules"> + <thead> + <tr> + <th width="49%"><a name="modified"/><%= @modified.size -%> rules have a different configuration<br/> + <a href="<%= url_for :controller => 'rules_configuration', :action => 'index', :id => @profile1.id -%>"><%= h @profile1.name %></a> + </th> + <th width="2%"></th> + <th width="49%"> + <br/><a href="<%= url_for :controller => 'rules_configuration', :action => 'index', :id => @profile2.id -%>"><%= h @profile2.name %></a> + </th> + </tr> + </thead> + <% @modified.each do |diff| + td_css=cycle('even', 'odd', :name => 'modified') + %> + <tr id="rule_<%= u(diff.rule.key) -%>"> + <td class="<%= td_css -%>" width="49%"> + <%= render :partial => 'diff_rule', :locals => {:arule => diff.arule1} %> + <% if diff.removed_params && !diff.removed_params.empty? %> + <ul> + <% diff.removed_params.each do |parameter| %> + <li><%= h(parameter.name) -%>: + <span class="diffParam"><%= parameter.value.gsub(',', ', ') -%></span></li> + <% end %> + </ul> + <% end %> + </td> + <td width="2%" class="<%= td_css -%>"></td> + <td class="<%= td_css -%>" width="49%"> + <%= render :partial => 'diff_rule', :locals => {:arule => diff.arule2} %> + <% if diff.added_params && !diff.added_params.empty? %> + <ul> + <% diff.added_params.each do |parameter| %> + <li><%= h(parameter.name) -%>: + <span class="diffParam"><%= parameter.value.gsub(',', ', ') -%></span></li> + <% end %> + </ul> + <% end %> + </td> + </tr> + <% end %> + </table> + </td> + </tr> + <% end %> + </tbody> + </table> <% end %>
\ No newline at end of file diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/index.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/index.html.erb index 7926a401119..ca4b8de4763 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/index.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/index.html.erb @@ -19,7 +19,7 @@ <div id="reviews-search"> <h1>Reviews</h1> <% form_tag({:action => 'index'}, {:method => 'get'}) do %> - <table id="reviews-form" class="searchFilterBox"> + <table id="reviews-form" class="header1"> <thead> <tr> <th colspan="6"></th> diff --git a/sonar-server/src/main/webapp/stylesheets/style.css b/sonar-server/src/main/webapp/stylesheets/style.css index d1d5b596431..e209d06550d 100644 --- a/sonar-server/src/main/webapp/stylesheets/style.css +++ b/sonar-server/src/main/webapp/stylesheets/style.css @@ -1090,7 +1090,7 @@ div.discussionComment li { vertical-align: top; text-align: left; min-width: 60px; - padding: 0 7px 7px 0; + padding: 0 10px 7px 0; } .big { @@ -1104,14 +1104,15 @@ div.discussionComment li { padding: 10px; } -.searchFilterBox { +table.header1 { background-color: #ECECEC; color: #444; border: 1px solid #DDD; margin: 0 0 10px 0; + width: 100%; } -.searchFilterBox td { - padding: 10px; +table.header1 td { + padding: 10px 0 10px 10px; text-align: left; vertical-align: top; } |