list_documents.rhtml
12 lines
| 525 B
| text/html+ruby
|
RhtmlLexer
|
r90 | <div class="contextual"> | |
|
r154 | <%= link_to_if_authorized l(:label_document_new), {:controller => 'projects', :action => 'add_document', :id => @project}, :class => 'icon icon-add' %> | |
|
r90 | </div> | |
|
r12 | <h2><%=l(:label_document_plural)%></h2> | |
|
r2 | ||
|
r20 | <% if @documents.empty? %><p><i><%= l(:label_no_data) %></i></p><% end %> | |
|
r2 | <% documents = @documents.group_by {|d| d.category } %> | |
<% documents.each do |category, docs| %> | |||
|
r96 | <h3><%= category.name %></h3> | |
<%= render :partial => 'documents/document', :collection => docs %> | |||
|
r90 | <% end %> |