X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=lib%2FPlack%2FApp%2FGruntmaster%2FHTML.pm;h=ce7ca7968d94cf733fd6e72d1b5f8d1584fd9d41;hb=00c887ce06707532ce45ad863139f79455480d24;hp=bdd20c2d183439a6ef7635abc3bf38b075282e82;hpb=a221db10cdbfda88bfab58aa45c820ab6d8f3fb6;p=plack-app-gruntmaster.git diff --git a/lib/Plack/App/Gruntmaster/HTML.pm b/lib/Plack/App/Gruntmaster/HTML.pm index bdd20c2..ce7ca79 100644 --- a/lib/Plack/App/Gruntmaster/HTML.pm +++ b/lib/Plack/App/Gruntmaster/HTML.pm @@ -114,6 +114,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}); @@ -277,6 +278,7 @@ sub process_st { sub process_ed { my ($tree, %args) = @_; + $tree->content_handler(editorial => literal $args{editorial}); my $iter = sub { my ($data, $div) = @_; $div->set_child_content(class => 'value', $data->{value});