]> git.sesse.net Git - ccbs/commitdiff
Added links for all songs (no backend yet) in the tournament view.
authorSteinar H. Gunderson <sesse@samfundet.no>
Fri, 18 Feb 2005 13:27:39 +0000 (13:27 +0000)
committerSteinar H. Gunderson <sesse@samfundet.no>
Fri, 18 Feb 2005 13:27:39 +0000 (13:27 +0000)
html/show-tournament.pl
html/templates/show-tournament.tmpl

index 61c3badf7226c2d285226a0da8be07e54dc2e853..3d0db3c945f38c8bb363b93362b30d20637e329e 100755 (executable)
@@ -51,9 +51,9 @@ for my $score (@$scores) {
        }
        if ($score->{'position'} == 1) {
                if ($score->{'chosen'}) {
-                       push @{$p->[$#$p]->{'songs'}}, '';
+                       push @{$p->[$#$p]->{'songs'}}, { song => -1, title => '' };
                } else {
-                       push @{$p->[$#$p]->{'songs'}}, $score->{'title'};
+                       push @{$p->[$#$p]->{'songs'}}, $score;
                }
                $p->[$#$p]->{'num_songs'}++;
        }
index a5c539ea951e940461da31176732b9b1787d4bf7..ee2be73e69f0e8a4ff3e5a573296fcabd1bcecca 100644 (file)
       </th>
     [% END %]
     [% FOR s = p.songs %]
-      [% IF s == '' %]
+      [% IF s.song == -1 %]
       <th colspan="4">Selvvalgt</th>
       [% ELSE %]
-      <th colspan="3">[% s %]</th>
+      <th colspan="3"><a href="song.pl?id=[% s.song %]">[% s.title %]</a></th>
       [% END %]
     [% END %]
     [% IF p.num_songs > 1 %]
       <td class="playmode">[% s.playmode %]</td>
       <td class="difficulty">[% s.difficulty %]</td>
           [% IF s.chosen %]
-      <td>[% s.title %]</td>
+      <td><a href="song.pl?id=[% s.song %]">[% s.title %]</a></td>
           [% END %]
         [% END %]
         [% IF p.num_songs > 1 %]