<%
  attachments = AttachmentsPresenter.new(document)
  title = t('document.headings.attachments', count: attachments.length) unless local_assigns.include?(:title)
  published_on = '' unless local_assigns.include?(:published_on)
%>
<section class="heading-block attachment-full-width">
  <% if attachments.any? %>
    <h1><%= title %></h1>
    <div class="content">
      <article>
        <div class="govspeak">
          <% attachments.attachments.each do |attachment| %>
            <%= render partial: "documents/attachment",
                        object: attachment,
                        locals: { 
                          alternative_format_contact_email: document.alternative_format_contact_email,
                          published_on: published_on} %>
          <% end %>
        </div>
      </article>
    </div>
  <% else %>
    <p class="extra-description summary"><%= summary %></p>
  <% end %>
</section>

<%
  attachments = AttachmentsPresenter.new(document)
  title = t('document.headings.attachments', count: attachments.length) unless local_assigns.include?(:title)
  summary = document.summary unless local_assigns.include?(:summary)
  published_on = '' unless local_assigns.include?(:published_on)
%>
<section class="heading-block attachment-full-width">
  <% if attachments.any? %>
    <h1><%= title %></h1>
    <div class="content">
      <article>
        <div class="govspeak">
          <div class="first-attachment">
            <%= render partial: "documents/attachment",
                      object: attachments.first,
                      locals: { alternative_format_contact_email: document.alternative_format_contact_email,
                        extra_description: summary,
                        published_on: published_on } %>
          </div>
          <% if attachments.more_than_one? %>
            <div class="attachment-without-thumbnail">
              <% attachments.remaining.each do |attachment| %>
                <%= render partial: "documents/attachment",
                            object: attachment,
                            locals: { hide_thumbnail: false,
                                      alternative_format_contact_email: document.alternative_format_contact_email } %>
              <% end %>
            </div>
          <% end %>
        </div>
      </article>
    </div>
  <% else %>
    <p class="extra-description summary"><%= summary %></p>
  <% end %>
</section>

Revert "Remove unnecessary attachment divs"
Revert "Remove unnecessary attachment divs"

This reverts commit 1a21a4e4a33037cf7b4488ef10b12fc178df792b.

Conflicts:
	app/views/documents/_attachment_full_width.html.erb
