2007-03-12 20:59:02 +03:00
|
|
|
<div class="contextual">
|
|
|
|
<%= link_to_if_authorized l(:label_document_new), {:controller => 'projects', :action => 'add_document', :id => @project}, :class => 'icon icon-add' %>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<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>
|
|
|
|
<%= render :partial => 'documents/document', :collection => docs %>
|
2006-12-16 15:15:31 +03:00
|
|
|
<% end %>
|