<ol class="breadcrumb">
  <li><a href="#/championships/">Kampioenschappen</a></li>
  <li class="active">Poules voor {{currentChampionship}}</li>
</ol>

<div class="row">

<div class="col-md-6">
<div class="panel panel-default" ng-show="poules.length > 0">
  <div class="panel-heading">
    <h3 class="panel-title">Poules</h3>
  </div>
	<div class="panel-body">
		<table class="table">
			<tr><th>Tier</th><th>Poule</th><th>Acties</th></tr>
			<tr ng-repeat="poule in poules | orderBy:'[tier,poule]'">
        <td>{{poule.tier}}</td>
        <td>{{poule.poule}}</td>
        <td>
          <a class="btn btn-info btn-sm" href="#/championship/{{poule.idchampionship}}/poule/{{poule.tier}}/{{poule.poule}}/races">
            Bekijk races <span class="badge">{{poule.racecount}}</span>
          </a>
          <a class="btn btn-info btn-sm" href="#/championship/{{poule.idchampionship}}/poule/{{poule.tier}}/{{poule.poule}}/teams">
            Bekijk teams <span class="badge">{{poule.teamcount}}</span>
          </a>
          <button class="btn btn-danger btn-sm" ng-click="deletePoule(poule.tier, poule.poule, currentChampionship);">
            <span class="glyphicon glyphicon-remove" aria-hidden="true"></span>
          </button>
        </td>
			</tr>
		</table>
	</div>
</div>
</div>

<div class="col-md-6">
<div class="panel panel-default">
  <div class="panel-heading">
    <h3 class="panel-title">Voeg poule toe</h3>
  </div>
  <div class="panel-body">
		<div class="input-group">
  		<span class="input-group-addon" id="sizing-addon2">Tier</span>
  		<input type="text" class="form-control" aria-describedby="sizing-addon2" ng-model="newpoule.tier">
		</div>
    <div class="input-group">
  		<span class="input-group-addon" id="sizing-addon2">Poule</span>
  		<input type="text" class="form-control" aria-describedby="sizing-addon2" ng-model="newpoule.poule">
		</div>



		<button type="button" class="btn btn-default" ng-click="addPoule(newpoule);">Voeg toe!</button>
  </div>
</div>
</div>
