{{#*inline "page"}}

<div class="columns">
   <div class="column is-12 is-offset-1">
      / <a href="/">Startseite</a> /  <a href="../..">Wettbewerbsübersicht</a> / <a href="..">{{contest.name}}</a> / Gruppenergebnisse
   </div>
</div>
<div class="columns">
   <div class="column is-8 is-offset-2">
      <h3 class="title is-4">Ergebnisse in {{contest.name}}</h3>
   </div>
</div>

{{#if result}}
   <div class="columns">
      <div class="column is-8 is-offset-2">
         <h4 class="subtitle is-5">Ergebnisse herunterladen:
            <a href="download">{{contest.name}}.csv</a>
         </h4>
      </div>
   </div>

   <style>
      td { padding-left: 15px;}
      td:nth-child(3) {
         font-weight: bold;
      }
   </style>
   
<div class="columns">
   <div class="column">
  <table class="table">
    <tr>
      <td>Gruppe</td>
      <td>Teilnehmer</td>
      <td>Gesamtpunkte</td>
      {{#each taskname}}
        <td>{{this}}</td>
      {{/each}}
    </tr>
    

    {{#each result}}
       <tr style="background-color:#e5fae5;"><td style="max-width:200px;"><a href="/group/{{this.1}}">{{this.0}}</a></td><td colspan="12"></td></tr>
      {{#each this.2}}
        <tr><td></td>
          <td><a href="/user/{{this.2}}">{{this.0}} {{this.1}} ({{this.3}})</a></td>
          {{#each this.4}}
            <td>{{this}}</td>
          {{/each}}
        {{/each}}
      </tr>
    {{/each}}
  </table>
</div>
</div>

{{else}}
<div class="columns">
   <div class="column is-8 is-offset-2">
      <p>
         <em>Für diesen Wettbewerb sind noch keine Ergebnisse Ihrer Gruppen verzeichnet.</em>
      </p>
   </div>
</div>
{{/if}}


{{/inline}}
{{~> (parent)~}}
