]> git.sesse.net Git - ccbs/commitdiff
Add a "general facts" to the score screen.
authorSteinar H. Gunderson <sesse@samfundet.no>
Mon, 14 Feb 2005 01:34:49 +0000 (01:34 +0000)
committerSteinar H. Gunderson <sesse@samfundet.no>
Mon, 14 Feb 2005 01:34:49 +0000 (01:34 +0000)
html/show-tournament.pl
html/templates/show-tournament.tmpl

index c359511e54b6b332d76ef899b44f1072cff2e987..9b987a06a1d4f26739066329be5c79071df50801 100755 (executable)
@@ -9,7 +9,7 @@ my $id = $cgi->param('id');
 
 my $dbh = ccbs::db_connect();
 
-my $tournament = $dbh->selectrow_hashref('SELECT * FROM tournaments WHERE tournament=?', undef, $id);
+my $tournament = $dbh->selectrow_hashref('SELECT * FROM tournaments NATURAL JOIN seasons NATURAL JOIN countries NATURAL JOIN machines NATURAL JOIN scoringsystems WHERE tournament=?', undef, $id);
 
 # Swoop all the data in in a big join, then order it over to quasi-sane Perl objects.
 # (round -> parallel -> player -> songs -> title,chosen,score)
@@ -59,5 +59,5 @@ for my $score (@$scores) {
 }
 
 ccbs::print_header();
-ccbs::process_template('show-tournament.tmpl', 'Turnering', { tournament => $tournament, rounds => \@rounds });
+ccbs::process_template('show-tournament.tmpl', $tournament->{'tournamentname'}, { tournament => $tournament, rounds => \@rounds });
 $dbh->disconnect;
index cc8cdbcc576087a30d65793ef069696e0217f1b7..46a169c3bbd1c71c5f71f13596f288bcb614ebab 100644 (file)
@@ -1,4 +1,15 @@
 [%# vim:set filetype=html: %]
+  <h2>Generelle fakta</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>
+
 [% FOR r = rounds %]
   <h2>Runde [% r.round %]</h2>