]> iEval git - plack-app-gruntmaster.git/commitdiff
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>
Thu, 5 Feb 2015 14:31:52 +0000 (16:31 +0200)
lib/Plack/App/Gruntmaster/HTML.pm
tmpl/ct_entry.en

index abb2779ce49f8576527343237f055676b42bcaee..87dc8b48837fa23dddbad6c30e0a3fe336596284 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};
        $tree->content_handler(
                start       => ftime   $args{start},
index 5a44866c2488e0f3eed2b9ee6d8a5786646e7034..ec16306ba86b115d10ca537ece00fa90afaf0089 100644 (file)
@@ -7,7 +7,7 @@
 
 <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.028248 seconds and 4 git commands to generate.