X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=lib%2FPlack%2FApp%2FGruntmaster%2FHTML.pm;h=f0952cf6228cc468aa77155a9a30a28581853591;hb=f1c090e7ae6e91f4fcaa690466524adb94afdf08;hp=26669c7da1c520d5b88d6b7b4b7aec55d9917f05;hpb=c5ff0b0939c991eadcd5c9026268bcd0f12c8a45;p=gruntmaster-page.git diff --git a/lib/Plack/App/Gruntmaster/HTML.pm b/lib/Plack/App/Gruntmaster/HTML.pm index 26669c7..f0952cf 100644 --- a/lib/Plack/App/Gruntmaster/HTML.pm +++ b/lib/Plack/App/Gruntmaster/HTML.pm @@ -79,6 +79,7 @@ sub process_skel { sub process_us_entry { my ($tree, %args) = @_; $tree->fid($_)->attr('href', "/$_/?owner=$args{id}") for qw/log pb/; + $tree->fid('track_user')->attr('data-user', $args{id}); my @solved = map { $_->{solved} ? ($_->{problem}) : () } @{$args{problems}}; my @attempted = map { !$_->{solved} ? ($_->{problem}) : () } @{$args{problems}}; @@ -216,8 +217,8 @@ sub process_log { $tr->fclass('result_text')->attr(class => "r$data->{result}"); }; $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')->attr(class => 'next disabled'); - $args{previous_page} ? $tree->fclass('previous')->namedlink($args{previous_page}, 'Previous') : $tree->fclass('previous')->attr(class => 'previous disabled'); + $args{next_page} ? $tree->fclass('next')->namedlink($args{next_page}, 'Next') : $tree->fclass('next')->detach; + $args{previous_page} ? $tree->fclass('previous')->namedlink($args{previous_page}, 'Previous') : $tree->fclass('previous')->detach; $tree->fclass('current')->replace_content("Page $args{current_page} of $args{last_page}"); }