From: Marius Gavrilescu Date: Wed, 25 Feb 2015 18:04:07 +0000 (+0200) Subject: Merge branch 'master' into newmc X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=750b40cb7cf4c9dbf2b85c18e3d0db172441facd;hp=-c;p=plack-app-gruntmaster.git Merge branch 'master' into newmc Conflicts: lib/Plack/App/Gruntmaster.pm --- 750b40cb7cf4c9dbf2b85c18e3d0db172441facd diff --combined lib/Plack/App/Gruntmaster/HTML.pm index 319a5e5,7fa63f5..66468ca --- 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}); @@@ -115,7 -114,6 +115,7 @@@ sub process_us sub process_ct_entry { my ($tree, %args) = @_; $_->edit_href (sub {s/contest_id/$args{id}/}) for $tree->find('a'); + $tree->fid('editorial')->detach unless $args{finished}; $tree->fid('links')->detach unless $args{started}; my $status = ($args{time} < $args{start} ? 'starts' : 'ends'); $tree->fclass('timer')->attr('data-stop', $status eq 'ends' ? $args{stop} : $args{start}); @@@ -287,6 -285,6 +287,6 @@@ sub process_ed $div->set_child_content(class => 'solution', literal $data->{solution}); $div->fclass('problem')->namedlink($data->{id}, $data->{name}); }; - my @pb = map { @{$args{$_}} } qw/beginner easy medium hard/; + my @pb = map { @{$args{$_} // []} } qw/beginner easy medium hard/; $tree->fclass('well')->iter3(\@pb, $iter); }