|
3 | 3 | <table class="table-tournament-overview">
|
4 | 4 | <thead>
|
5 | 5 | <tr>
|
6 |
| - <th class="pl-10">Pos</th> |
7 |
| - <th>Player</th> |
8 |
| - <th class="text-right" title="Played">P</th> |
9 |
| - <th class="text-right pl-20" title="Won">W</th> |
10 |
| - <th class="text-right" title="Draw">D</th> |
11 |
| - <th class="text-right" title="Lost">L</th> |
12 |
| - <th class="text-center pl-10" title="For - Against">F - A</th> |
13 |
| - <th class="text-right pl-10" title="Difference">+/-</th> |
14 |
| - <th class="text-right" title="Points">PTS</th> |
15 |
| - <if(state.hasStatistics)> |
| 6 | + <th class="pl-10">Pos</th> |
| 7 | + <th>Player</th> |
| 8 | + <th class="text-right" title="Played">P</th> |
| 9 | + <th class="text-right pl-20" title="Won">W</th> |
| 10 | + <th class="text-right" title="Draw">D</th> |
| 11 | + <th class="text-right" title="Lost">L</th> |
| 12 | + <th class="text-center pl-10" title="For - Against">F - A</th> |
| 13 | + <th class="text-right pl-10" title="Difference">+/-</th> |
| 14 | + <th class="text-right" title="Points">PTS</th> |
16 | 15 | <th class="text-center" title="3 Dart Avg. / First 9 Three Dart Avg.">3 Dart Avg.</th>
|
17 | 16 | <th class="text-center" title="Checkout Percentage">Checkout %</th>
|
18 | 17 | <th class="text-right" title="60+ scores">60s+</th>
|
|
25 | 24 | <th class="text-center" title="Accuracy Overall">Overall</th>
|
26 | 25 | <th class="text-center" title="Accuracy 20s">20s</th>
|
27 | 26 | <th class="text-center" title="Accuracy 19s">19s</th>
|
28 |
| - </if> |
29 | 27 | </tr>
|
30 | 28 | </thead>
|
31 | 29 | <tbody>
|
|
47 | 45 | </else-if>
|
48 | 46 | </div>
|
49 | 47 | </td>
|
50 |
| - <td style='width: 15%;'> |
51 |
| - <a style='white-space: nowrap; overflow: hidden; text-overflow: ellipsis;' href=`/tournaments/${input.tournament.id}/player/${player.player_id}`>${input.players[player.player_id].name}</a> |
| 48 | + <td style='max-width: 2em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;'> |
| 49 | + <a href=`/tournaments/${input.tournament.id}/player/${player.player_id}`>${input.players[player.player_id].name}</a> |
52 | 50 | </td>
|
53 | 51 | <td class="text-right">${player.played}</td>
|
54 |
| - <td class="text-right pl-20">${player.matches_won}</td> |
| 52 | + <td class="text-right">${player.matches_won}</td> |
55 | 53 | <td class="text-right">${player.matches_draw}</td>
|
56 | 54 | <td class="text-right">${player.matches_lost}</td>
|
57 |
| - <td class="text-center pl-10">${player.legs_for + " - " + player.legs_against}</td> |
| 55 | + <td class="text-center" style="min-width: 64px;">${player.legs_for + " - " + player.legs_against}</td> |
58 | 56 | <td class="text-right pl-10">${player.legs_difference > 0 ? "+" + player.legs_difference : player.legs_difference}</td>
|
59 | 57 | <td class="text-right">${player.points}</td>
|
60 |
| - <if(state.hasStatistics)> |
61 |
| - <td class="text-center">${player.three_dart_avg === -1 ? "- / -" : player.three_dart_avg.toFixed(2) + " / " + player.first_nine_three_dart_avg.toFixed(2)}</td> |
62 |
| - <td class="text-center">${player.checkout_percentage === -1 ? "-" : player.checkout_percentage.toFixed(2) + "%"}</td> |
63 |
| - <td class="text-right">${player.scores_60s_plus}</td> |
64 |
| - <td class="text-right">${player.scores_100s_plus}</td> |
65 |
| - <td class="text-right">${player.scores_140s_plus}</td> |
66 |
| - <td class="text-right">${player.scores_180s}</td> |
67 |
| - <td class="text-center">${player.darts_per_leg === -1 ? "-" : player.darts_per_leg.toFixed(2)}</td> |
68 |
| - <td class="text-center">${player.accuracy_overall === -1 ? "-" : player.accuracy_overall.toFixed(2)}</td> |
69 |
| - <td class="text-center">${player.accuracy_20 === -1 ? "-" : player.accuracy_20.toFixed(2)}</td> |
70 |
| - <td class="text-center">${player.accuracy_19 === -1 ? "-" : player.accuracy_19.toFixed(2)}</td> |
71 |
| - </if> |
| 58 | + <td class="text-center">${player.three_dart_avg === -1 ? "- / -" : player.three_dart_avg.toFixed(2) + " / " + player.first_nine_three_dart_avg.toFixed(2)}</td> |
| 59 | + <td class="text-center">${player.checkout_percentage === -1 ? "-" : player.checkout_percentage.toFixed(2) + "%"}</td> |
| 60 | + <td class="text-right td-multi-value">${input.showPerLeg ? (player.played === 0 ? 0 : player.scores_60s_plus / (player.legs_for + player.legs_against)).toFixed(2) : player.scores_60s_plus}</td> |
| 61 | + <td class="text-right td-multi-value">${input.showPerLeg ? (player.played === 0 ? 0 : player.scores_100s_plus / (player.legs_for + player.legs_against)).toFixed(2) : player.scores_100s_plus}</td> |
| 62 | + <td class="text-right td-multi-value">${input.showPerLeg ? (player.played === 0 ? 0 : player.scores_140s_plus / (player.legs_for + player.legs_against)).toFixed(2) : player.scores_140s_plus}</td> |
| 63 | + <td class="text-right td-multi-value">${input.showPerLeg ? (player.played === 0 ? 0 : player.scores_180s / (player.legs_for + player.legs_against)).toFixed(2) : player.scores_180s}</td> |
| 64 | + <td class="text-center">${player.darts_per_leg === -1 ? "-" : player.darts_per_leg.toFixed(2)}</td> |
| 65 | + <td class="text-center">${player.accuracy_overall === -1 ? "-" : player.accuracy_overall.toFixed(2)}</td> |
| 66 | + <td class="text-center">${player.accuracy_20 === -1 ? "-" : player.accuracy_20.toFixed(2)}</td> |
| 67 | + <td class="text-center">${player.accuracy_19 === -1 ? "-" : player.accuracy_19.toFixed(2)}</td> |
72 | 68 | </tr>
|
73 | 69 | </if>
|
74 | 70 | </for>
|
| 71 | + <tr> |
| 72 | + $ let total = state.total; |
| 73 | + <td class="pl-10"></td> |
| 74 | + <td style='width: 15%;'>TOTAL</td> |
| 75 | + <td class="text-right">${total.played}</td> |
| 76 | + <td class="text-right">${total.matches_won}</td> |
| 77 | + <td class="text-right">${total.matches_draw}</td> |
| 78 | + <td class="text-right">${total.matches_lost}</td> |
| 79 | + <td class="text-center"></td> |
| 80 | + <td class="text-right pl-10"></td> |
| 81 | + <td class="text-right">${total.points}</td> |
| 82 | + <td class="text-center">${!total.three_dart_avg ? "- / -" : total.three_dart_avg.toFixed(2) + " / " + total.first_nine_three_dart_avg.toFixed(2)}</td> |
| 83 | + <td class="text-center">${!total.checkout_percentage ? "-" : total.checkout_percentage.toFixed(2) + "%"}</td> |
| 84 | + <td class="text-right td-multi-value">${input.showPerLeg ? (total.played === 0 ? 0 : total.scores_60s_plus / (total.legs_for + total.legs_against)).toFixed(2) : total.scores_60s_plus}</td> |
| 85 | + <td class="text-right td-multi-value">${input.showPerLeg ? (total.played === 0 ? 0 : total.scores_100s_plus / (total.legs_for + total.legs_against)).toFixed(2) : total.scores_100s_plus}</td> |
| 86 | + <td class="text-right td-multi-value">${input.showPerLeg ? (total.played === 0 ? 0 : total.scores_140s_plus / (total.legs_for + total.legs_against)).toFixed(2) : total.scores_140s_plus}</td> |
| 87 | + <td class="text-right td-multi-value">${input.showPerLeg ? (total.played === 0 ? 0 : total.scores_180s / (total.legs_for + total.legs_against)).toFixed(2) : total.scores_180s}</td> |
| 88 | + <td class="text-center">${total.darts_per_leg === 0 ? "-" : total.darts_per_leg.toFixed(2)}</td> |
| 89 | + <td class="text-center">${total.accuracy_overall === 0 ? "-" : total.accuracy_overall.toFixed(2)}</td> |
| 90 | + <td class="text-center">${total.accuracy_20 === 0 ? "-" : total.accuracy_20.toFixed(2)}</td> |
| 91 | + <td class="text-center">${total.accuracy_19 === 0 ? "-" : total.accuracy_19.toFixed(2)}</td> |
| 92 | + </tr> |
75 | 93 | </tbody>
|
76 | 94 | </table>
|
77 | 95 | </div>
|
|
0 commit comments