From fd15256b2c8997bdda94c1ebadb15d86a280d9d4 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 (cherry picked from commit f34b3eac41f334d38380a5214180d30415637284) --- 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 9155503..b4f863a 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}); diff --git a/tmpl/ct_entry.en b/tmpl/ct_entry.en index c18fba2..13d2e9e 100644 --- a/tmpl/ct_entry.en +++ b/tmpl/ct_entry.en @@ -10,7 +10,7 @@ Contest starts/ends in: Problems
-Editorial
+Editorial
Job log
Standings -- 2.30.2