From: Marius Gavrilescu Date: Mon, 16 Mar 2015 16:33:12 +0000 (+0200) Subject: Merge branch 'master' into newmc X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=3e9c060abdcab012619d36d2532ea2028f47f685;hp=-c;p=plack-app-gruntmaster.git Merge branch 'master' into newmc --- 3e9c060abdcab012619d36d2532ea2028f47f685 diff --combined lib/Plack/App/Gruntmaster/HTML.pm index ea99263,57b4e50..59ee377 --- a/lib/Plack/App/Gruntmaster/HTML.pm +++ b/lib/Plack/App/Gruntmaster/HTML.pm @@@ -71,7 -71,6 +71,7 @@@ sub _render sub process_skel { my ($tree, %args) = @_; + $tree->fid('logo')->replace_with(literal scalar read_file "mclogo.svg"); $tree->content_handler( title => $args{title}, content => literal $args{meat}); @@@ -150,6 -149,11 +150,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;