]>
iEval git - plack-app-gruntmaster.git/blob - lib/Gruntmaster/Page/Ct/Entry.pm
3c336c17bd0939c7b36460194b1a831b76a3972d
1 package Gruntmaster
::Page
::Ct
::Entry
;
6 use parent qw
/Exporter/;
7 our @EXPORT_OK = qw
/generate/;
8 our $VERSION = '0.001';
10 use constant TITLE
=> '<tmpl_var name>';
12 use HTML
::Template
::Compiled
;
13 use POSIX qw
/strftime/;
14 use Gruntmaster
::Page
::Common qw
/header footer/;
15 use Gruntmaster
::Data qw
/contest_name contest_start contest_end/;
19 Contest start time: <tmpl_var start><br>
20 Contest end time: <tmpl_var end><p>
22 <tmpl_if started><a href="pb/">Problems</a><br>
23 <a href="log/">Job log</a><br>
24 <a href="log/st.var">Standings</a></tmpl_if>
28 $templates{$_} = header
($_, TITLE
) . $templates{$_} for keys %templates;
29 $templates{$_} .= footer
$_ for keys %templates;
32 my ($path, $lang) = @_;
33 $path = ($path =~ m
,ct
/(.*)/index
,)[0];
34 my $template = $templates{$lang};
35 my $htc = HTML
::Template
::Compiled
->new(scalarref
=> \
$template);
37 $htc->param(id
=> $path);
38 $htc->param(name
=> contest_name
$path);
39 $htc->param(start
=> strftime
'%c', contest_start
);
40 $htc->param(end
=> strftime
'%c', contest_end
);
41 $htc->param(started
=> time >= contest_start
);
This page took 0.048532 seconds and 4 git commands to generate.