From: Marius Gavrilescu Date: Sat, 25 Jan 2014 19:43:09 +0000 (+0200) Subject: Update formats X-Git-Url: http://git.ieval.ro/?p=gruntmaster-page.git;a=commitdiff_plain;h=c2a23f84f4699ce135f517450a0bc153410ca223 Update formats --- diff --git a/lib/Gruntmaster/Page/Log.pm b/lib/Gruntmaster/Page/Log.pm index dddd86e..14d9c62 100644 --- a/lib/Gruntmaster/Page/Log.pm +++ b/lib/Gruntmaster/Page/Log.pm @@ -10,7 +10,14 @@ our $VERSION = '0.001'; use constant PAGE_SIZE => 10; use constant FORMAT_EXTENSION => { - CPP => 'cpp', + C => 'c', + CPP => 'cpp', + MONO => 'cs', + JAVA => 'java', + PASCAL => 'pas', + PERL => 'pl', + PYTHON => 'py', + RUBY => 'rb', }; use constant TEMPLATES => { diff --git a/lib/Gruntmaster/Page/Pb/Entry.pm b/lib/Gruntmaster/Page/Pb/Entry.pm index 93ea5a5..dbf66b4 100644 --- a/lib/Gruntmaster/Page/Pb/Entry.pm +++ b/lib/Gruntmaster/Page/Pb/Entry.pm @@ -7,8 +7,6 @@ use Gruntmaster::Page::Base pb_entry => ''; our @ISA = qw/Gruntmaster::Page::Base/; our $VERSION = '0.001'; -use constant FORMATS => [qw/CPP/]; - use constant TEMPLATES => { en => <<'HTML', @@ -42,7 +40,7 @@ sub _generate{ $htc->param(cansubmit => time >= contest_start $contest && time <= contest_end $contest); $htc->param(contest => $contest); } - $htc->param(formats => FORMATS); + $htc->param(formats => Gruntmaster::Page::Submit::FORMATS); $htc->param(id => $id); local $Gruntmaster::Data::contest = $contest if $contest; $htc->param(name => problem_name $id); diff --git a/lib/Gruntmaster/Page/Submit.pm b/lib/Gruntmaster/Page/Submit.pm index cdb4f7d..36bfd67 100644 --- a/lib/Gruntmaster/Page/Submit.pm +++ b/lib/Gruntmaster/Page/Submit.pm @@ -7,7 +7,7 @@ use Gruntmaster::Page::Base submit => 'Submit job'; our @ISA = qw/Gruntmaster::Page::Base/; our $VERSION = '0.001'; -use constant FORMATS => [qw/CPP/]; +use constant FORMATS => [qw/C CPP MONO JAVA PASCAL PERL PYTHON RUBY/]; use constant TEMPLATES => { en => <<'HTML',