summaryrefslogtreecommitdiffstats
path: root/app/views/my/blocks/_documents.rhtml
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/my/blocks/_documents.rhtml')
-rw-r--r--app/views/my/blocks/_documents.rhtml15
1 files changed, 15 insertions, 0 deletions
diff --git a/app/views/my/blocks/_documents.rhtml b/app/views/my/blocks/_documents.rhtml
new file mode 100644
index 000000000..5fa8c7980
--- /dev/null
+++ b/app/views/my/blocks/_documents.rhtml
@@ -0,0 +1,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> \ No newline at end of file