CaffGeek/MBACNationals

View on GitHub
Web.Admin/ClientApp/Views/Results/Team.html

Summary

Maintainability
Test Coverage
<style>@page { size: landscape; }</style>

<div class="col span_1_of_3">
    <img class="col span_3_of_3" src="/Content/Images/flags/{{model.Province}}.gif" />
</div>

<div class="col span_2_of_3">
    <h2>{{model.Province}} {{model.Name.replace("Ladies", "Women")}}<a class="hidden-print pull-right" href="javascript:window.print();"><span class="glyphicon glyphicon-print"></span></a></h2>
  <!--  <h4>Coach:</h4>
    <h4>{{model.Coach}}</h4>-->
</div>

<hr class="col-md-6"/>

<table style="width:100%">
    <thead>
        <tr>
            <th>#</th>
            <th>W/L</th>
            <th>Score</th>
            <th>vs</th>
            <th>Opponent</th>
            <th>Location</th>
        </tr>
    </thead>
    <tbody>
        <tr data-ng-repeat="score in model.Scores | orderBy: 'Number'" winhighlight="{{score.WinLossTie}}">
            <td>{{score.Number}}</td>
            <td><a href="#" ui-sref="match({ match: score.MatchId })">{{score.WinLossTie}} ({{score.Points}}-{{score.OpponentPoints}})</a></td>
            <td>{{score.Scratch}} <span data-ng-if="score.IsPOA" poahighlight="{{score.POA}}">({{score.POA}})</span></td>
            <td>vs {{score.Opponent}}</td>
            <td>
                {{score.OpponentScratch}} 
                <span data-ng-if="score.IsPOA" poahighlight="{{score.OpponentPOA}}">({{score.OpponentPOA}})</span>
            </td>
            <td>{{score.Centre}} #{{score.Lane}}</td>
        </tr>
    </tbody>
    <tfoot>
        <tr>
            <th title="Total">T</th>
            <th>{{model.TotalWins}} - {{model.TotalLoss}}</th>
            <th>{{model.TotalScratch | number:0}} <span data-ng-if="model.Scores[0].IsPOA" poahighlight="{{model.TotalPOA}}">({{model.TotalPOA}})</span></th>
            <th></th>
            <th>{{model.TotalOpponentScratch | number:0}} <span data-ng-if="model.Scores[0].IsPOA" poahighlight="{{model.TotalOpponentPOA}}">({{model.TotalOpponentPOA}})</span></th>
            <th></th>
        </tr>
        <tr>
            <th title="Average">A</th>
            <th>{{model.AverageWinsPerGame | number}} - {{model.AverageLossPerGame | number}}</th>
            <th>{{model.AverageScratch | number:1}} <span data-ng-if="model.Scores[0].IsPOA" poahighlight="{{model.AveragePOA}}">({{model.AveragePOA | number:1}})</span></th>
            <th></th>
            <th>{{model.AverageOpponentScratch | number:1}} <span data-ng-if="model.Scores[0].IsPOA" poahighlight="{{model.AverageOpponentPOA}}">({{model.AverageOpponentPOA | number:1}})</span></th>
            <th></th>
        </tr>
    </tfoot>
</table>