X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=lib%2FPlack%2FApp%2FGruntmaster%2FHTML.pm;h=bdd20c2d183439a6ef7635abc3bf38b075282e82;hb=e6d1bcd4c0c019a9b0c120370e801d5247221c36;hp=81a33c0dc59a12e0d4822ea95f12989ecca76dcd;hpb=28ec8060441f56601f8cb167fafd32fdfb3c1a8a;p=plack-app-gruntmaster.git diff --git a/lib/Plack/App/Gruntmaster/HTML.pm b/lib/Plack/App/Gruntmaster/HTML.pm index 81a33c0..bdd20c2 100644 --- a/lib/Plack/App/Gruntmaster/HTML.pm +++ b/lib/Plack/App/Gruntmaster/HTML.pm @@ -122,6 +122,7 @@ sub process_ct_entry { stop => ftime $args{stop}, status => $status, description => literal $args{description}); + $tree->fid('ctcountdown')->detach if $args{time} >= $args{stop}; } sub process_ct { @@ -161,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 } }