From: Marius Gavrilescu Date: Sun, 8 Feb 2015 10:55:11 +0000 (+0200) Subject: Direct people to the archive when viewing a problem in a finished contest X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=a221db10cdbfda88bfab58aa45c820ab6d8f3fb6;p=gruntmaster-page.git Direct people to the archive when viewing a problem in a finished contest --- diff --git a/lib/Plack/App/Gruntmaster/HTML.pm b/lib/Plack/App/Gruntmaster/HTML.pm index 3404ddb..bdd20c2 100644 --- a/lib/Plack/App/Gruntmaster/HTML.pm +++ b/lib/Plack/App/Gruntmaster/HTML.pm @@ -162,11 +162,13 @@ sub process_pb_entry { $tree->fid('solution_modal')->fclass('modal-body')->replace_content(literal $args{solution}); } if ($args{cansubmit}) { + $tree->fid('nosubmit')->detach; $tree->look_down(name => 'problem')->attr(value => $args{id}); my $contest = $tree->look_down(name => 'contest'); $contest->attr(value => $args{contest}) if $args{contest}; $contest->detach unless $args{contest} } else { + $tree->fid('nosubmit')->find('a')->edit_href(sub{s/id/$args{id}/}); $tree->fid('submit')->detach } } diff --git a/tmpl/pb_entry.en b/tmpl/pb_entry.en index 2798544..c76c56c 100644 --- a/tmpl/pb_entry.en +++ b/tmpl/pb_entry.en @@ -16,8 +16,14 @@ Job log
Solution -

Submit solution

+ +
+The contest has finished.
+To submit solutions to this problem, please visit the problem outside the contest. +
+ +