Author: jonathan
Date: Tue Jan 22 16:25:50 2008
New Revision: 12713
Log:
Added "show query..." link - consistent with "refine query..." (no results)
and "more results..." (more than 5 results.)
Modified:
trunk/mashup/java/modules/www/index.jsp
Modified: trunk/mashup/java/modules/www/index.jsp
==============================================================================
--- trunk/mashup/java/modules/www/index.jsp (original)
+++ trunk/mashup/java/modules/www/index.jsp Tue Jan 22 16:25:50 2008
@@ -282,7 +282,8 @@
<%
Iterator iter = results.getResults().iterator();
- if (!iter.hasNext()) { %>
+ boolean hasResults = iter.hasNext();
+ if (!hasResults) { %>
<tr class="noresults">
<td valign="top" colspan="4">
No results found.
@@ -385,15 +386,15 @@
}
nextId++;
}
- if (results.getResultCount() > MashupConstants.SHOW_RESULTS_COUNT) { %>
-<tr>
- <td colspan="5">
- <div class="more"><a
- href="search.jsp?<%=QueryParamUtils.paramsFromQuery(queryPath,
params)%>&controls=false">more
- results...</a></div>
- </td>
-</tr>
-<% } %>
+ if (hasResults) { %>
+ <tr>
+ <td colspan="5">
+ <div class="more"><a
+
href="search.jsp?<%=QueryParamUtils.paramsFromQuery(queryPath,
params)%>&controls=false">
+ <% if (results.getResultCount() >
MashupConstants.SHOW_RESULTS_COUNT) { %>more results...<% } else { %>show
query...<% } %></a></div>
+ </td>
+ </tr>
+ <% } %>
</tbody>
</table>
<br/>
_______________________________________________
Mashup-dev mailing list
[email protected]
http://www.wso2.org/cgi-bin/mailman/listinfo/mashup-dev