111 lines
3.4 KiB
HTML
111 lines
3.4 KiB
HTML
#macro(placement $i, $p)
|
|
<span class="info"></span>
|
|
<select name="crit-$i" data-initial="$p" class="short-value">
|
|
#foreach($crit in $$utils.criteria.entrySet())
|
|
<option value="$crit.key" data-tooltip="$crit.value" #if($p == $crit.key)selected#end>$crit.key - $crit.value</option>
|
|
#end
|
|
</select>
|
|
#end
|
|
<div class="tab-content" id="standings-tab">
|
|
<div id="standings-round" class="active-round-box">
|
|
Standings after round
|
|
<button class="ui floating choose-round prev-round button">«</button>
|
|
<span class="active-round">$round</span>
|
|
<button class="ui floating choose-round next-round button">»</button>
|
|
</div>
|
|
<div id="standings-params" class="roundbox">
|
|
<form id="params-form" class="ui form">
|
|
<div class="inline fields">
|
|
#foreach($placement in $tour.pairing.placement)
|
|
<div class="criterium field">
|
|
#set($num = $foreach.index + 1)
|
|
<label>Crit #$num</label>
|
|
#placement($num $placement)
|
|
</div>
|
|
#end
|
|
</div>
|
|
<div id="params-submit" class="hidden centered inline fields">
|
|
<button type="button" class="ui gray floating cancel button">Cancel</button>
|
|
<button type="submit" class="ui blue floating button">Change</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
<div id="standings-container" class="roundbox">
|
|
#set($standings = $api.get("tour/${params.id}/standings/$round"))
|
|
#if($standings.isObject() && ($standings.error || $standings.message))
|
|
#if($standings.error)
|
|
#set($error = $standings.error)
|
|
#else
|
|
#set($error = $standings.message)
|
|
#end
|
|
<script type="text/javascript">
|
|
onLoad(() => {
|
|
showError("$error")
|
|
});
|
|
</script>
|
|
#set($standings = [])
|
|
#end
|
|
<table id="standings-table" class="ui striped table">
|
|
<thead>
|
|
<th>Num</th>
|
|
<th>Plc</th>
|
|
<th>Name</th>
|
|
<th>Rank</th>
|
|
<th>Ctr</th>
|
|
<th>Nbw</th>
|
|
#foreach($r in [1..$round])
|
|
<th>R$r</th>
|
|
#end
|
|
#foreach($crit in $tour.pairing.placement)
|
|
<th>$crit</th>
|
|
#end
|
|
</thead>
|
|
<tbody>
|
|
#foreach($part in $standings)
|
|
<tr>
|
|
<td>$part.num</td>
|
|
<td>$part.place</td>
|
|
<td>$part.name $part.firstname</td>
|
|
<td data-sort="$part.rank">#rank($part.rank)</td>
|
|
<td>$part.country</td>
|
|
<td>$number.format('0.#', $part.NBW)</td>
|
|
#set($mx = $round - 1)
|
|
#foreach($r in [0..$mx])
|
|
#set($rst = $part.results[$r])
|
|
#if($rst.contains('+'))
|
|
#set($rst = "<b>$rst</b>")
|
|
#elseif($rst.contains('-'))
|
|
#set($rst = "<i>$rst</i>")
|
|
#end
|
|
<td class="nobreak">$rst</td>
|
|
#end
|
|
#foreach($crit in $tour.pairing.placement)
|
|
<td>$number.format('0.#', $part[$crit])</td>
|
|
#end
|
|
</tr>
|
|
#end
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="right form-actions">
|
|
<button id="publish" class="ui yellow floating button">Publish</button>
|
|
</div>
|
|
</div>
|
|
<div id="publish-modal" class="popup">
|
|
<div class="popup-body">
|
|
<div class="popup-header">
|
|
Download Standings
|
|
</div>
|
|
<div class="popup-content">
|
|
Choose format
|
|
</div>
|
|
<div class="popup-footer">
|
|
<div class="form-actions">
|
|
<button type="button" class="ui gray floating cancel button">Cancel</button>
|
|
<button type="button" class="ui blue floating publish-egf button">EGF</button>
|
|
<button type="button" class="ui blue floating publish-ffg button">FFG</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|