<div class="verification-stage" py:if="stage == 'verification'">
  <?python from algobowl.model import VerificationStatus ?>
  <h1>Verification</h1>
  <p class="lead">
    Download each output for your input and use your verification program
    to determine if the solution is valid.
  </p>
  <py:if test="group.input is not None">
    <p>
      Note that a solution can be valid even if it is not
      optimal. Please read the problem statement carefully for a
      specification on the validity of outputs.
    </p>
    <p>
      For reference, <a href="${group.input.url}" download="${group.input.filename}">here</a>
      is the input that your group uploaded and you should verify against.
    </p>
    <a class="btn btn-primary"
       href="${tg.url('/group/{}/verification_outputs.zip'.format(group.id))}">
      <i class="fas fa-file-archive fa-fw fa-lg"></i>
      Download Outputs as a ZIP Archive
    </a>
    <noscript>
      <div class="alert alert-warning">
        <strong>Warning:</strong> This page may not work fully without JavaScript
        enabled for this domain.
      </div>
    </noscript>
    <table class="table table-striped mt-3">
      <thead>
        <tr>
          <th>Output</th>
          <th>Accept/Reject</th>
        </tr>
      </thead>
      <tbody>
        <tr py:for="output in group.input.outputs">
          <td>
            <a href="${output.url}" download="${output.filename}">
              <tt py:content="output.filename" />
            </a>
          </td>
          <td id="verification-column-${output.id}">
            <div class="btn-group">
              <button class="btn btn-success submit-verif"
                      id="accepted-button-${output.id}"
                      py:attrs="{'disabled': 'disabled'} if output.verification is VerificationStatus.accepted else {}"
                      data-status="accepted"
                      data-output="${output.id}">
                <i class="fas fa-check fa-fw"></i>
              </button>
              <button class="btn btn-danger submit-verif"
                      id="rejected-button-${output.id}"
                      py:attrs="{'disabled': 'disabled'} if output.verification is VerificationStatus.rejected else {}"
                      data-status="rejected"
                      data-output="${output.id}">
                <i class="fas fa-times fa-fw"></i>
              </button>
            </div>
          </td>
        </tr>
      </tbody>
    </table>
    <script type="text/javascript" src="${tg.url('/assets/js/verification.js')}"></script>
  </py:if><py:else>
    <div class="alert alert-danger">
      Your group did not upload an input by the deadline, and will be unable
      to participate in the verification portion of this competition without
      an input.
    </div>
  </py:else>
</div>
