]> iEval git - gruntmaster-page.git/blame - lib/Gruntmaster/Page/Ct/Entry.pm
Heeere's Plack/PSGI!
[gruntmaster-page.git] / lib / Gruntmaster / Page / Ct / Entry.pm
CommitLineData
fe78f0c1
MG
1package Gruntmaster::Page::Ct::Entry;
2
3use 5.014000;
4use strict;
5use warnings;
bb95f538
MG
6use Gruntmaster::Page::Base ct_entry => '<tmpl_var name>';
7our @ISA = qw/Gruntmaster::Page::Base/;
fe78f0c1
MG
8our $VERSION = '0.001';
9
bb95f538 10use constant TEMPLATES => {
cd9af27e 11 en => <<'HTML',
fe78f0c1
MG
12Contest start time: <tmpl_var start><br>
13Contest end time: <tmpl_var end><p>
14
7dc32473
MG
15<tmpl_if started><a href="<tmpl_var id>/pb/">Problems</a><br>
16<a href="<tmpl_var id>/log/">Job log</a><br>
17<a href="<tmpl_var id>/log/st">Standings</a></tmpl_if>
fe78f0c1 18HTML
bb95f538 19};
fe78f0c1 20
bb95f538 21sub _generate{
7dc32473
MG
22 my ($self, $htc, $lang, $logger, $id) = @_;
23 debug $logger => "language is '$lang' and id is '$id'";
fe78f0c1 24
7dc32473
MG
25 $htc->param(id => $id);
26 $htc->param(name => contest_name $id);
27 $htc->param(start => strftime '%c', localtime contest_start $id);
28 $htc->param(end => strftime '%c', localtime contest_end $id);
29 $htc->param(started => time >= contest_start $id);
fe78f0c1
MG
30}
31
321
This page took 0.036235 seconds and 4 git commands to generate.