diff options
Diffstat (limited to 'app/views/projects/list_documents.rhtml')
-rw-r--r-- | app/views/projects/list_documents.rhtml | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/app/views/projects/list_documents.rhtml b/app/views/projects/list_documents.rhtml new file mode 100644 index 000000000..e6cf2b828 --- /dev/null +++ b/app/views/projects/list_documents.rhtml @@ -0,0 +1,23 @@ +<h2><%=l(:label_document_plural)%></h2>
+
+<% if @documents.empty? %><p><i><%= l(:label_no_data) %></i></p><% end %>
+
+<% documents = @documents.group_by {|d| d.category } %>
+<% documents.each do |category, docs| %>
+<h3><%= category.name %></h3>
+<ul>
+<% docs.each do |d| %>
+ <li>
+ <b><%= link_to d.title, :controller => 'documents', :action => 'show', :id => d %></b>
+ <br />
+ <%= truncate d.description, 250 %><br />
+ <em><%= format_time(d.created_on) %></em><br />
+ </li> +
+<% end %>
+</ul>
+<% end %>
+
+<p>
+<%= link_to_if_authorized '» ' + l(:label_document_new), :controller => 'projects', :action => 'add_document', :id => @project %> +</p>
|