WebSearch
Log-in
|
Main
:
Welcome to your wiki
>
WebSearch
Top Menu
Show
:
Comments
Attachments
History
Information
Stampa
:
Stampa
Anteprima di stampa
Esporta come PDF
Esporta in formato RTF
Esporta come HTML
Esporta in formato XAR
Wiki source code of
WebSearch
Hide line numbers
1: $xwiki.jsfx.use("uicomponents/search/search.js", false)## 2: $xwiki.ssfx.use("uicomponents/search/search.css", true)## 3: ## Disable the document extra data: comments, attachments, history... 4: #set($docextras = []) 5: ## --------------- 6: ## Space filtering 7: ## --------------- 8: #set($spaces = $xwiki.spaces) 9: #set($selectedSpace = "$!request.space") 10: ## --------------- 11: ## Space macros 12: ## --------------- 13: #macro(spaceoption $space $selectedSpace) 14: <option value="${space}" #if($selectedSpace == $space)selected="selected"#end>$space</option> 15: #end 16: #macro(spaceselect $selectedSpace $spaces) 17: <select name="space" title="$msg.get(’xe.search.bar.spaces.title’)"> 18: <option value="" #if($selectedSpace == ’’)selected="selected"#end>$msg.get(’xe.search.bar.spaces.all’)</option> 19: #foreach($space in $spaces) 20: #if (!$blacklistedSpaces.contains($space)) 21: #spaceoption($space $selectedSpace) 22: #end 23: #end 24: </select> 25: #end 26: ## 27: ## 28: #set($text = "$!request.getParameter(’text’)") 29: #set($utext = $util.encodeURI($text)) 30: #if($selectedSpace == ’’) 31: #set($url = $xwiki.getURL(’Main.WebSearchRss’, ’view’, "xpage=plain&text=${utext}" )) 32: #else 33: #set($url = $xwiki.getURL(’Main.WebSearchRss’, ’view’, "xpage=plain&space=${selectedSpace}&text=${utext}")) 34: #end 35: ## 36: <h1><span> 37: <a style="float: right;" href="$url"><img src="$xwiki.getSkinFile(’icons/silk/feed.gif’)" alt="$msg.get(’xe.rss.icon’)" /></a> 38: $msg.get(’xe.search.title’)</span> 39: </h1> 40: ## 41: <form action="" id="searchBar"> 42: {pre} 43: <div class="centered"> 44: <input type="text" name="text" class="searchQuery #if($text == ’’) defaultText#end" #if($text == ’’) value="$msg.get(’xe.search.bar.query.tip’)" #else value="$xwiki.getXMLEncoded(${text})" #end title="$msg.get(’xe.search.bar.query.title’)"/> 45: #spaceselect($selectedSpace $spaces) 46: <input type="submit" class="searchButton" value="$msg.get(’xe.search.bar.submit’)" title="$msg.get(’xe.search.bar.submit.title’)"/> 47: </div> 48: {/pre} 49: </form> 50: ## 51: #set($space = $selectedSpace) 52: #includeInContext("XWiki.WebSearchCode") 53: #includeInContext("XWiki.Results") 54: ## 55: #set($luceneSearch = "[$msg.get(’xe.search.lucene’)>Main.LuceneSearch?text=$!utext]") 56: #info($msg.get(’xe.search.lucene.try’, [$luceneSearch]))
Search
Quick Links
Wiki Dashboard
Document Index
Blog
Sandbox
My Recent Modifications
dany
|
marco