%# Usage: render partial: 'content/list/document_table', locals: { content_list: @documents, content_type: Document, folders: @folders.pluck(:title, :id), tags: PageTag.where(page_type: 'Document', page_id: @documents.pluck(:id)).to_a } %> <% if content_list.any? %>
Title | Length | Last edited | ||
---|---|---|---|---|
<%= Document.icon %> |
<% if user_signed_in? && document.user == current_user %>
<%= document.favorite? ? 'star' : 'star_border' %>
<% else %>
folder_shared
<% end %>
<%= document.title %>
<% if document.folder_id %>
in <%= document.folder.title %>
<% end %>
<%= User.icon %>
by <%= document.user.display_name %>
<% if document.universe %>
<%= Universe.icon %>
in <%= document.universe.try(:name) || 'Unknown universe' %>
<% end %>
<% if document.respond_to?(:page_tags) %>
<% page_tags = document.page_tags %>
<% if page_tags.any? %>
<% end %>
<% end %>
|
spellcheck
<%= number_with_delimiter document.word_count %>
<%= 'word'.pluralize(document.word_count) %>
timer
<%= document.reading_estimate %>
|
"> <%# document.updated_at == document.created_at ? 'created' : 'updated' %> <%= time_ago_in_words document.updated_at %> ago |
<%= link_to 'View', document_path(document), class: "btn btn-flat blue-text" %>
<%= link_to 'Edit', edit_document_path(document), class: "btn btn-flat green-text", target: '_new' %>
|
You can create an unlimited number of documents with no limits on length. Enjoy!