<%= render 'editions/header_with_navigation', edition: @edition, guide: @edition.guide %>
<div class="row">
  <%= render 'editions/old_edition_alert', edition: @edition, guide: @edition.guide %>
</div>

<div class="row">
  <div class="col-md-12">
    <%= form_for @edition.guide do |f| %>
      <%= render 'editions/actions', publish_controls_only: true, form: f, guide: @edition.guide, edition: @edition %>
    <% end %>
  </div>

  <div class="col-md-12">
    <h2>
      Compare changes
      <% if @edition.previously_published_edition %>
        <br/>
        <small>
          Changes between this draft and the previous version
        </small>
      <% end %>
    </h2>
  </div>

  <div class="compare-changes col-md-12">
    <% @edition_diff.changes.each do |field, change| %>
      <div class="row">
        <div class="col-md-8 <%= field %>">
          <label><%= change.field_name %></label>
          <pre><%= change.diff %></pre>
        </div>
      </div>
    <% end %>
  </div>

  <div class="col-md-12">
    <%= form_for @edition.guide do |f| %>
      <%= render 'editions/actions', publish_controls_only: true, form: f, guide: @edition.guide, edition: @edition %>
    <% end %>
  </div>
</div>

<%= render 'editions/header_with_navigation', edition: @edition, guide: @edition.guide %>
<div class="row">
  <%= render 'editions/old_edition_alert', edition: @edition, guide: @edition.guide %>
</div>

<div class="row">
  <div class="col-md-12">
    <%= guide_form_for @edition.guide do |f| %>
      <%= render 'editions/actions', publish_controls_only: true, form: f, guide: @edition.guide, edition: @edition %>
    <% end %>
  </div>

  <div class="col-md-12">
    <h2>
      Compare changes
      <% if @edition.previously_published_edition %>
        <br/>
        <small>
          Changes between this draft and the previous version
        </small>
      <% end %>
    </h2>
  </div>

  <div class="compare-changes col-md-12">
    <% @edition_diff.changes.each do |field, change| %>
      <div class="row">
        <div class="col-md-8 <%= field %>">
          <label><%= change.field_name %></label>
          <pre><%= change.diff %></pre>
        </div>
      </div>
    <% end %>
  </div>

  <div class="col-md-12">
    <%= guide_form_for @edition.guide do |f| %>
      <%= render 'editions/actions', publish_controls_only: true, form: f, guide: @edition.guide, edition: @edition %>
    <% end %>
  </div>
</div>

Fix broken compare page for communities
Fix broken compare page for communities
