<% content_for :title, @document.full_title %>
<%= render partial: "header" %>
<div class='manual-body'>
  <h2 class='section-title'><%= @document.title %></h2>
  <p class='summary'><%= @document.summary %></p>
  <% if @document.body.present? %>
    <div class='js-collapsible-collection subsection-collection' data-collapse-depth=<%= @document.collapse_depth %>>
      <div class='title-controls-wrap'>
      </div>
      <div class='collapsible-subsections'>
        <div class='govspeak'>
          <%= @document.body %>
        </div>
      </div>
    </div>
  <% end %>
  <% if @manual.hmrc? %>
    <div class='subsection-collection'>
      <% @document.section_groups.each do | group | %>
      <%= render 'hmrc_sections', :group => group %>
    <% end %>
    </div>
  <% end%>
</div>

<% content_for :title, @document.full_title %>
<%= render partial: "header" %>
<div class='manual-body'>
  <h2 class='section-title'><%= @document.title %></h2>
  <% if @document.summary %><p class='summary'><%= @document.summary %></p><% end %>
  <% if @manual.hmrc? %>
    <% if @document.body.present? %>
      <div class='body-content-wrapper'>
        <div class='govspeak'>
          <%= @document.body %>
        </div>
      </div>
    <% end %>
    <div class='subsection-collection'>
      <% @document.section_groups.each do | group | %>
      <%= render 'hmrc_sections', :group => group %>
    <% end %>
    </div>
  <% else %>
    <% if @document.body.present? %>
      <div class='js-collapsible-collection subsection-collection' data-collapse-depth=<%= @document.collapse_depth %>>
        <div class='title-controls-wrap'>
        </div>
        <div class='collapsible-subsections'>
          <div class='govspeak'>
            <%= @document.body %>
          </div>
        </div>
      </div>
    <% end %>
  <% end %>

</div>

Fix view logic for HMRC leaf nodes
Fix view logic for HMRC leaf nodes

As HMRC leaf nodes are now on the document.body, make sure they aren't accidentally made collapsible.
I'm not sure if it's possible for the HMRC API to give us a document with a `document.body` AND `document.section_groups` but it seems sensible to show them both if they're both there.

Non HMRC manuals should just have a `document.body` on their show action, but they don't need a don't need to be wrapped in a `.body-content-wrapper` class because their headings still need to be full width (as visually they are styled differently to hrmc's manuals)

Further work on this file (which I'm leaving here as a note for myself later) would be to remove:
`
<div class='title-controls-wrap'></div>
<div class='collapsible-subsections'>
`
and leave add the javascript to add in these elements as they are not needed unless the javascript is running.
