annotate app/views/my/blocks/_documents.rhtml @ 904:0a8317a50fa0
redmine-1.1
Close obsolete branch redmine-1.1
author |
Chris Cannam |
date |
Fri, 14 Jan 2011 12:53:21 +0000 |
parents |
513646585e45 |
children |
|
rev |
line source |
Chris@0
|
1 <h3><%=l(:label_document_plural)%></h3>
|
Chris@0
|
2
|
Chris@0
|
3 <% project_ids = @user.projects.select {|p| @user.allowed_to?(:view_documents, p)}.collect(&:id) %>
|
Chris@0
|
4 <%= render(:partial => 'documents/document',
|
Chris@0
|
5 :collection => Document.find(:all,
|
Chris@0
|
6 :limit => 10,
|
Chris@0
|
7 :order => "#{Document.table_name}.created_on DESC",
|
Chris@0
|
8 :conditions => "#{Document.table_name}.project_id in (#{project_ids.join(',')})",
|
Chris@0
|
9 :include => [:project])) unless project_ids.empty? %> |