[Yanel-commits] rev 43991 - public/yanel/trunk/src/contributions/resources/search/htdocs

michi at wyona.com michi at wyona.com
Wed Aug 5 09:47:40 CEST 2009


Author: michi
Date: 2009-08-05 09:47:40 +0200 (Wed, 05 Aug 2009)
New Revision: 43991

Modified:
   public/yanel/trunk/src/contributions/resources/search/htdocs/results2xhtml.xsl
Log:
check if a query was actually submitted

Modified: public/yanel/trunk/src/contributions/resources/search/htdocs/results2xhtml.xsl
===================================================================
--- public/yanel/trunk/src/contributions/resources/search/htdocs/results2xhtml.xsl	2009-08-05 07:36:16 UTC (rev 43990)
+++ public/yanel/trunk/src/contributions/resources/search/htdocs/results2xhtml.xsl	2009-08-05 07:47:40 UTC (rev 43991)
@@ -40,9 +40,10 @@
         <hr/>
 
         <xsl:apply-templates select="/y:search/y:exception"/>
+        <xsl:apply-templates select="/y:search/y:no-query"/>
         <p>Search results provider: <xsl:value-of select="/y:search/y:provider"/></p>
         <xsl:apply-templates select="/y:search/y:results"/>
-        <xsl:if test="not(/y:search/y:results) and not(/y:search/y:exception)">
+        <xsl:if test="not(/y:search/y:results) and not(/y:search/y:exception) and not(/y:search/y:no-query)">
           <p>Your search - <xsl:value-of select="/y:search/y:query"/> - did not match any documents</p>
         </xsl:if>
 
@@ -67,6 +68,13 @@
     <xsl:value-of select="."/>
     </p>
   </xsl:template>
+
+  <xsl:template match="y:no-query">
+    <h2><font color="red">Warning:</font></h2>
+    <p>
+    No query was specified! Please make sure to enter a search term.
+    </p>
+  </xsl:template>
   
   <xsl:template match="@*|node()" priority="-1">
     <xsl:copy>



More information about the Yanel-commits mailing list