Permalink
Browse files

Show time even for no results

  • Loading branch information...
1 parent 8d6821f commit 1ac66e32fd9e1d09b00ff4b186e4bc65499c64b7 @dgl committed Jul 24, 2012
Showing with 3 additions and 2 deletions.
  1. +2 −1 lib/WWW/CPANGrep.pm
  2. +1 −1 share/html/results.html
View
@@ -106,7 +106,8 @@ sub render_response {
if($error || !@$results) {
return $output
- ->select('.divider')->replace_content(" ")
+ ->select('#result-count')->replace_content(" ")
+ ->select('#time')->replace_content(sprintf "%0.2f", $duration)
->select('.result')->replace_content($error || "No matches found.")
->select('.pagination')->replace("");
}
View
@@ -37,7 +37,7 @@
</div>
<div class="divider">
- <strong><span id="start-at">1</span> to <span id="end-at">20</span></strong> of <strong><span id="total">about 1,000,000</span> results</strong> (<span id="time">4.2</span> seconds)
+ <span id="result-count"><strong><span id="start-at">1</span> to <span id="end-at">20</span></strong> of <strong><span id="total">about 1,000,000</span> results</strong></span> (<span id="time">4.2</span> seconds)
</div>
<div class="results">

0 comments on commit 1ac66e3

Please sign in to comment.