[%# vim:set filetype=html: %]
- <h2>Generelle fakta</h2>
+ <h2>General facts</h2>
- <ul>
- <li>Sesong: [% tournament.seasonname %]</li>
- <li>Land: [% tournament.countryname %]</li>
- <li>Sted: [% tournament.location %]</li>
- <li>Dato: [% tournament.date %]</li>
- <li>Maskin: [% tournament.machinename %]</li>
- <li>Scoresystem: [% tournament.scoringsystemname %]</li>
- </ul>
+ <div>
+ <ul>
+ <li><_>Season:</_> [% tournament.seasonname %]</li>
+ <li><_>Country:</_> [% tournament.countryname %]</li>
+ <li><_>Place:</_> [% tournament.location %]</li>
+ <li><_>Date:</_> [% tournament.date %]</li>
+ <li><_>Machine:</_> [% tournament.machinename %]</li>
+ <li><_>Scoring system:</_> [% tournament.scoringsystemname %]</li>
+ </ul>
+ </div>
+
+[% IF closing_valid && !public %]
+ <h2>Start new round</h2>
+
+ <div>
+ <p><_>At the moment, there's been</_> <strong>[% num_rounds %]</strong> <_>full rounds,
+ which means that you could start round</_> <strong>[% num_rounds + 1 %]</strong>
+ <_>if you'd like. Note that you can't start a new round before the
+ previous one has been completely done.</_></p>
+
+ <p><_>There are</_> <strong>[% num_qualified %]</strong> <_>players going
+ onto the next round, and these will be spread evenly out over how many
+ groups you select.</_></p>
+
+ <form method="post" action="do-start-round.pl">
+ <table>
+ <tr>
+ <th>Number of groups</th>
+ <td><input name="numgroups" /></td>
+ </tr>
+ <tr>
+ <th>Number to advance from each group</th>
+ <td><input name="numqual" /></td>
+ </tr>
+ <tr>
+ <th>Number of random songs</th>
+ <td><input name="numrandom" /></td>
+ </tr>
+ <tr>
+ <th>Number of self-selected songs</th>
+ <td><input name="numchosen" /></td>
+ </tr>
+ <tr>
+ <th colspan="2">
+ <input type="hidden" name="tournament" value="[% tournament.tournament %]" />
+ <input type="hidden" name="round" value="[% num_rounds + 1 %]" />
+ <input type="submit" value="<_>Start next round</_>" />
+ </th>
+ </tr>
+ </table>
+ </form>
+ </div>
+[% END %]
+
+[% IF finishing_valid && !public %]
+ <h2>End tournament</h2>
+
+ <div>
+ <p>As there's only one group left and that group is done, you can end the
+ tournament if you'd like to. Note that when you've ended the tournament,
+ the ranking lists will be generated and the CC points will be handed out, and
+ there's no way back (that is, the tournament is permanently ended).
+ </p>
+
+ <form method="post" action="do-finish-tournament.pl">
+ <p>
+ <input type="hidden" name="tournament" value="[% tournament.tournament %]" />
+ <input type="submit" value="<_>End the tournament</_>" />
+ </p>
+ </form>
+ </div>
+[% END %]
+
+[% IF num_rankings > 0 %]
+ <h2>Ranking list</h2>
+
+ <div>
+ <ul>
+[% FOR r = rankings %]
+[% IF r.points == -1 %]
+ <li>[% r.ranking %]. <_>place</_>: <a href="player.pl?id=[% r.player %]">[% r.nick %]</a></li>
+[% ELSE %]
+ <li>[% r.ranking %]. <_>place</_>: <a href="player.pl?id=[% r.player %]">[% r.nick %]</a>, <_>with</_> [% r.points %] <_>points</_>.</li>
+[% END %]
+[% END %]
+ </ul>
+ </div>
+[% END %]
[% FOR r = rounds %]
- <h2>Runde [% r.round %]</h2>
+[% IF r.locked || public %]
+ <h2><a name="round[% r.round %]">Runde [% r.round %]</a></h2>
+
+ <div>
-[% FOR p = r.parallels %]
+ [% FOR p = r.parallels %]
+ [% IF bigscreen && !public %]
+ <form method="post" action="do-set-active-round.pl">
+ <p>
+ <input type="hidden" name="tournament" value="[% tournament.tournament %]" />
+ <input type="hidden" name="round" value="[% r.round %]" />
+ <input type="hidden" name="parallel" value="[% p.parallel %]" />
+ [% IF p.bigscreen %]
+ <input type="hidden" name="show" value="false" />
+ <input type="submit" value="Fjern fra storskjerm" />
+ [% ELSE %]
+ <input type="hidden" name="show" value="true" />
+ <input type="submit" value="Vis på storskjerm" />
+ <_>Number of machines:</_> <input name="nummachines" value="1" size="1" />
+ <_>Number of simultaneous players on each machine:</_> <input name="playerspermachine" value="1" size="1" />
+ [% END %]
+ </p>
+ </form>
+ [% END %]
+
+ <form method="post" action="do-edit-scores.pl">
<table class="scores">
<tr>
-[% IF p.parallel == 0 %]
+ [% IF p.parallel == 0 %]
+ <th>
+ <input type="hidden" name="tournament" value="[% tournament.tournament %]" />
+ <input type="hidden" name="round" value="[% r.round %]" />
+ <input type="hidden" name="group" value="[% p.parallel %]" />
+ </th>
+ [% ELSE %]
+ <th>
+ <input type="hidden" name="tournament" value="[% tournament.tournament %]" />
+ <input type="hidden" name="round" value="[% r.round %]" />
+ <input type="hidden" name="group" value="[% p.parallel %]" />
+ <_>Group</_> [% p.parallel %]
+ </th>
+ [% END %]
+ [% FOR s = p.songs %]
+ [% IF s.song == -1 %]
+ <th colspan="4">Self-selected</th>
+ [% ELSE %]
+ <th colspan="3"><a href="song.pl?id=[% s.song %]">[% s.title %]</a></th>
+ [% END %]
+ [% END %]
+ [% IF p.num_songs > 1 %]
+ <th>Total</th>
+ [% END %]
+ <th>Rank</th>
+ [% IF !r.locked && !public %]
<th></th>
-[% ELSE %]
- <th>Gruppe [% p.parallel %]</th>
-[% END %]
-[% FOR s = p.songs %]
- <th>[% s %]</th>
-[% END %]
+ [% END %]
</tr>
-[% FOR pl = p.players %]
+ [% FOR pl = p.players %]
+ [% IF r.locked || public %]
<tr>
- <th>[% pl.nick %]</th>
-[% FOR s = pl.songs %]
+ <th>
+ <a href="player.pl?id=[% pl.player %]">[% pl.nick %]</a>
+ </th>
+ [% FOR s = pl.songs %]
+ <td class="score">[% s.score %]</td>
+ <td class="playmode">[% s.playmode %]</td>
+ <td class="difficulty">[% s.difficulty %]</td>
+ [% IF s.chosen %]
+ <td><a href="song.pl?id=[% s.song %]">[% s.title %]</a></td>
+ [% END %]
+ [% END %]
+ [% IF p.num_songs > 1 %]
+ <td>[% pl.total %]</td>
+ [% END %]
+[% IF pl.best_rank == pl.worst_rank %]
+ <td>[% pl.best_rank %]
+[% ELSE %]
+ <td>[% pl.best_rank %]-[% pl.worst_rank %]</td>
+[% END %]
+ </tr>
+ [% ELSE %]
+ <tr>
+ <th><a href="player.pl?id=[% pl.player %]">[% pl.nick %]</a></th>
+ [% FOR s = pl.songs %]
+ <td class="score">
+ <input type="hidden" name="old-score[% pl.player %]-[% s.songnumber %]" value="[% s.score %]" />
+ <input name="score[% pl.player %]-[% s.songnumber %]" value="[% s.score %]" size="5" />
+ </td>
+ <td class="playmode">
+ <input type="hidden" name="old-playmode[% pl.player %]-[% s.songnumber %]" value="[% s.playmode %]" />
+ <select name="playmode[% pl.player %]-[% s.songnumber %]">
+ <option value=""> </option>
+ [% IF s.playmode == 'single' %]
+ <option value="single" selected="selected">S</option>
+ [% ELSE %]
+ <option value="single">S</option>
+ [% END %]
+ [% IF s.playmode == 'double' %]
+ <option value="double" selected="selected">D</option>
+ [% ELSE %]
+ <option value="double">D</option>
+ [% END %]
+ </select>
+ </td>
+ <td class="difficulty">
+[% IF !s.chosen %]
+ <input type="hidden" name="song[% pl.player %]-[% s.songnumber %]" value="[% s.song %]" />
+[% END %]
+ <input type="hidden" name="old-difficulty[% pl.player %]-[% s.songnumber %]" value="[% s.difficulty %]" />
+ <select name="difficulty[% pl.player %]-[% s.songnumber %]">
+ <option value=""> </option>
+ [% IF s.difficulty == 'beginner' %]
+ <option value="beginner" selected="selected">B</option>
+ [% ELSE %]
+ <option value="beginner">B</option>
+ [% END %]
+ [% IF s.difficulty == 'standard' %]
+ <option value="standard" selected="selected">S</option>
+ [% ELSE %]
+ <option value="standard">S</option>
+ [% END %]
+ [% IF s.difficulty == 'difficult' %]
+ <option value="difficult" selected="selected">D</option>
+ [% ELSE %]
+ <option value="difficult">D</option>
+ [% END %]
+ [% IF s.difficulty == 'expert' %]
+ <option value="expert" selected="selected">E</option>
+ [% ELSE %]
+ <option value="expert">E</option>
+ [% END %]
+ [% IF s.difficulty == 'challenge' %]
+ <option value="challenge" selected="selected">C</option>
+ [% ELSE %]
+ <option value="challenge">C</option>
+ [% END %]
+ </select>
+ </td>
+ [% IF s.chosen %]
<td>
- [% s.score %]
-[% IF s.chosen %]
- : [% s.title %]
-[% END %]
-</td>
-[% END %]
+ <input type="hidden" name="old-song[% pl.player %]-[% s.songnumber %]" value="[% s.song %]" />
+ <select name="song[% pl.player %]-[% s.songnumber %]">
+ <option value=""> </option>
+ [% FOR ss = songs %]
+ [% IF s.song == ss.song %]
+ <option value="[% ss.song %]" selected="selected">[% ss.title %]</option>
+ [% ELSE %]
+ <option value="[% ss.song %]">[% ss.title %]</option>
+ [% END %]
+ [% END %]
+ </select>
+ </td>
+ [% END %]
+ [% END %]
+ [% IF p.num_songs > 1 %]
+ <td>[% pl.total %]</td>
+ [% END %]
+ <td>[% pl.rank %]</td>
+ <td><input type="submit" value="Update" /></td>
</tr>
-[% END %]
+ [% END %]
+ [% END %]
</table>
+ </form>
+ [% END %]
+
+ </div>
[% END %]
-
[% END %]