<%= image_tag 'card-headers/document-mini.webp' %>
<%= document.title || 'Untitled document' %>
by <%= link_to document.user.name, document.user %>
  • This document:
    • Originally created <%= time_ago_in_words document.created_at %> ago
    • Last edited <%= time_ago_in_words document.updated_at %> ago
  • This analysis:
    • Took <%= distance_of_time_in_words((analysis.completed_at - analysis.created_at).round(1)) %> to complete
    • Completed <%= time_ago_in_words analysis.completed_at %> ago
<%= link_to edit_document_path(document), class: "#{Document.text_color}" do %> <%= Document.icon %> Edit document <% end %>
<% if analysis.created_at < document.updated_at %>
Heads up! <%= document.name %> was edited after this analysis was run; depending on how much it has changed, this analysis may now be out of date. You can delete this analysis by <%= link_to 'clicking here', destroy_analysis_document_path(document) %>. You can then run another analysis on this document at any time.
<% end %>