X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=lib%2FPlack%2FApp%2FGruntmaster%2FHTML.pm;h=8f47616eaf4e9446ee550c774b62e60972e49e2b;hb=52a7850b7a5c640391ab280394a9b1a79096db70;hp=abb2779ce49f8576527343237f055676b42bcaee;hpb=645cfb7d047f81aa613d6d68436a972f5db103ee;p=plack-app-gruntmaster.git diff --git a/lib/Plack/App/Gruntmaster/HTML.pm b/lib/Plack/App/Gruntmaster/HTML.pm index abb2779..8f47616 100644 --- a/lib/Plack/App/Gruntmaster/HTML.pm +++ b/lib/Plack/App/Gruntmaster/HTML.pm @@ -226,6 +226,8 @@ sub process_log { $tr->fclass('id')->namedlink($data->{id}); $tr->fclass('problem')->namedlink($data->{problem}, $data->{problem_name}); $tr->fclass('problem')->find('a')->edit_href(sub{$_ .= "?contest=$args{contest}"}) if $args{contest}; + $tr->fclass('contest')->namedlink($data->{contest}, $data->{contest_name}) if $data->{contest}; + $tr->fclass('contest')->replace_content('None') unless $data->{contest}; $tr->fclass('date')->replace_content(ftime $data->{date}); $tr->fclass('format')->replace_content($data->{format}); $tr->fclass('size')->namedlink("$data->{id}.$data->{extension}", sprintf "%.2fKB", $data->{size}/1024); @@ -254,6 +256,7 @@ sub process_st { my ($data, $th) = @_; $th->attr(class => undef); $th->namedlink(@$data); + $th->find('a')->edit_href(sub{s/$/?contest=$args{args}{contest}/}); }; $tree->fclass('problem')->iter3($args{problems}, $pbiter); my $iter = sub {