summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2012-03-19 22:15:31 -0400
committerJames Moger <james.moger@gitblit.com>2012-03-19 22:15:31 -0400
commit22a8a61991c4364632dd4faafa21edc33b06c257 (patch)
tree0461b9c8b697ab2961838c7ad2dc7532abaa58c9
parent4e1930a8d9a4e1e90dadf36641f491fdda09f216 (diff)
downloadgitblit-22a8a61991c4364632dd4faafa21edc33b06c257.tar.gz
gitblit-22a8a61991c4364632dd4faafa21edc33b06c257.zip
Indicate 0 search results
-rw-r--r--src/com/gitblit/wicket/pages/LuceneSearchPage.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/com/gitblit/wicket/pages/LuceneSearchPage.java b/src/com/gitblit/wicket/pages/LuceneSearchPage.java
index 8e09a340..69fb9203 100644
--- a/src/com/gitblit/wicket/pages/LuceneSearchPage.java
+++ b/src/com/gitblit/wicket/pages/LuceneSearchPage.java
@@ -156,8 +156,13 @@ public class LuceneSearchPage extends RootPage {
// results header
if (results.size() == 0) {
- add(new Label("resultsHeader").setVisible(false));
- add(new Label("resultsCount").setVisible(false));
+ if (!ArrayUtils.isEmpty(searchRepositories) && !StringUtils.isEmpty(query)) {
+ add(new Label("resultsHeader", query).setRenderBodyOnly(true));
+ add(new Label("resultsCount", "0 hits").setRenderBodyOnly(true));
+ } else {
+ add(new Label("resultsHeader").setVisible(false));
+ add(new Label("resultsCount").setVisible(false));
+ }
} else {
add(new Label("resultsHeader", query).setRenderBodyOnly(true));
add(new Label("resultsCount", MessageFormat.format("results {0} - {1} ({2} hits)",