]> git.sesse.net Git - ccbs/blob - html/templates/show-tournament.tmpl
Shape text using Pango and HarfBuzz; gives us nice ligatures and exotic scripts.
[ccbs] / html / templates / show-tournament.tmpl
1 [%# vim:set filetype=html: %]
2   <h2>General facts</h2>
3
4   <div>
5     <ul>
6       <li><_>Season:</_> [% tournament.seasonname %]</li>
7       <li><_>Country:</_> [% tournament.countryname %]</li>
8       <li><_>Place:</_> [% tournament.location %]</li>
9       <li><_>Date:</_> [% tournament.date %]</li>
10       <li><_>Machine:</_> [% tournament.machinename %]</li>
11       <li><_>Scoring system:</_> [% tournament.scoringsystemname %]</li>
12     </ul>
13   </div>
14
15 [% IF closing_valid && !public %]
16   <h2>Start new round</h2>
17
18   <div>
19     <p><_>At the moment, there's been</_> <strong>[% num_rounds %]</strong> <_>full rounds,
20       which means that you could start round</_> <strong>[% num_rounds + 1 %]</strong>
21       <_>if you'd like. Note that you can't start a new round before the
22       previous one has been completely done.</_></p>
23
24     <p><_>There are</_> <strong>[% num_qualified %]</strong> <_>players going
25       onto the next round, and these will be spread evenly out over how many
26       groups you select.</_></p>
27
28     <form method="post" action="do-start-round.pl">
29       <table>
30         <tr>
31           <th>Number of groups</th>
32           <td><input name="numgroups" /></td>
33         </tr>
34         <tr>
35           <th>Number to advance from each group</th>
36           <td><input name="numqual" /></td>
37         </tr>
38         <tr>
39           <th>Number of random songs</th>
40           <td><input name="numrandom" /></td>
41         </tr>
42         <tr>
43           <th>Number of self-selected songs</th>
44           <td><input name="numchosen" /></td>
45         </tr>
46         <tr>
47           <th colspan="2">
48             <input type="hidden" name="tournament" value="[% tournament.tournament %]" />
49             <input type="hidden" name="round" value="[% num_rounds + 1 %]" />
50             <input type="submit" value="<_>Start next round</_>" />
51           </th>
52         </tr>
53       </table>
54     </form>
55   </div>
56 [% END %]
57   
58 [% IF finishing_valid && !public %]
59   <h2>End tournament</h2>
60
61   <div>
62     <p>As there's only one group left and that group is done, you can end the
63     tournament if you'd like to. Note that when you've ended the tournament, 
64     the ranking lists will be generated and the CC points will be handed out, and
65     there's no way back (that is, the tournament is permanently ended).
66     </p>
67
68     <form method="post" action="do-finish-tournament.pl">
69       <p>
70         <input type="hidden" name="tournament" value="[% tournament.tournament %]" />
71         <input type="submit" value="<_>End the tournament</_>" />
72       </p>
73     </form>
74   </div>
75 [% END %]
76
77 [% IF num_rankings > 0 %]
78   <h2>Ranking list</h2>
79
80   <div>
81     <ul>
82 [% FOR r = rankings %]
83 [% IF r.points == -1 %]
84       <li>[% r.ranking %]. <_>place</_>: <a href="player.pl?id=[% r.player %]">[% r.nick %]</a></li>
85 [% ELSE %]
86       <li>[% r.ranking %]. <_>place</_>: <a href="player.pl?id=[% r.player %]">[% r.nick %]</a>, <_>with</_> [% r.points %] <_>points</_>.</li>
87 [% END %]
88 [% END %]
89     </ul>
90   </div>
91 [% END %]
92
93 [% FOR r = rounds %]
94 [% IF r.locked || !public %]
95   <h2><a name="round[% r.round %]">Runde [% r.round %]</a></h2>
96
97   <div>
98
99   [% FOR p = r.parallels %]
100     [% IF bigscreen && !public %]
101   <form method="post" action="do-set-active-round.pl">
102     <p>
103       <input type="hidden" name="tournament" value="[% tournament.tournament %]" />
104       <input type="hidden" name="round" value="[% r.round %]" />
105       <input type="hidden" name="parallel" value="[% p.parallel %]" />
106       [% IF p.bigscreen %]
107       <input type="hidden" name="show" value="false" />
108       <input type="submit" value="Fjern fra storskjerm" />
109       [% ELSE %]
110       <input type="hidden" name="show" value="true" />
111       <input type="submit" value="Vis på storskjerm" />
112       <_>Number of machines:</_> <input name="nummachines" value="1" size="1" />
113       <_>Number of simultaneous players on each machine:</_> <input name="playerspermachine" value="1" size="1" />
114       [% END %]
115     </p>
116   </form>
117     [% END %]
118   
119   <form method="post" action="do-edit-scores.pl">
120   <table class="scores">
121     <tr>
122     [% IF p.parallel == 0 %]
123       <th>
124         <input type="hidden" name="tournament" value="[% tournament.tournament %]" />
125         <input type="hidden" name="round" value="[% r.round %]" />
126         <input type="hidden" name="group" value="[% p.parallel %]" />
127       </th>
128     [% ELSE %]
129       <th>
130         <input type="hidden" name="tournament" value="[% tournament.tournament %]" />
131         <input type="hidden" name="round" value="[% r.round %]" />
132         <input type="hidden" name="group" value="[% p.parallel %]" />
133         <_>Group</_> [% p.parallel %]
134       </th>
135     [% END %]
136     [% FOR s = p.songs %]
137       [% IF s.song == -1 %]
138       <th colspan="4">Self-selected</th>
139       [% ELSE %]
140       <th colspan="3"><a href="song.pl?id=[% s.song %]">[% s.title %]</a></th>
141       [% END %]
142     [% END %]
143     [% IF p.num_songs > 1 %]
144       <th>Total</th>
145     [% END %]      
146       <th>Rank</th>
147     [% IF !r.locked && !public %]
148       <th></th>
149     [% END %]      
150     </tr>
151     
152     [% FOR pl = p.players %]
153       [% IF r.locked || public %]
154     <tr>
155       <th>
156         <a href="player.pl?id=[% pl.player %]">[% pl.nick %]</a>
157       </th>
158         [% FOR s = pl.songs %]
159       <td class="score">[% s.score %]</td>
160       <td class="playmode">[% s.playmode %]</td>
161       <td class="difficulty">[% s.difficulty %]</td>
162           [% IF s.chosen %]
163       <td><a href="song.pl?id=[% s.song %]">[% s.title %]</a></td>
164           [% END %]
165         [% END %]
166         [% IF p.num_songs > 1 %]
167      <td>[% pl.total %]</td>
168         [% END %]  
169 [% IF pl.best_rank == pl.worst_rank %]
170      <td>[% pl.best_rank %]
171 [% ELSE %]     
172      <td>[% pl.best_rank %]-[% pl.worst_rank %]</td>
173 [% END %]     
174     </tr>
175       [% ELSE %]
176     <tr>
177       <th><a href="player.pl?id=[% pl.player %]">[% pl.nick %]</a></th>
178         [% FOR s = pl.songs %]
179       <td class="score">
180         <input type="hidden" name="old-score[% pl.player %]-[% s.songnumber %]" value="[% s.score %]" />
181         <input name="score[% pl.player %]-[% s.songnumber %]" value="[% s.score %]" size="5" />
182       </td>
183       <td class="playmode">
184         <input type="hidden" name="old-playmode[% pl.player %]-[% s.songnumber %]" value="[% s.playmode %]" />
185         <select name="playmode[% pl.player %]-[% s.songnumber %]">
186           <option value=""> </option>
187          [% IF s.playmode == 'single' %]
188           <option value="single" selected="selected">S</option>
189          [% ELSE %]
190           <option value="single">S</option>
191          [% END %]
192          [% IF s.playmode == 'double' %]
193           <option value="double" selected="selected">D</option>
194          [% ELSE %]
195           <option value="double">D</option>
196          [% END %]
197         </select>
198       </td>
199       <td class="difficulty">
200 [% IF !s.chosen %]
201         <input type="hidden" name="song[% pl.player %]-[% s.songnumber %]" value="[% s.song %]" />
202 [% END %]       
203         <input type="hidden" name="old-difficulty[% pl.player %]-[% s.songnumber %]" value="[% s.difficulty %]" />
204         <select name="difficulty[% pl.player %]-[% s.songnumber %]">
205           <option value=""> </option>
206          [% IF s.difficulty == 'beginner' %]
207           <option value="beginner" selected="selected">B</option>
208          [% ELSE %]
209           <option value="beginner">B</option>
210          [% END %]
211          [% IF s.difficulty == 'standard' %]
212           <option value="standard" selected="selected">S</option>
213          [% ELSE %]
214           <option value="standard">S</option>
215          [% END %]
216          [% IF s.difficulty == 'difficult' %]
217           <option value="difficult" selected="selected">D</option>
218          [% ELSE %]
219           <option value="difficult">D</option>
220          [% END %]
221          [% IF s.difficulty == 'expert' %]
222           <option value="expert" selected="selected">E</option>
223          [% ELSE %]
224           <option value="expert">E</option>
225          [% END %]
226          [% IF s.difficulty == 'challenge' %]
227           <option value="challenge" selected="selected">C</option>
228          [% ELSE %]
229           <option value="challenge">C</option>
230          [% END %]
231         </select>
232       </td>
233           [% IF s.chosen %]
234       <td>
235         <input type="hidden" name="old-song[% pl.player %]-[% s.songnumber %]" value="[% s.song %]" />
236         <select name="song[% pl.player %]-[% s.songnumber %]">
237           <option value=""> </option>
238             [% FOR ss = songs %]
239               [% IF s.song == ss.song %]
240           <option value="[% ss.song %]" selected="selected">[% ss.title %]</option>
241               [% ELSE %]          
242           <option value="[% ss.song %]">[% ss.title %]</option>
243               [% END %]   
244             [% END %]
245         </select>
246       </td>
247           [% END %]
248         [% END %]
249         [% IF p.num_songs > 1 %]
250      <td>[% pl.total %]</td>
251         [% END %]
252      <td>[% pl.rank %]</td>
253      <td><input type="submit" value="Update" /></td>
254     </tr>
255       [% END %]
256     [% END %]
257   </table>
258   </form> 
259   [% END %]
260
261   </div>
262 [% END %]
263 [% END %]