2006-07-29 23:54:22 +04:00
|
|
|
<h2><%=l(:label_document_plural)%></h2>
|
2006-06-28 22:11:03 +04:00
|
|
|
|
2006-09-03 14:25:21 +04:00
|
|
|
<% if @documents.empty? %><p><i><%= l(:label_no_data) %></i></p><% end %>
|
|
|
|
|
2006-06-28 22:11:03 +04:00
|
|
|
<% 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 />
|
2006-12-01 01:00:35 +03:00
|
|
|
<%= truncate d.description, 250 %><br />
|
2006-12-01 01:17:44 +03:00
|
|
|
<em><%= format_time(d.created_on) %></em><br />
|
2006-06-28 22:11:03 +04:00
|
|
|
</li>
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
</ul>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<p>
|
2006-07-29 23:54:22 +04:00
|
|
|
<%= link_to_if_authorized '» ' + l(:label_document_new), :controller => 'projects', :action => 'add_document', :id => @project %>
|
2006-06-28 22:11:03 +04:00
|
|
|
</p>
|