2006-12-16 15:15:31 +03:00
|
|
|
<div class="contextual">
|
|
|
|
<%= link_to_if_authorized l(:label_document_new), {:controller => 'projects', :action => 'add_document', :id => @project}, :class => 'pic picAdd' %>
|
|
|
|
</div>
|
|
|
|
|
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| %>
|
2006-12-17 11:10:18 +03:00
|
|
|
<h3><%= category.name %></h3>
|
|
|
|
<%= render :partial => 'documents/document', :collection => docs %>
|
2006-12-16 15:15:31 +03:00
|
|
|
<% end %>
|