Chris@909:

<%=l(:label_document_plural)%>

Chris@909: Chris@909: <% project_ids = @user.projects.select {|p| @user.allowed_to?(:view_documents, p)}.collect(&:id) %> Chris@909: <%= render(:partial => 'documents/document', Chris@909: :collection => Document.find(:all, Chris@909: :limit => 10, Chris@909: :order => "#{Document.table_name}.created_on DESC", Chris@909: :conditions => "#{Document.table_name}.project_id in (#{project_ids.join(',')})", Chris@909: :include => [:project])) unless project_ids.empty? %>