CaffGeek/MBACNationals

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

Summary

Maintainability
Test Coverage
<img src="/Content/Images/Flags/{{model.Province}}_small.gif" />

<h2 class="col span_2_of_3">{{model.Name}}<a class="hidden-print pull-right" href="javascript:window.print();"><span class="glyphicon glyphicon-print"></span></a></h2>
<h5 class="col span_2_of_3" data-ng-if="model.Average">Entry Average: {{model.Average}}</h5>
<h5 class="col span_2_of_3">National Average: {{model.NationalAverage}}</h5>
<h5 class="col span_2_of_3">Wins: {{model.NationalWins}}</h5>
<h5 class="col span_2_of_3">High Score: {{model.HighScore}}</h5>
<h5 class="col span_2_of_3" data-ng-if="model.Scores[0].IsPOA">High POA: {{model.HighPOA}}</h5>

<table style="width: 100%;">
    <tbody data-ng-repeat="score in model.Scores | orderBy:'Number'"
           winhighlight="{{score.WinLossTie}}">
        <tr>
            <td><a ui-sref="match({ match: score.MatchId })"># {{score.Number}}</a></td>
            
            <td ng-if="score.OpponentId == '00000000-0000-0000-0000-000000000000'">vs {{score.OpponentName}} ({{score.OpponentProvince}})</td>
            <td ng-if="score.OpponentId != '00000000-0000-0000-0000-000000000000'">vs <a ui-sref="bowler({ bowler: score.OpponentId })">{{score.OpponentName}}</a> ({{score.OpponentProvince}})</td>

            <td>{{score.Centre}} #{{score.Lane}}</td>
        </tr>
        <tr>
            <td>
                {{score.Scratch}}
                <span data-ng-if="score.IsPOA" poahighlight="{{score.POA}}">({{score.POA}})</span>
            </td>
            <td>
                {{score.OpponentScratch}}
                <span data-ng-if="score.IsPOA" poahighlight="{{score.OpponentPOA}}">({{score.OpponentPOA}})</span>
            </td>
            <td>
                {{score.WinLossTie}}
            </td>
        </tr>
    </tbody>
    <tfoot>
        <tr>
            <th title="Total">T {{model.NationalTotal}} <span data-ng-if="model.Scores[0].IsPOA" poahighlight="{{model.NationalTotalPOA}}">({{model.NationalTotalPOA}})</span></th>
            <th>{{model.OpponentTotal | number:0}} <span data-ng-if="model.Scores[0].IsPOA" poahighlight="{{model.OpponentTotalPOA}}">({{model.OpponentTotalPOA}})</span></th>
            <th></th>
        </tr>
        <tr>
            <th title="Average">A {{model.NationalAverage}} <span data-ng-if="model.Scores[0].IsPOA" poahighlight="{{model.NationalAveragePOA}}">({{model.NationalAveragePOA | number:1}})</span></th>
            <th>{{model.OpponentAverage | number:1}} <span data-ng-if="model.Scores[0].IsPOA" poahighlight="{{model.OpponentAveragePOA}}">({{model.OpponentAveragePOA | number:1}})</span></th>
            <th></th>
        </tr>
    </tfoot>
</table>