<p id="main" tabindex="-1" class="sr-only">Main Content</p>
<header class="content">
  <%= render partial: 'content/edit_details', locals: {content: @content} %>
</header>

<section class="table-of-contents">
  <h5>
    <% if @section.present? %>
      <%= t 'content.show.section-contents' %>
    <% end %>
  </h5>
  <% if @content.contents.any? %>
    <%= render partial: 'content/table_of_contents/edit', collection: @content.tree, cached: true %>
  <% else %>
    <div class="listing empty">
    <% if @editable %>
      <% if @section.present? %>
        <%= t 'content.edit.empty-section.html', add_resource_button: link_to(t('content.edit.empty-section.add-button'), new_section_path(@casebook, parent: @section.id), class: 'add-resource') %>
      <% else %>
        <%= t 'content.edit.empty-casebook.html', add_section_button: button_to(t('content.edit.empty-casebook.add-button'), sections_path(@casebook), method: :post, class: 'add-section') %>
      <% end %>
    <% else %>
      <% if @section.present? %>
        <%= t 'content.show.empty-section' %>
      <% else %>
        <%= t 'content.show.empty-casebook' %>
      <% end %>
    <% end %>
  <% end %>
</section>

<p id="main" tabindex="-1" class="sr-only">Main Content</p>
<header class="content">
  <%= render partial: 'content/edit_details', locals: {content: @content} %>
</header>

<section class="table-of-contents">
  <h5>
    <% if @section.present? %>
      <%= t 'content.show.section-contents' %>
    <% end %>
  </h5>
  <% if @content.contents.any? %>
    <%= render partial: 'content/table_of_contents/edit', collection: @content.tree %>
  <% else %>
    <div class="listing empty">
    <% if @editable %>
      <% if @section.present? %>
        <%= t 'content.edit.empty-section.html', add_resource_button: link_to(t('content.edit.empty-section.add-button'), new_section_path(@casebook, parent: @section.id), class: 'add-resource') %>
      <% else %>
        <%= t 'content.edit.empty-casebook.html', add_section_button: button_to(t('content.edit.empty-casebook.add-button'), sections_path(@casebook), method: :post, class: 'add-section') %>
      <% end %>
    <% else %>
      <% if @section.present? %>
        <%= t 'content.show.empty-section' %>
      <% else %>
        <%= t 'content.show.empty-casebook' %>
      <% end %>
    <% end %>
  <% end %>
</section>

Revert "Cache table of content edit views."
Revert "Cache table of content edit views."

This reverts commit d4d56fa4387f0d2205fd0f17a39c5a6a9a6c3170.
