]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-7529 Empty block is displayed in the administration sidebar
authorStas Vilchik <vilchiks@gmail.com>
Thu, 14 Apr 2016 09:42:35 +0000 (11:42 +0200)
committerStas Vilchik <vilchiks@gmail.com>
Thu, 14 Apr 2016 09:57:06 +0000 (11:57 +0200)
server/sonar-web/src/main/webapp/WEB-INF/app/views/settings/_settings.html.erb

index 422c00f9048538f85d295249247a73c997def2ef..8ae1f0c2c7aae6e8ac885b641fbceff98264ceae 100644 (file)
           </thead>
           <tbody>
           <% @categories.each do |category| -%>
-            <tr id="select_<%= category.key -%>" class="select <%= cycle('even', 'odd', :name => 'category') -%> <%= 'selected' if @category.key==category.key -%>">
-              <td class="category">
-                <% if @resource %>
-                  <a href="<%= url_for(:controller => 'project', :action => 'settings') -%>?id=<%= url_encode(@resource.key) -%>&category=<%= url_encode(category.key) -%>"><%= h category_name(category) -%></a>
-                <% else %>
-                  <%= link_to category_name(category), :category => category.key -%>
-                <% end %>
-              </td>
-            </tr>
+            <% if !category.key.blank?-%>
+              <tr id="select_<%= category.key -%>" class="select <%= cycle('even', 'odd', :name => 'category') -%> <%= 'selected' if @category.key==category.key -%>">
+                <td class="category">
+                  <% if @resource %>
+                    <a href="<%= url_for(:controller => 'project', :action => 'settings') -%>?id=<%= url_encode(@resource.key) -%>&category=<%= url_encode(category.key) -%>"><%= h category_name(category) -%></a>
+                  <% else %>
+                    <%= link_to category_name(category), :category => category.key -%>
+                  <% end %>
+                </td>
+              </tr>
+            <% end -%>
           <% end -%>
           </tbody>
         </table>