From fddf958bbd161ab483e3cd28f49290a602b686d1 Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Fri, 12 Dec 2014 17:01:05 +0200 Subject: [PATCH] Remove previous/next when not relevant --- lib/Plack/App/Gruntmaster/HTML.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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}"); } -- 2.39.2