<% if local_assigns[:logo] %>
  <div class="logo">
    <%= render "contracts/logo", logo: logo %>
  </div>
  <hr>
<% end %>
<% if preview %>
  <h1>PREVIEW ONLY</h1>
<% end %>
<% if contract_template.body.present? %>
  <%= contract_template.body %>
  <br/>
<% end %>
<% if releasable.minor? && contract_template.guardian_clause.present? %>
  <p class="text-left"><strong>Guardian Clause</strong></p>
  <%= contract_template.guardian_clause %>
<% end %>
<div class="page">
  <%= render "contracts/signature_page", releasable: releasable, contract_template: contract_template, preview: preview %>
</div>
<% if releasable.class == AcquiredMediaRelease %>
  <div class="page">
    <%= render "contracts/files", release: releasable, preview: preview %>
  </div>
<% end %>
<% if releasable.try(:photos).present? %>
  <div class="page">
    <%= render "contracts/photos", release: releasable, preview: preview %>
  </div>
<% end %>

<% if releasable.notes.any? %>
  <div class="page">
    <%= render "contracts/notes", notable: releasable %>
  </div>
<% end %>
<% if releasable.tags.any? %>
  <div class="page">
    <%= render "contracts/tags", taggable: releasable %>
  </div>
<% end %>
