indentlabs/notebook

View on GitHub
app/views/documents/analysis.html.erb

Summary

Maintainability
Test Coverage
<% if @analysis.present? %>
  <% if @analysis.complete? %>
    <%= render partial: 'documents/analysis/display',    locals: { document: @document, analysis: @analysis } %>

    <div class="card-panel <%= Document.color %> lighten-3 black-text">
      <%= link_to 'Leave feedback', 'https://docs.google.com/forms/d/e/1FAIpQLScjWJfW2p9LoGfKe9uEn4xWvve-AhX3QtY7hqm7BCyyK0HdRA/viewform?usp=sf_link', class: 'btn white black-text right', target: '_new' %>
      Document analysis is a new feature to Notebook.ai and uses your feedback to improve.
    </div>
  <% else %>
    <%= render partial: 'documents/analysis/processing', locals: { document: @document, analysis: @analysis } %>
  <% end %>
<% else %>
  <%= render partial: 'documents/analysis/no_analysis',  locals: { document: @document } %>
<% end %>