]> iEval git - gruntmaster-page.git/commitdiff
Remove previous/next when not relevant
authorMarius Gavrilescu <marius@ieval.ro>
Fri, 12 Dec 2014 15:01:05 +0000 (17:01 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Fri, 12 Dec 2014 15:01:05 +0000 (17:01 +0200)
lib/Plack/App/Gruntmaster/HTML.pm

index 26669c7da1c520d5b88d6b7b4b7aec55d9917f05..6921981215ac79bb7633f082436282a27065c785 100644 (file)
@@ -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}");
 }
 
This page took 0.028382 seconds and 4 git commands to generate.