]> iEval git - plack-app-gruntmaster.git/commitdiff
Highlight private jobs and problems
authorMarius Gavrilescu <marius@ieval.ro>
Sat, 7 Feb 2015 09:13:17 +0000 (11:13 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Sat, 7 Feb 2015 09:13:17 +0000 (11:13 +0200)
lib/Plack/App/Gruntmaster/HTML.pm

index 117d1b4be5ac7f2567394ca8d9d4522621f0cc1b..52afd1129128f719d235a7bf4017ac2115e31418 100644 (file)
@@ -183,6 +183,7 @@ sub process_pb {
                $tr->fclass('name')->namedlink($data->{id}, $data->{name});
                $tr->fclass('name')->find('a')->edit_href(sub {$_ .= "?contest=$args{contest}"}) if $args{contest};
                $tr->fclass('owner')->namedlink($data->{owner}, $data->{owner_name});
+               $tr->find('td')->attr(class => $tr->find('td')->attr('class').' warning') if $data->{private};
        };
        my $iter = sub {
                my ($data, $div) = @_;
@@ -235,6 +236,7 @@ sub process_log {
                $tr->fclass('owner')->namedlink($data->{owner}, $data->{owner_name});
                $tr->fclass('result_text')->replace_content($data->{result_text});
                $tr->fclass('result_text')->attr(class => "r$data->{result}");
+               $tr->find('td')->attr(class => $tr->find('td')->attr('class').' warning') if $data->{private};
        };
        $tree->find('table')->find('tbody')->find('tr')->iter3($args{log}, $iter);
        $args{next_page} ? $tree->fclass('next')->namedlink($args{next_page}, 'Next') : $tree->fclass('next')->detach;
This page took 0.026591 seconds and 4 git commands to generate.