<%= link_to l(:label_document_new), new_project_document_path(@project), :class => 'icon icon-add', :onclick => 'showAndScrollTo("add-document", "document_title"); return false;' if User.current.allowed_to?(:add_documents, @project) %>

<%=l(:label_document_plural)%>

<% if @grouped.empty? %>

<%= l(:label_no_data) %>

<% end %> <% @grouped.keys.sort.__send__(@sort_by == 'date' ? :reverse_each : :each) do |group| %>

<%= group %>

<%= render :partial => 'documents/document', :collection => @grouped[group] %>
<% end %>
<% content_for :sidebar do %>

<%= l(:label_sort_by, '') %>

<% end %> <% html_title(l(:label_document_plural)) -%>