X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=lib%2FGruntmaster%2FPage%2FCt%2FEntry.pm;h=acc076ead75666d4be6147ce3850669e535fd152;hb=b7bd0bad53df03baf5dc302ade58bea4f73d0880;hp=9414de8465daffd927e3e7125d7c1335b931184e;hpb=864be20fdc7711f572c3cd654fc04eb3a2d8c949;p=gruntmaster-page.git diff --git a/lib/Gruntmaster/Page/Ct/Entry.pm b/lib/Gruntmaster/Page/Ct/Entry.pm index 9414de8..acc076e 100644 --- a/lib/Gruntmaster/Page/Ct/Entry.pm +++ b/lib/Gruntmaster/Page/Ct/Entry.pm @@ -7,27 +7,15 @@ use Gruntmaster::Page::Base ct_entry => ''; our @ISA = qw/Gruntmaster::Page::Base/; our $VERSION = '0.001'; -use constant TEMPLATES => { - en => <<'HTML', -Contest start time:
-Contest end time:

- -Problems
-Job log
-Standings
-HTML -}; - sub _generate{ - my ($self, $htc, $path, $lang) = @_; - - $path = ($path =~ m,ct/(.*)/index,)[0]; + my ($self, $htc, $lang, $env, $id) = @_; + debug $env => "language is '$lang' and id is '$id'"; - $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