<%= link_to new_document_path, class: "btn btn-success pull-right", data: {turbolinks: false} do %> New Document <% end %>
<%= form_tag controller_name, method: :get, id: 'limit_form' do %>
Show <%= select_tag :limit, options_for_select([5, 10, 15, 20], selected: params[:limit] || 10), onchange: "$('#limit_form').submit();" %> documents per page
<% end %>
<% documents.each_with_index do |document, idx| %> <% end %>
# <%= sortable "filename", "File Name"%> <%= sortable "content_type", "Extension"%> <%= sortable "created_at", "Date"%> Download Delete
<%= idx + 1 %> <%= link_to document.filename, document, method: :get %> <%= document.content_type %> <%= document.created_at.strftime('%Y/%m/%d %H:%M') %> <%= link_to document, method: :get, class: 'btn btn-primary' do %><% end %> <%= link_to document, method: :delete, class: 'btn btn-danger', data: { confirm: 'Are you sure?' } do %> <% end %>
<%= paginate documents, theme: 'twitter-bootstrap-3' %>