<div ng-repeat="team in teams" ng-click="show(team.id)" ng-controller="TeamController" ng-if="team.active">
  <div ng-controller="TeamExercicesController">
    <div ng-if="teams[my.team_id].rank">
      <h2>{{ team.name }} <small>{{ teams[my.team_id].rank }}/{{ nb_teams }} &ndash; <ng-pluralize count="my.score" when="{'one': '{}&nbsp;point', 'other': '{}&nbsp;points'}"></ng-pluralize></small></h2>
      <div class="row">
	<div class="col-md" ng-repeat="(tid,theme) in themes">
	  <h4 ng-bind="theme.name" style="white-space: nowrap"></h4>
	  <ul class="list-unstyled">
	    <li ng-repeat="(eid,exercice) in theme.exercices" ng-if="my.exercices[eid] && (my.exercices[eid].tries || (my.exercices[eid].hints | countHints))">
	      <nobr ng-class="{'text-info': !my.exercices[eid].tries && !my.exercices[eid].solved_rank, 'text-warning': my.exercices[eid].tries && !my.exercices[eid].solved_rank, 'text-success': my.exercices[eid].solved_rank}">
	      <a href="/{{ my.exercices[eid].theme_id }}/{{ eid }}" target="_blank" title="{{ my.exercices[eid].statement }}">{{ exercice.title }}</a>
		(<span ng-if="my.exercices[eid].solved_rank" title="{{ my.exercices[eid].solved_time | date:'mediumDate' }} à {{ my.exercices[eid].solved_time | date:'mediumTime' }}">{{ my.exercices[eid].solved_rank }}<sup>e</sup> &ndash; </span><em><ng-pluralize count="my.exercices[eid].tries" when="{'one': '{}&nbsp;tentative', 'other': '{}&nbsp;tentatives'}"></ng-pluralize><span ng-if="my.exercices[eid].hints | countHints"><span ng-if="my.exercices[eid].tries"> &ndash; </span>{{ my.exercices[eid].hints | countHints }} indices</span></em>)
	      </nobr>
	    </li>
	  </ul>
	</div>
      </div>

      <hr>
    </div>
  </div>
</div>
