% content_for :title, 'Documents' %> <% content_for :header_left do %> <%= content_tag :h1, 'Documents' %> <% end %> <% content_for :header_right do %> <%= admin_new_button Document %> <% end %> <%= render partial: 'admin/shared/header' %> <%= content_tag :div, class: 'w-100' do %> <% if @documents.any? %>
ID | Name | Category | Filename | Date Uploaded | Status | |
---|---|---|---|---|---|---|
<%= document.id %> | <%= document.name %> | <%= document.document_category.name %> | <%= document.file.filename %> | <%= document.created_at.strftime('%F %T') %> | <%= document.discarded? ? 'Inactive' : 'Active' %> | <%= admin_edit_button document if document.undiscarded? %> <%= admin_deactivate_button document if document.undiscarded? %> <%= admin_reactivate_button document if document.discarded? %> |
No documents found. <%= link_to 'Add one.', new_admin_document_path %>
<% end %> <% end %>