From: Marius Gavrilescu Date: Thu, 5 Feb 2015 14:31:52 +0000 (+0200) Subject: Hide editorial link before contest is finished X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=f34b3eac41f334d38380a5214180d30415637284;p=plack-app-gruntmaster.git Hide editorial link before contest is finished --- diff --git a/lib/Plack/App/Gruntmaster/HTML.pm b/lib/Plack/App/Gruntmaster/HTML.pm index abb2779..87dc8b4 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}; $tree->content_handler( start => ftime $args{start}, diff --git a/tmpl/ct_entry.en b/tmpl/ct_entry.en index 5a44866..ec16306 100644 --- a/tmpl/ct_entry.en +++ b/tmpl/ct_entry.en @@ -7,7 +7,7 @@