summaryrefslogtreecommitdiffstats
path: root/app/views/my/blocks/_documents.rhtml
blob: 5fa8c7980899008da56f749d1bb80a8d95c70b3c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<h3><%=l(:label_document_plural)%></h3>

<ul>
<% for document in Document.find :all,
                         :limit => 10,
                         :conditions => "documents.project_id in (#{@user.projects.collect{|m| m.id}.join(',')})",
                         :include => [:project] %>
	<li>
	<b><%= link_to document.title, :controller => 'documents', :action => 'show', :id => document %></b>
	<br />
	<%= truncate document.description, 150 %><br />
	<em><%= format_time(document.created_on) %></em><br />&nbsp;
	</li>
<% end unless @user.projects.empty? %>
</ul>