@Html.Partial("admin/_header.cshtml")

<!-- ============================================================== -->
<!-- pageheader  -->
<!-- ============================================================== -->
<div class="row">
  <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
    <div class="page-header">
      <h2 class="pageheader-title">Evaluation processes</h2>
    </div>
  </div>
</div>

<table class="table">
  <thead>
    <tr>
      <th scope="col">Name</th>
      <th scope="col">Creation date</th>
      <th scope="col"></th>
    </tr>
  </thead>
  <tbody>
    @foreach (var proc in ViewBag.Processes) {
    <tr>
      <td>@proc.Name</td>
      <td>
        @proc.CreationDate
      </td>
      <td>
        @if(proc.ResultsReady) {
        @:<a href="EvaluationAnalytics/@Uri.EscapeUriString(proc.Name)" class="btn btn-primary">Show detail</a>
        @:<a href="EvaluationAnalytics/@Uri.EscapeUriString(proc.Name)/grid" class="btn btn-primary">Show grid</a>
        } else {
        @:<p>Result not ready yet.</p>
        }
      </td>
    </tr>
    }
  </tbody>
</table>

@Html.Partial("admin/_footer.cshtml")