From 7ef3ba3f1bf9b5114f60614458d9ae4cb0327bbb Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Mon, 14 Feb 2005 01:34:49 +0000 Subject: [PATCH 1/1] Add a "general facts" to the score screen. --- html/show-tournament.pl | 4 ++-- html/templates/show-tournament.tmpl | 11 +++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/html/show-tournament.pl b/html/show-tournament.pl index c359511..9b987a0 100755 --- a/html/show-tournament.pl +++ b/html/show-tournament.pl @@ -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; diff --git a/html/templates/show-tournament.tmpl b/html/templates/show-tournament.tmpl index cc8cdbc..46a169c 100644 --- a/html/templates/show-tournament.tmpl +++ b/html/templates/show-tournament.tmpl @@ -1,4 +1,15 @@ [%# vim:set filetype=html: %] +

Generelle fakta

+ + + [% FOR r = rounds %]

Runde [% r.round %]

-- 2.39.2