From: Marius Gavrilescu Date: Mon, 16 Mar 2015 16:33:04 +0000 (+0200) Subject: Display limit overrides X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=14582b6fca574c3404aea4675ffebc6f7b57c8cb;p=plack-app-gruntmaster.git Display limit overrides --- diff --git a/lib/Plack/App/Gruntmaster/HTML.pm b/lib/Plack/App/Gruntmaster/HTML.pm index b4f863a..57b4e50 100644 --- a/lib/Plack/App/Gruntmaster/HTML.pm +++ b/lib/Plack/App/Gruntmaster/HTML.pm @@ -149,6 +149,11 @@ sub process_pb_entry { level => ucfirst $args{level}, author => $args{author}, owner => $args{owner_name} || $args{owner}); + if ($args{limits}) { + my @limits = (@{$args{limits}}, {format => 'Other', timeout => $args{timeout} }); + @limits = map { sprintf '%s (%s)', @{$_}{qw/timeout format/} } @limits; + $tree->look_down(smap => 'timeout')->replace_content(join ', ', @limits); + } if ($args{contest_stop}) { $tree->fid('solution')->detach; $tree->fid('solution_modal')->detach;