You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@roller.apache.org by ag...@apache.org on 2006/07/29 02:15:06 UTC
svn commit: r426715 - in /incubator/roller/branches/roller_3.0/web:
WEB-INF/velocity/weblog.vm themes/andreas08/Weblog.vm
Author: agilliland
Date: Fri Jul 28 17:15:05 2006
New Revision: 426715
URL: http://svn.apache.org/viewvc?rev=426715&view=rev
Log:
a little cleanup on new search macros.
- new showWeblogSearchForm() macro supports a param to toggle display of category chooser on and off.
- cleaned up a few things in new search again macro.
Modified:
incubator/roller/branches/roller_3.0/web/WEB-INF/velocity/weblog.vm
incubator/roller/branches/roller_3.0/web/themes/andreas08/Weblog.vm
Modified: incubator/roller/branches/roller_3.0/web/WEB-INF/velocity/weblog.vm
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_3.0/web/WEB-INF/velocity/weblog.vm?rev=426715&r1=426714&r2=426715&view=diff
==============================================================================
--- incubator/roller/branches/roller_3.0/web/WEB-INF/velocity/weblog.vm (original)
+++ incubator/roller/branches/roller_3.0/web/WEB-INF/velocity/weblog.vm Fri Jul 28 17:15:05 2006
@@ -555,19 +555,21 @@
#**
Show search form for a weblog.
*#
-#macro(showWeblogSearchForm $weblog)
+#macro(showWeblogSearchForm $weblog $showCatChooser)
<form id="searchForm" method="get" action="$url.search"
style="margin: 0; padding: 0" onsubmit="return validateSearch(this)">
<p>
<input type="text" id="q" name="q" size="20"
maxlength="255" value="#if($term)$term#end" />
- #set( $cats = $model.weblog.getWeblogCategories("nil") )
- <select name="c">
- <option value="">- In Category -</option>
- #foreach( $cat in $cats )
+ #if( $showCatChooser )
+ #set( $cats = $model.weblog.getWeblogCategories("nil") )
+ <select name="cat">
+ <option value="">- In Category -</option>
+ #foreach( $cat in $cats )
<option #if($cat.name == $model.term)selected="selected"#end>$cat.name</option>
+ #end
+ </select>
#end
- </select>
<input type="submit" value="$text.get( "macro.weblog.searchbutton" )" />
</p>
</form>
@@ -591,14 +593,13 @@
<div id="searchAgain">
$text.get( "macro.weblog.searchdictionary", [$model.term, $model.term, $model.term] )
$text.get( "macro.weblog.searchhits", [$model.hits])
- <form method="get" action="$url.search"
- style="margin: 5px">
+ <form method="get" action="$url.search" style="margin: 5px">
<input type="text" id="q" name="q" size="31"
- maxlength="255" value="$searchResults.term"
+ maxlength="255" value="$model.term"
style="padding-left: 1px" /><br />
#set( $cats = $model.weblog.getWeblogCategories("nil") )
- <select name="c">
+ <select name="cat">
<option value="">- Restrict By Category -</option>
#foreach( $cat in $cats )
<option #if($cat.name == $model.term)selected="selected"#end>$cat.name</option>
@@ -610,8 +611,6 @@
$text.get( "macro.weblog.searchgoogle", [$searchResults.term, $url.absoluteSite, $url.site, ${website.handle}] )
</div>
- <!-- searchhi script hangs firefox, commenting it out for now -->
- <!-- script type="text/javascript" src="$url.site/theme/scripts/searchhi.js"></script -->
#end
Modified: incubator/roller/branches/roller_3.0/web/themes/andreas08/Weblog.vm
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_3.0/web/themes/andreas08/Weblog.vm?rev=426715&r1=426714&r2=426715&view=diff
==============================================================================
--- incubator/roller/branches/roller_3.0/web/themes/andreas08/Weblog.vm (original)
+++ incubator/roller/branches/roller_3.0/web/themes/andreas08/Weblog.vm Fri Jul 28 17:15:05 2006
@@ -65,7 +65,7 @@
<div class="small" id="calendar">#showWeblogEntryCalendar($model.weblog "nil")</div>
<div id="searchbar">
<h2>Search This Site</h2>
- #showWeblogSearchForm($model.weblog)
+ #showWeblogSearchForm($model.weblog false)
</div>
<h2>Recent Entries</h2>