]> source.dussan.org Git - sonarqube.git/commitdiff
improve the display of rules in profile console
authorsimonbrandhof <simon.brandhof@gmail.com>
Thu, 30 Sep 2010 13:51:24 +0000 (13:51 +0000)
committersimonbrandhof <simon.brandhof@gmail.com>
Thu, 30 Sep 2010 13:51:24 +0000 (13:51 +0000)
sonar-server/src/main/webapp/WEB-INF/app/views/rules_configuration/_rule.html.erb
sonar-server/src/main/webapp/WEB-INF/app/views/rules_configuration/_rule_param.html.erb
sonar-server/src/main/webapp/stylesheets/style.css

index c82f83d7dc9f9bbef484f08d88ee0d2f219608b3..b958ef981b9f0d11c1b3c63bbb02b1472cc25ca5 100644 (file)
@@ -28,8 +28,7 @@
   <br/>
   <div id="desc_<%= rule.id -%>" class="rule_desc" style="display:none">
     <%= rule.description %>
-    <% if rule.parameters.size>0 %>
-          <table >
+    <table style="margin: 10px 0">
               <% rule.parameters.each do |parameter|
                 active_parameter = active_rule.active_param_by_param_id(parameter.id) if active_rule
               %>
                     :locals => {:parameter => parameter, :active_parameter => active_parameter, :profile => profile, :active_rule => active_rule, :is_admin => is_admin } %>
                   </tbody>
               <% end %>
-          </table>
-      <% end %>
-      <br/><span>Key: <%= rule.plugin_rule_key -%></span>
+              <tr>
+                <td width="10%" nowrap class="left">Key: &nbsp;</td>
+                <td class="left"><%= rule.plugin_rule_key -%></td>
+              </tr>
+     </table>
       <% if is_admin %>
-        <br/>
         <% if rule.template? %>
-        <a href="<%= url_for :action => 'new', :id => profile.id, :rule_id => rule.id -%>">Create new rule from this template</a>
+        <%= button_to "Create new rule from this template", :action => 'new', :id => profile.id, :rule_id => rule.id %>
         <% end %>
         <% if rule.editable? %>
-        <a href="<%= url_for :action => 'edit', :id => profile.id, :rule_id => rule.id -%>">Edit rule</a>
+        <%= button_to "Edit rule", :action => 'edit', :id => profile.id, :rule_id => rule.id -%>
         <% end %>
       <% end %>
     </div>
index 0853d57e03b258d665828757198a78b5f2788fc4..9428a80b60a16ef902f31f6f26501a17a1a0e7d7 100644 (file)
@@ -10,8 +10,7 @@
 %>
 <tr>
     <td width="10%" nowrap class="left">
-          <%= image_tag 'bullet.png' %>
-          <%= parameter.name %>
+       <%= parameter.name %>: &nbsp;
     </td>
     <td width="90%" nowrap class="left">
         <%= 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},
index 93369b546f6d9d46b3c12cc49bae0ec3d038dd82..13e41bd95df33d15e48d6e9876dffa7cc0d0bbcd 100644 (file)
@@ -1237,7 +1237,7 @@ ul.bullet li {
 
 .rule_desc {
   color: #444;
-  padding: 2px 0 15px 0;
+  padding: 2px 0;
 }
 
 .rule_desc li {
@@ -1438,10 +1438,7 @@ table.data2 > thead > tr > th, table.data2 > tbody > tr > td {
   border-bottom: 1px solid #DDD;
   padding: 3px 5px;
   height: 20px;
-  vertical-align: middle;
-}
-table.data2 > tbody > tr > td {
-  vertical-align: middle;
+  vertical-align: top;
 }
 table.data2 > thead > tr > th {
   font-weight: bold;