Hide editorial link before contest is finished
authorMarius Gavrilescu <marius@ieval.ro>
Thu, 5 Feb 2015 14:31:52 +0000 (16:31 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Tue, 10 Mar 2015 20:11:33 +0000 (22:11 +0200)
(cherry picked from commit f34b3eac41f334d38380a5214180d30415637284)

lib/Plack/App/Gruntmaster/HTML.pm
tmpl/ct_entry.en

index 9155503f278afcdcd16808d6d66e1b1ccfd1e39e..b4f863ad2187550ea35dd9ee242dc71111d4339a 100644 (file)
@@ -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});
index c18fba22885f54443b2cbc1df6fd78284165fc6b..13d2e9eb6e877c37c750992db96d3cb1c9c470b6 100644 (file)
@@ -10,7 +10,7 @@ Contest <span id="status">starts/ends</span> in: <span class="timer" data-stop="
 
 <div id="links">
 <a href="/pb/?contest=contest_id">Problems</a><br>
-<a href="/ed/contest_id">Editorial</a><br>
+<a href="/ed/contest_id" id="editorial">Editorial</a><br>
 <a href="/log/?contest=contest_id">Job log</a><br>
 <a href="/st/contest_id">Standings</a>
 </div>
This page took 0.011565 seconds and 4 git commands to generate.