]> git.sesse.net Git - ccbs/blobdiff - html/templates/player.tmpl
Add a "show player" page.
[ccbs] / html / templates / player.tmpl
diff --git a/html/templates/player.tmpl b/html/templates/player.tmpl
new file mode 100644 (file)
index 0000000..0e52434
--- /dev/null
@@ -0,0 +1,58 @@
+[%# vim:set filetype=html: %]
+  <h2>Generelle fakta</h2>
+
+  <div>
+    <ul>
+      <li>Nick: [% player.nick %]</li>
+      <li>Land: [% player.countryname %]</li>
+[% IF player.clubname != '' %]
+      <li>Klubb: [% player.clubname %]</li>
+[% END %]      
+    </ul>
+  </div>
+
+  <h2>Beste sanger</h2>
+
+  <div>
+    <table>
+      <tr>
+        <th></th>
+        <th>Sang</th>
+        <th>Poengsum</th>
+        <th>Arrangement</th>
+      </tr>
+
+[% SET rowno = 1 %]
+[% FOR s = bestsongs %]
+      <tr>
+        <th>[% rowno %]</th>
+[% SET rowno = rowno + 1 %]
+        <td><a href="song.pl?id=[% s.song %]">[% s.title %]</a></td>
+        <td>[% s.score %]</td>
+        <td><a href="show-tournament.pl?id=[% s.tournament %]">[% s.tournamentname %]</a></td>
+      </tr>
+[% END %]
+    </table>
+  </div>
+
+  <div>
+    <h2>Alle sanger</h2>
+   
+    <table>
+[% FOR s = allsongs %]
+      <tr>
+        <th>[% s.title %]</th>
+[% SET col = 0 %]
+[% FOR score = s.scores %]
+        <td>[% score %]</td>
+[% SET col = col + 1 %]
+[% END %]
+[% WHILE col != columns %]
+        <td class="empty"></td>
+[% SET col = col + 1 %]
+[% WEND %]
+[% END %]
+      </tr>
+[% END %]
+    </table>
+  </div>