From: Marius Gavrilescu Date: Sat, 7 Feb 2015 09:13:17 +0000 (+0200) Subject: Highlight private jobs and problems X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=a33e01dd99675a6b875dc923a30329978a3b164e;p=plack-app-gruntmaster.git Highlight private jobs and problems --- diff --git a/lib/Plack/App/Gruntmaster/HTML.pm b/lib/Plack/App/Gruntmaster/HTML.pm index 117d1b4..52afd11 100644 --- a/lib/Plack/App/Gruntmaster/HTML.pm +++ b/lib/Plack/App/Gruntmaster/HTML.pm @@ -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;