From f34b3eac41f334d38380a5214180d30415637284 Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Thu, 5 Feb 2015 16:31:52 +0200 Subject: [PATCH] Hide editorial link before contest is finished --- lib/Plack/App/Gruntmaster/HTML.pm | 1 + tmpl/ct_entry.en | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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 @@ -- 2.30.2