Added a (quite crude) link from the song list to the feetratings. Update TODO.
authorSteinar H. Gunderson <sesse@samfundet.no>
Sun, 24 Apr 2005 22:09:01 +0000 (22:09 +0000)
committerSteinar H. Gunderson <sesse@samfundet.no>
Sun, 24 Apr 2005 22:09:01 +0000 (22:09 +0000)
TODO
html/songs.pl
html/templates/songs.tmpl

diff --git a/TODO b/TODO
index 3caf74052229ddc72bc2041ce3cfff001af4d36a..90241a70de80b6f72c2b18d35623620844409db0 100644 (file)
--- a/TODO
+++ b/TODO
@@ -3,7 +3,6 @@
 - Add DP/pass in addition to score
 - Auto-reset of the song selector on first elimination round?
 - Fix the "highest average" screen and pull it in from ccbs--tg
-- Link to songratings.pl from somewhere public
 - Warning when an entered score is too high for a given song
 - A flag for determining playmode in a tournament (single, double, both),
   and make the bigscreen understand it.
index 80c6132ba7b89886e17a462792dd93806a347f1b..2ac52a1adfcdeac2231cae2532fb77e609b7c206 100755 (executable)
@@ -9,7 +9,7 @@ my $id = $cgi->param('id');
 
 my $dbh = ccbs::db_connect();
 
-my $songs = ccbs::db_fetch_all($dbh, 'SELECT machinename,song,title,artist,avg_score,stddev_score,high_score,high_score_player,high_score_nick FROM machinesongs NATURAL JOIN songs NATURAL JOIN machines NATURAL LEFT JOIN ( SELECT song,AVG(score)::integer AS avg_score,STDDEV(score)::integer AS stddev_score FROM scores JOIN tournaments ON scores.tournament=tournaments.tournament WHERE scoringsystem=1 GROUP BY song ) t1 NATURAL LEFT JOIN ( SELECT DISTINCT ON (song) song,player AS high_score_player,nick AS high_score_nick,score AS high_score FROM scores NATURAL JOIN players JOIN tournaments ON scores.tournament=tournaments.tournament WHERE scoringsystem=1 ORDER BY song,score DESC ) t2 ORDER BY machine,LOWER(title)');
+my $songs = ccbs::db_fetch_all($dbh, 'SELECT machine,machinename,song,title,artist,avg_score,stddev_score,high_score,high_score_player,high_score_nick FROM machinesongs NATURAL JOIN songs NATURAL JOIN machines NATURAL LEFT JOIN ( SELECT song,AVG(score)::integer AS avg_score,STDDEV(score)::integer AS stddev_score FROM scores JOIN tournaments ON scores.tournament=tournaments.tournament WHERE scoringsystem=1 GROUP BY song ) t1 NATURAL LEFT JOIN ( SELECT DISTINCT ON (song) song,player AS high_score_player,nick AS high_score_nick,score AS high_score FROM scores NATURAL JOIN players JOIN tournaments ON scores.tournament=tournaments.tournament WHERE scoringsystem=1 ORDER BY song,score DESC ) t2 ORDER BY machine,LOWER(title)');
 
 ccbs::print_header();
 ccbs::process_template('songs.tmpl', 'Sanger', {
index df1d985d66db51a612643d3c56188051a8e7bcfc..77840925ea304614c85c373aac29d368b0b63e50 100644 (file)
@@ -13,6 +13,8 @@
   <h2>[% s.machinename %]</h2>
 
   <div>
+    <p><a href="songratings.pl?machine=[% s. machine %]">Fotratinger</a></p>
+  
     <table class="scores">
       <tr>
         <th>Sang</th>