]> source.dussan.org Git - sonarqube.git/commitdiff
Recent projects => fix regression (should not include LIBs)
authorFabrice Bellingard <fabrice.bellingard@sonarsource.com>
Fri, 21 Dec 2012 08:41:56 +0000 (09:41 +0100)
committerFabrice Bellingard <fabrice.bellingard@sonarsource.com>
Fri, 21 Dec 2012 08:41:56 +0000 (09:41 +0100)
sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_menu_projects.html.erb

index 01545026f4b0d5031bfde63142efd594a07cba94..8b4e7107476e1c5fc2cbf77b50c73abf5f134eae 100644 (file)
   }
   
   <% 
-     if @resource
-       # we keep only root resources in the "Recent Projects"
-       root_resource = @resource.root_project
+     if @resource && Project.root_qualifiers.include?(@resource.qualifier)
   %>
   else {
-    sonarRecentHistory.add('<%= root_resource.key -%>', 
-                           '<%= root_resource.name -%>', 
-                           '<%= Api::Utils.java_facade.getResourceType(root_resource.qualifier).getIconPath() -%>');
+    sonarRecentHistory.add('<%= @resource.key -%>', 
+                           '<%= @resource.name -%>', 
+                           '<%= Api::Utils.java_facade.getResourceType(@resource.qualifier).getIconPath() -%>');
   }
   <% end %>