]> git.sesse.net Git - ccbs/blobdiff - html/templates/songs.tmpl
Sync from --pgweb.
[ccbs] / html / templates / songs.tmpl
diff --git a/html/templates/songs.tmpl b/html/templates/songs.tmpl
new file mode 100644 (file)
index 0000000..2d3c0b2
--- /dev/null
@@ -0,0 +1,39 @@
+[%# vim:set filetype=html: %]
+
+[% SET last_machine = '' %]
+
+[% FOR s = songs %]
+[% IF s.machinename != last_machine %]
+[% IF last_machine != '' %]
+    </table>
+  </div>
+[% END %]
+
+[% SET last_machine = s.machinename %]
+  <h2>[% s.machinename %]</h2>
+
+  <div>
+    <table class="scores">
+      <tr>
+        <th>Song name</th>
+        <th>Artist</th>
+        <th>Average</th>
+        <th>Std. dev</th>
+        <th>High score</th>
+      </tr>
+[% END %]
+
+      <tr>
+        <td><a href="song.pl?id=[% s.song %]">[% s.title %]</a></td>
+        <td>[% s.artist %]</td>
+        <td>[% s.avg_score %]</td>
+        <td>[% s.stddev_score %]</td>
+[% IF s.high_score == '' %]
+        <td></td>
+[% ELSE %]
+        <td>[% s.high_score %] by <a href="song.pl?id=[% s.high_score_player %]">[% s.high_score_nick %]</a></td>
+[% END %]
+      </tr>
+[% END %]
+    </table>
+  </div>