X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=lib%2FGruntmaster%2FPage%2FPb%2FEntry.pm;h=78560fd061b023eae962c01c98c67cdb2df4aa04;hb=0a9ccdd836aa7dd0104baa19509f65d7c7e860c4;hp=2dd0a7b5674afa577350a7da7551a7eaa61605ca;hpb=9f8cf806e07f79de5cbfb2614a09917a107a718b;p=plack-app-gruntmaster.git diff --git a/lib/Gruntmaster/Page/Pb/Entry.pm b/lib/Gruntmaster/Page/Pb/Entry.pm index 2dd0a7b..78560fd 100644 --- a/lib/Gruntmaster/Page/Pb/Entry.pm +++ b/lib/Gruntmaster/Page/Pb/Entry.pm @@ -9,34 +9,42 @@ our $VERSION = '0.001'; use constant TEMPLATES => { en => <<'HTML', +
+
+
+ +
+
+
Author
+
Owner
+

Submit solution

-
+ - -
+
+
+
- + +
HTML }; sub _generate{ - my ($self, $htc, $path, $lang) = @_; - - $path =~ m,(?:ct/([^/]+)/)?pb/(\w+)\.html$,; - - my ($contest, $id) = ($1, $2); + my ($self, $htc, $lang, $logger, $contest, $id) = @_; + debug $logger => "language is '$lang', contest is '$contest', id is '$id'"; $htc->param(cansubmit => 1); - if (defined $contest) { + if ($contest) { $htc->param(cansubmit => time <= contest_end $contest); $htc->param(contest => $contest); }