]> iEval git - gruntmaster-page.git/commitdiff
Merge branch 'master' into newmc
authorMarius Gavrilescu <marius@ieval.ro>
Sat, 21 Mar 2015 11:36:45 +0000 (13:36 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Sat, 21 Mar 2015 11:36:45 +0000 (13:36 +0200)
1  2 
lib/Plack/App/Gruntmaster/HTML.pm

index 59ee37734ab42b8d1918fd07a05f293b58b5c530,1e0f7889870101de3c74c793ac537e51bfc99b98..382641ed0227c69124352ecfcc577de2f504a9e9
@@@ -71,7 -71,6 +71,7 @@@ sub _render 
  
  sub process_skel {
        my ($tree, %args) = @_;
 +      $tree->fid('logo')->replace_with(literal scalar read_file "mclogo.svg");
        $tree->content_handler(
                title   =>         $args{title},
                content => literal $args{meat});
@@@ -172,8 -171,8 +172,8 @@@ sub process_pb_entry 
                $tree->fid('nosubmit')->detach;
                $tree->look_down(name => 'problem')->attr(value => $args{id});
                my $contest = $tree->look_down(name => 'contest');
-               $contest->attr(value => $args{contest}) if $args{contest};
-               $contest->detach unless $args{contest}
+               $contest->attr(value => $args{args}{contest}) if $args{args}{contest};
+               $contest->detach unless $args{args}{contest}
        } else {
                $tree->fid('nosubmit')->find('a')->edit_href(sub{s/id/$args{id}/});
                $tree->fid('submit')->detach
@@@ -237,7 -236,7 +237,7 @@@ sub process_log 
                my ($data, $tr) = @_;
                $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('problem')->find('a')->edit_href(sub{$_ .= "?contest=$args{args}{contest}"}) if $args{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});
This page took 0.028665 seconds and 4 git commands to generate.