<% if submissions.any? %>
  <h2>Needs Nitpicking</h2>

  <div class="label">Quick-Filters</div>
  <div id="submission-filters">
    <label class="checkbox">
      <input type="checkbox" data-action="set-filter" data-filter="nits" data-selected="All" id="submission-filter-nits" class="submission-filter-check" />
      Submissions without nits
    </label>

    <label class="checkbox">
      <input type="checkbox" data-action="set-filter" data-filter="arguments" data-selected="All" id="submission-filter-arguments" class="submission-filter-check" />
      Submissions without discussion threads
    </label>
  </div>
  <hr/>

  <div class="pending-submissions">
    <% submissions.flagged_for_approval.each do |submission| %>
      <%= erb :pending_submission, locals: { submission: submission } %>
    <% end %>

    <% submissions.never_been_nitted.each do |submission| %>
      <%= erb :pending_submission, locals: { submission: submission } %>
    <% end %>

      <% submissions.nits_before_but_not_on_this_iteration.each do |submission| %>
        <%= erb :pending_submission, locals: { submission: submission } %>
      <% end %>

    <% if exercise %>
      <% submissions.with_nits.each do |submission| %>
        <%= erb :pending_submission, locals: { submission: submission } %>
      <% end %>
    <% end %>

  </div>
<% end %>

<% if submissions.any? %>
  <h2>Needs Nitpicking</h2>

  <% if exercise %>
  <div id="submission-filters">
    <div class="label">Quick-Filters</div>
    <label class="checkbox">
      <input type="checkbox" data-action="set-filter" data-filter="nits" data-selected="All" id="submission-filter-nits" class="submission-filter-check" />
      Submissions without nits
    </label>

    <label class="checkbox">
      <input type="checkbox" data-action="set-filter" data-filter="arguments" data-selected="All" id="submission-filter-arguments" class="submission-filter-check" />
      Submissions without discussion threads
    </label>
  </div>
  <% end %>
  <hr/>

  <div class="pending-submissions">
    <% submissions.flagged_for_approval.each do |submission| %>
      <%= erb :pending_submission, locals: { submission: submission } %>
    <% end %>

    <% submissions.never_been_nitted.each do |submission| %>
      <%= erb :pending_submission, locals: { submission: submission } %>
    <% end %>

      <% submissions.nits_before_but_not_on_this_iteration.each do |submission| %>
        <%= erb :pending_submission, locals: { submission: submission } %>
      <% end %>

    <% if exercise %>
      <% submissions.with_nits.each do |submission| %>
        <%= erb :pending_submission, locals: { submission: submission } %>
      <% end %>
    <% end %>

  </div>
<% end %>

Hide filters on featured tab
Hide filters on featured tab
