]> iEval git - gruntmaster-page.git/blobdiff - lib/Gruntmaster/Page/Ct/Entry.pm
Heeere's Plack/PSGI!
[gruntmaster-page.git] / lib / Gruntmaster / Page / Ct / Entry.pm
index 9414de8465daffd927e3e7125d7c1335b931184e..97089b536852a57fa24243ec9d47578b5672216d 100644 (file)
@@ -12,22 +12,21 @@ use constant TEMPLATES => {
 Contest start time: <tmpl_var start><br>
 Contest end time: <tmpl_var end><p>
 
-<tmpl_if started><a href="pb/">Problems</a><br>
-<a href="log/">Job log</a><br>
-<a href="log/st.var">Standings</a></tmpl_if>
+<tmpl_if started><a href="<tmpl_var id>/pb/">Problems</a><br>
+<a href="<tmpl_var id>/log/">Job log</a><br>
+<a href="<tmpl_var id>/log/st">Standings</a></tmpl_if>
 HTML
 };
 
 sub _generate{
-       my ($self, $htc, $path, $lang) = @_;
+       my ($self, $htc, $lang, $logger, $id) = @_;
+       debug $logger => "language is '$lang' and id is '$id'";
 
-       $path = ($path =~ m,ct/(.*)/index,)[0];
-
-       $htc->param(id => $path);
-       $htc->param(name => contest_name $path);
-       $htc->param(start => strftime '%c', localtime contest_start $path);
-       $htc->param(end => strftime '%c', localtime contest_end $path);
-       $htc->param(started => time >= contest_start $path);
+       $htc->param(id => $id);
+       $htc->param(name => contest_name $id);
+       $htc->param(start => strftime '%c', localtime contest_start $id);
+       $htc->param(end => strftime '%c', localtime contest_end $id);
+       $htc->param(started => time >= contest_start $id);
 }
 
 1
This page took 0.020188 seconds and 4 git commands to generate.