You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@roller.apache.org by gh...@apache.org on 2014/06/17 18:25:06 UTC

svn commit: r1603215 - /roller/trunk/app/src/main/webapp/themes/fauxcoly/search.vm

Author: ghuber
Date: Tue Jun 17 16:25:05 2014
New Revision: 1603215

URL: http://svn.apache.org/r1603215
Log:
Additional fix for ROL-1789. No using showWeblogSearchAgainForm.

Modified:
    roller/trunk/app/src/main/webapp/themes/fauxcoly/search.vm

Modified: roller/trunk/app/src/main/webapp/themes/fauxcoly/search.vm
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/webapp/themes/fauxcoly/search.vm?rev=1603215&r1=1603214&r2=1603215&view=diff
==============================================================================
--- roller/trunk/app/src/main/webapp/themes/fauxcoly/search.vm (original)
+++ roller/trunk/app/src/main/webapp/themes/fauxcoly/search.vm Tue Jun 17 16:25:05 2014
@@ -64,13 +64,15 @@
             <input type="text" id="q" name="q" size="10"
                 maxlength="255" value="$model.term"
                 style="padding-left: 1px" />
-            #set( $cats = $model.weblog.getWeblogCategories("nil") )
-            <select name="cat">
+            #set( $cats = $model.weblog.getWeblogCategories() )
+            #if($model.hits > 0 && !$cats.empty)
+              <select name="cat">
                 <option value="">$text.get( "macro.searchresults.incategory" )</option>
                 #foreach( $cat in $cats )
-                <option #if($cat.name == $model.weblogCategory.name)selected="selected"#end>$cat.name</option>
+                  <option #if($cat.name == $model.weblogCategory.name)selected="selected"#end>$cat.name</option>
                 #end
-           </select>
+             </select>
+           #end
            <input type="submit" value="$text.get( "macro.weblog.searchagain" )" />
         </form>
         $text.get( "macro.weblog.searchgoogle", [$model.term, $url.absoluteSite, $url.site, ${model.weblog.handle}] )