<div class="page-header">
  <h1>Delete submission?</h1>
</div>


<div class="row-fluid">
  <div class="span6">
    <% if @submission.reviews.empty? %>
      <p><%= button_to "Delete", @submission, :method => :delete, :class => 'btn btn-primary' %></p>
    <% else %>
      <div class="alert alert-error">
        Submission cannot be deleted because it has reviews.
      </div>
    <% end %>
  </div>
  <div class="span6">
    <%= render 'submission_info_box' %>
  </div>
</div>

<p><%= link_to :Cancel, @exercise %></p>

<div class="page-header">
  <h1>Delete submission?</h1>
</div>


<div class="row-fluid">
  <div class="span6">
    <% if @submission.reviews.empty? %>
      <p><%= button_to "Delete", submission_path(@submission), :method => :delete, :class => 'btn btn-primary' %></p>
    <% else %>
      <div class="alert alert-error">
        Submission cannot be deleted because it has reviews.
      </div>
    <% end %>
  </div>
  <div class="span6">
    <%= render 'submission_info_box' %>
  </div>
</div>

<p><%= link_to :Cancel, @exercise %></p>

Allow AplusSubmissions to be deleted
Allow AplusSubmissions to be deleted
