{{/*
  Copyright 2014 Team 254. All Rights Reserved.
  Author: nick@team254.com (Nick Eyre)
  Author: pat@patfairbank.com (Patrick Fairbank)

  Display for showing team rankings.
*/}}
<!DOCTYPE html>
<html>
  <head>
    <title>Pit Display - {{.EventSettings.Name}} - Cheesy Arena </title>
    <link rel="shortcut icon" href="/static/img/favicon.ico">
    <link rel="stylesheet" href="/static/css/lib/bootstrap.min.css" />
    <link rel="stylesheet" href="/static/css/cheesy-arena.css" />
    <link rel="stylesheet" href="/static/css/pit_display.css" />
  </head>
  <body>
    <div id="column">
      <div id="titlebar">
        <div class="pull-left">Team Standings</div>
        <div class="pull-right">{{.EventSettings.Name}}</div>
        <div>&nbsp;</div>
      </div>
      <div id="standings">
        <table id="header">
          <tr>
            <td class="team-field">Rank</td>
            <td class="team-field">Team</td>
            <td class="team-nickname">Name</td>
            <td class="team-field">RP</td>
            <td class="team-field">Auto</td>
            <td class="team-field">Endgame</td>
            <td class="team-field">Teleop</td>
            <td class="team-field">W-L-T</td>
            <td class="team-field">DQ</td>
            <td class="team-field">Played</td>
          </tr>
        </table>
        <div id="container">
          <div id="scroller">
            <table id="rankings1" class="table table-striped rankings-table"></table>
            <table id="rankings2" class="table table-striped rankings-table"></table>
          </div>
        </div>
        <div id="footer">
          <span id="highestPlayedMatch"></span>
        </div>
      </div>
      <div id="earlyLateMessage"></div>
    </div>
    <script id="standingsTemplate" type="text/x-handlebars-template">
      <tbody>
        {{"{{#each Rankings}}"}}
          <tr>
            <td class="team-field">{{"{{../Iteration}}"}} {{"{{this.Rank}}"}}</td>
            <td class="team-field">{{"{{this.TeamId}}"}}</td>
            <td class="team-nickname">{{"{{this.Nickname}}"}}</td>
            <td class="team-field">{{"{{this.RankingPoints}}"}}</td>
            <td class="team-field">{{"{{this.AutoPoints}}"}}</td>
            <td class="team-field">{{"{{this.EndgamePoints}}"}}</td>
            <td class="team-field">{{"{{this.TeleopPoints}}"}}</td>
            <td class="team-field">{{"{{this.Wins}}"}}-{{"{{this.Losses}}"}}-{{"{{this.Ties}}"}}</td>
            <td class="team-field">{{"{{this.Disqualifications}}"}}</td>
            <td class="team-field">{{"{{this.Played}}"}}</td>
          </tr>
        {{"{{/each}}"}}
      </tbody>
    </script>
    <script src="/static/js/lib/handlebars-1.3.0.js"></script>
    <script src="/static/js/lib/jquery.min.js"></script>
    <script src="/static/js/lib/jquery.json-2.4.min.js"></script>
    <script src="/static/js/lib/jquery.websocket-0.0.1.js"></script>
    <script src="/static/js/lib/jquery.transit.min.js"></script>
    <script src="/static/js/cheesy-websocket.js"></script>
    <script src="/static/js/pit_display.js"></script>
  </body>
</html>
