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=fd15256b2c8997bdda94c1ebadb15d86a280d9d4;p=plack-app-gruntmaster.git Hide editorial link before contest is finished (cherry picked from commit f34b3eac41f334d38380a5214180d30415637284) --- 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