From: Marius Gavrilescu Date: Fri, 12 Dec 2014 15:01:05 +0000 (+0200) Subject: Remove previous/next when not relevant X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=fddf958bbd161ab483e3cd28f49290a602b686d1;p=gruntmaster-page.git Remove previous/next when not relevant --- diff --git a/lib/Plack/App/Gruntmaster/HTML.pm b/lib/Plack/App/Gruntmaster/HTML.pm index 26669c7..6921981 100644 --- a/lib/Plack/App/Gruntmaster/HTML.pm +++ b/lib/Plack/App/Gruntmaster/HTML.pm @@ -216,8 +216,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}"); }