Author: tmortagne
Date: 2007-11-07 13:19:07 +0100 (Wed, 07 Nov 2007)
New Revision: 5691
Modified:
xwiki-products/xwiki-enterprise/branches/xwiki-enterprise-1.1/wiki/src/main/resources/Main/LuceneSearch
xwiki-products/xwiki-enterprise/branches/xwiki-enterprise-1.1/wiki/src/main/resources/XWiki/Results
Log:
XE-97: Improve Lucene Search page to be as good as the default search
* apply correction made to 1.2 branch to 1.1 branch
Modified:
xwiki-products/xwiki-enterprise/branches/xwiki-enterprise-1.1/wiki/src/main/resources/Main/LuceneSearch
===================================================================
---
xwiki-products/xwiki-enterprise/branches/xwiki-enterprise-1.1/wiki/src/main/resources/Main/LuceneSearch
2007-11-07 12:17:32 UTC (rev 5690)
+++
xwiki-products/xwiki-enterprise/branches/xwiki-enterprise-1.1/wiki/src/main/resources/Main/LuceneSearch
2007-11-07 12:19:07 UTC (rev 5691)
@@ -6,15 +6,15 @@
<language></language>
<defaultLanguage>en</defaultLanguage>
<translation>0</translation>
-<parent></parent>
+<parent>Main.WebSearch</parent>
<creator>XWiki.Admin</creator>
<author>XWiki.Admin</author>
<customClass></customClass>
<contentAuthor>XWiki.Admin</contentAuthor>
<creationDate>1186588178000</creationDate>
-<date>1186942604000</date>
-<contentUpdateDate>1186942604000</contentUpdateDate>
-<version>1.2</version>
+<date>1191330909000</date>
+<contentUpdateDate>1191330909000</contentUpdateDate>
+<version>45.1</version>
<title></title>
<template></template>
<defaultTemplate></defaultTemplate>
@@ -25,8 +25,8 @@
<filename>next.png</filename>
<filesize>395</filesize>
<author>XWiki.Admin</author>
-<date>1186927318000</date>
-<version>1.1</version>
+<date>1191242195000</date>
+<version>1.2</version>
<comment></comment>
<content>iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAEdSURBVDjLY/j//z8DJZiB6gY0rH7xpW7li3YKDHj1v2bli38lix61k2VA5fJn/9eeeP+/fcOL/wlT7/aRbEDegkf/Vxx/93/xobf/S5c8/u/ecm0eSQYkTX/4f+HBN/8nbX/xf+bul/8Tp9/9r1N0dgnRBgT33QZqfPW/YdXj/42rH//v2vjkv3fHtf9SScceEWWAc8u1/xO2Pv9fsvjB//IlD4CGPPrvXH/5v2Tksc1EGWBaful/+/on/4sW3gfGxsP/9lUX/ksEH1gj6rqdhSgDlPPO/q9b8fB/5bIH/23LL/wXD9i7kqRAlEo6+b908f3/NiXn/4t57V1EcjRKRB75b1145r+o684FZCUkMb8D/0Uct88euMxEKgYA7Ojrv4CgE7EAAAAASUVORK5CYII=</content>
</attachment>
@@ -34,8 +34,8 @@
<filename>previous.png</filename>
<filesize>389</filesize>
<author>XWiki.Admin</author>
-<date>1186927329000</date>
-<version>1.1</version>
+<date>1191242195000</date>
+<version>1.2</version>
<comment></comment>
<content>iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAEXSURBVDjLY/j//z8DJZiBLgZkz37Ynjrz4ReyDEideb89afrDf5ET7v4n2YCEqXf7qpY9/T9r76v/Xu03STMgasLteaVLHv+fufvl/6k7X/y3qrlCvAHBvTeXFC54ANbctv7p/95Nz/5rFZ0nzoCAzpuPsuc++D91x4v/jasf/y9aeP9/89rH/6VTTxJngGPDtc3xU+/879789H/5kgf/02fd+V+17OF/yZhjxBmgVXCaRT3v7BqP1mv/a1Y+/J824/b/woX3/osHHSAtECVjjqy0Lb/wP2/+3f+Zs+/8F3XfS3o0inntXWSeffJ/0tRb/0Ucdv4nKyEJW25ZYBh/5L+w5fb/ZCdlQYMNs4WMt/wfuMyEDwMA0Irn/pDRT58AAAAASUVORK5CYII=</content>
</attachment>
@@ -72,107 +72,202 @@
<tags/>
</property>
</object>
-<content>## ===================
-## Lucene search
-## ===================
-## Inputs : $request.text
-## Outputs : $list, $isScored
-## ===================
-
-1 Search
-
-#set($query = $request.getParameter("text"))
-#if(!$query)
- #set($query = "")
-#end
-#set($itemsPerPage = "30")
-
-{pre}
-<form action="$doc.name" method="post">
-<div>
-<input type="text" name="text" value="$query" />
-<input type="submit" value="Search"/>
-</div>
-</form>
-{/pre}
-
-#if($query != "")
- #set($lucene = $xwiki.getPlugin("lucene"))
- #if($lucene)
- ## ---------------
- ## Lucene search
- ## ---------------
- #set($wikinames = "xwiki")
- #set($languages = "default,en,de")
- #set($firstIndex = $request.getParameter("firstIndex"))
- #if(!$firstIndex)
- #set($firstIndex = "1")
- #end
- #set($searchresults = $lucene.getSearchResults($query,
$wikinames, $languages, $xwiki))
- #set($results =
$searchresults.getResults($firstIndex,$itemsPerPage))
- #if($searchresults.getHitcount()>0)
- ## -----------------
- ## Results numbers
- ## -----------------
- #set($lastIndex=$searchresults.getEndIndex($firstIndex,
$itemsPerPage))
- #if($searchresults.getHitcount()==1)
- One result:
- #else
- Results $firstIndex - $lastIndex of
${searchresults.getHitcount()}:
- #end
- ## ---------------
- ## Previous page
- ## ---------------
- #if($searchresults.hasPrevious($firstIndex))
- #set($linkfirstIndex =
$searchresults.getPreviousIndex($firstIndex,$itemsPerPage))
- #set($link =
"${doc.name}?text=${query}&firstIndex=${linkfirstIndex}")
- {pre}
- <a href="$link"><img
src="${doc.getAttachmentURL("previous.png")}" alt="previous" />previous
page</a>
- {/pre}
- #end
- ## -------------
- ## Next page
- ## -------------
- #if($searchresults.hasNext($firstIndex,$itemsPerPage))
- #set($linkfirstIndex =
$searchresults.getNextIndex($firstIndex,$itemsPerPage))
- #set($link =
"${doc.name}?text=${query}&firstIndex=${linkfirstIndex}")
- {pre}
- <a href="$link"><img
src="${doc.getAttachmentURL("next.png")}" alt="next" />next page</a>
- {/pre}
- #end
-
- ## -----------------
- ## Display results
- ## -----------------
- #set ($list = $results)
- #set ($isScored = true)
- #includeInContext("XWiki.Results")
- #end
- #else
- #error("Lucene plugin not found. Make sure it's defined in your
xwiki.cfg file.")
- #end
-#end
-
-#set($lucene = $xwiki.getPlugin("lucene"))
-#if($lucene)
-#set($doRebuild = $request.getParameter("rebuild"))
-#if($doRebuild)
- #if($doRebuild=="yes")
- #set($documentCount = $lucene.rebuildIndex($xwiki,$context))
- #if(${documentCount}>=0)
- #info("Started index rebuild with $documentCount
documents.\\
- Will take some time depending on the number of
pages/attachments.")
- #else
- #error("Index rebuild failed.")
- #end
- #end
-#else
- #if($xwiki.hasAdminRights())
- #info("[Rebuild the Lucene
index>${doc.web}.${doc.name}?rebuild=yes]")
- #end
-#end
-#end
-
-#info("This is the new experimental Lucene search engine.\\
- You can still use the XWiki [default search
engine>WebSearch?text=$query].")</content>
+<content>## ===================
+## Lucene search
+## ===================
+## Inputs : $request.text
+## Outputs : $list, $isScored
+## ===================
+{pre}
+#set ($displayUI = true)
+#if ($request.xpage && $request.xpage == "rdf")
+ #set ($displayUI = false)
+#end
+## ---------------
+## Title
+## ---------------
+#if ($displayUI)
+{/pre}
+1 Search
+{pre}
+#end
+## ---------------
+## Space filtering
+## ---------------
+#if($request.space && $request.space != "")
+ #set($space = $request.space)
+ #set($reqspace = "AND web:${space}")
+#else
+ #set($space = "")
+#end
+#set($spacesText = {})
+#set($spaces = $xwiki.spaces)
+#set($ok = $spacesText.put("All",""))
+#foreach($space in $spaces)
+ #set($ok = $spacesText.put($space,$space))
+#end
+## ---------------
+## Space macros
+## ---------------
+#macro(spaceoption $space $selectspace $spacesText)
+ <option value="$spacesText.get($space)" #if($selectspace ==
$spacesText.get($space))selected="selected"#end>$space</option>
+#end
+#macro(spaceselect $selectspace $spaces $spacesText)
+ <select name="space">
+ #spaceoption("All" $selectspace $spacesText)
+ #foreach($space in $spaces)
+ #spaceoption($space $selectspace $spacesText)
+ #end
+ </select>
+#end
+## ---------------
+## Query preparation
+## ---------------
+#set($text = $request.getParameter("text"))
+#set($query = $text)
+#if(!$query)
+ #set($query = "")
+#end
+#set($itemsPerPage = "30")
+## ---------------
+## RSS link
+## ---------------
+#set($utext = $xwiki.getURLEncoded($query))
+#if($space == "")
+ #set($url = $xwiki.getURL($doc.fullName, "view",
"xpage=rdf&amp;text=${utext}" ))
+#else
+ #set($url = $xwiki.getURL($doc.fullName, "view",
"xpage=rdf&space=$space&text=${utext}"))
+#end
+#if ($displayUI)
+<div style="float: right;">
+ <a href="$url"><img src="$xwiki.getSkinFile("icons/black-rss.png")"
style="border:0px" alt="rss icon" /></a>
+</div>
+## ---------------
+## Query form
+## ---------------
+<form action="$doc.name" method="get">
+<div class="centered">
+Query <input type="text" name="text" value="$query" /> in space
#spaceselect($space $spaces $spacesText) <input type="submit"
value="Search"/>
+</div>
+</form>
+#end
+{/pre}
+## ---------------
+## Results processing
+## ---------------
+#if($query != "")
+ #set($lucene = $xwiki.getPlugin("lucene"))
+ #if($lucene)
+ ## ---------------
+ ## Lucene search
+ ## ---------------
+ #set($wikinames = "xwiki")
+ #set($languages = "default,en,de")
+ #set($firstIndex = $request.getParameter("firstIndex"))
+ #if(!$firstIndex)
+ #set($firstIndex = "1")
+ #end
+ #set($searchresults =
$lucene.getSearchResults("${query}$!{reqspace}", $wikinames, $languages,
$xwiki))
+ #set($results =
$searchresults.getResults($firstIndex,$itemsPerPage))
+ #if($searchresults.getHitcount()>0)
+ ## -----------------
+ ## Results numbers
+ ## -----------------
+
#set($lastIndex=$searchresults.getEndIndex($firstIndex, $itemsPerPage))
+ #if ($displayUI)
+ #if($searchresults.getHitcount()==1)
+ One result:
+ #else
+ Results $firstIndex - $lastIndex of
${searchresults.getHitcount()}:
+ #end
+ #end
+ ## ---------------
+ ## Previous page
+ ## ---------------
+ #if($searchresults.hasPrevious($firstIndex) &&
$displayUI)
+ #set($linkfirstIndex =
$searchresults.getPreviousIndex($firstIndex,$itemsPerPage))
+ #set($link =
"${doc.name}?text=${query}&firstIndex=${linkfirstIndex}")
+ {pre}
+ <a href="$link"><img
src="${doc.getAttachmentURL("previous.png")}" alt="previous" />previous
page</a>
+ {/pre}
+ #end
+ ## -------------
+ ## Next page
+ ## -------------
+ #if($searchresults.hasNext($firstIndex,$itemsPerPage)
&& $displayUI)
+ #set($linkfirstIndex =
$searchresults.getNextIndex($firstIndex,$itemsPerPage))
+ #set($link =
"${doc.name}?text=${query}&firstIndex=${linkfirstIndex}")
+ {pre}
+ <a href="$link"><img
src="${doc.getAttachmentURL("next.png")}" alt="next" />next page</a>
+ {/pre}
+ #end
+ ## -----------------
+ ## Display results
+ ## -----------------
+ #if ($request.xpage && $request.xpage == "rdf")
+ #set ($baseurl = "http://${request.serverName}")
+ #set ($description = "RSS feed for search on
'$text'")
+ #set ($list = $xwiki.arrayList)
+ #foreach ($item in $results)
+ #if ($item.type != "attachment")
+ #set ($ok = $list.add(0,
"${item.web}.${item.name}"))
+ #end
+ #end
+ #set ($ok = $response.setContentType("text/xml"))
+ #includeInContext("XWiki.WebRssCode")
+ #else
+ #set ($list = $results)
+ #set ($isScored = true)
+ #includeInContext("XWiki.Results")
+ #end
+ #end
+ #else
+ #error("Lucene plugin not found. Make sure it's defined in your
xwiki.cfg file.")
+ #end
+#end
+{pre}
+#if ($displayUI)
+## ---------------
+## Rebuild processing
+## ---------------
+#set($lucene = $xwiki.getPlugin("lucene"))
+#if($lucene)
+#set($doRebuild = $request.getParameter("rebuild"))
+#if($doRebuild)
+ #if($doRebuild=="yes")
+ #set($documentCount = $lucene.rebuildIndex($xwiki,$context))
+ #if(${documentCount}>=0)
+ {/pre}#info("Started index rebuild with $documentCount
documents.\\
+ Will take some time depending on the number of
pages/attachments."){pre}
+ #else
+ #error("Index rebuild failed.")
+ #end
+ #end
+#else
+## ---------------
+## Queue & rebuild option
+## ---------------
+ #set ($queuesize = $xwiki.lucene.getQueueSize())
+ #if ($queuesize > 2)
+ #set($info1 = "Lucene is currently building its index,
${queuesize} documents in queue.")
+ #else
+ #set($info1 = "Lucene index is up to date.")
+ #end
+ #if($xwiki.hasAdminRights())
+ #set($info2 = " [Rebuild the Lucene
index>${doc.web}.${doc.name}?rebuild=yes].")
+ #else
+ #set($info2 = "")
+ #end
+ {/pre}#info("${info1}${info2}"){pre}
+#end
+#end
+## ---------------
+## Comment
+## ---------------
+{/pre}
+#info("This is the new experimental Lucene search engine. \\
+ You can still use the XWiki [default search
engine>WebSearch?text=$query].")
+{pre}
+#end
+{/pre}</content>
</xwikidoc>
Modified:
xwiki-products/xwiki-enterprise/branches/xwiki-enterprise-1.1/wiki/src/main/resources/XWiki/Results
===================================================================
---
xwiki-products/xwiki-enterprise/branches/xwiki-enterprise-1.1/wiki/src/main/resources/XWiki/Results
2007-11-07 12:17:32 UTC (rev 5690)
+++
xwiki-products/xwiki-enterprise/branches/xwiki-enterprise-1.1/wiki/src/main/resources/XWiki/Results
2007-11-07 12:19:07 UTC (rev 5691)
@@ -1,19 +1,20 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
+
<xwikidoc>
<web>XWiki</web>
<name>Results</name>
<language></language>
<defaultLanguage>en</defaultLanguage>
<translation>0</translation>
-<parent></parent>
+<parent>Main.WebSearch</parent>
<creator>XWiki.Admin</creator>
<author>XWiki.Admin</author>
<customClass></customClass>
<contentAuthor>XWiki.Admin</contentAuthor>
<creationDate>1158300067000</creationDate>
-<date>1186993868000</date>
-<contentUpdateDate>1186993868000</contentUpdateDate>
-<version>1.6</version>
+<date>1191330859000</date>
+<contentUpdateDate>1191330859000</contentUpdateDate>
+<version>4.1</version>
<title></title>
<template></template>
<defaultTemplate></defaultTemplate>
@@ -53,111 +54,111 @@
<tags/>
</property>
</object>
-<content>#set($showdata = 0)
-#set($formatDate = "yyyy MMMM dd, HH:mm")
-
-## WARNING: Do not add any empty line inside the table element. This will
potentially break
-## the Javascript we're using for filtering/sorting columns. It might work in
FF but will break
-## in other browsers like IE. This is because empty lines add <p
class="paragraph"></p> elements
-## when rendered.
-
-<table id="searchTableUnique" class="grid sortable filterable doOddEven">
- <tr class="sortHeader">
- <th>Page</th>
- <th style="width:150px" class="selectFilter">Space</th>
- <th style="width:150px">Date</th>
- <th style="width:150px">Last Author</th>
- #if($isScored)
- <th style="width:150px">Score</th>
- #end
- #if($xwiki.hasAdminRights())
- <th style="width:210px" class="unsortable
noFilter">Actions</th>
- #end
- </tr>
- #foreach ($item in $list)
- #set($troubi = "non")
- #if ($xwiki.hasAccessLevel("view", $context.user,
"${context.database}:${item}"))
- #if ($item.class == "class java.lang.String")
- #set($bentrydoc = $xwiki.getDocument($item))
- #elseif ($item.class == "class
com.xpn.xwiki.plugin.lucene.SearchResult")
- #set($bentrydoc = $item)
- #end
- #set($cclass =
$xwiki.getDocument("XWiki.XWikiComments").getxWikiClass())
- #set($comment = $cclass.newObject())
- #if($xwiki.getWebPreferenceAsInt("commentsorder",1)==0)
- #set($comments = $bentrydoc.getComments())
- #else
- #set($comments = $bentrydoc.getComments(false))
- #end
- #set($createur = $xwiki.getUserName($bentrydoc.author))
- #set($ptitle = $bentrydoc.getDisplayTitle())
- <tr><td style="text-align:left">
- ## LUCENE : entries are typed
- #if ($bentrydoc.type)
- #if ($bentrydoc.type == "attachment")
- <a href="${bentrydoc.url}" target="_blank"><img
src="${xwiki.getSkinFile("icons/search/disk.png")}" ALT="download" />
${bentrydoc.filename}</a>\\
- Attachment of
- #end
- #end
- #if($comments.size()>0)
- #set($i = 0)
- #set($cobj = $comments.get($i))
- #set($comment = $bentrydoc.display("comment", "view", $cobj))
- #set($date = $cobj.getXWikiObject().get("date").value)
- #if($date)
- #set($date2 = $!xwiki.formatDate($date,"yyyy MM dd HH:mm:ss") )
- #end
- #if($bentrydoc)
- #set($date1 = $!xwiki.formatDate($!bentrydoc.date,"yyyy MM dd
HH:mm:ss") )
- #end
- #if($date1.equals($date2) )
- [$ptitle>${bentrydoc.web}.$bentrydoc.name] <em>- 1 new
comment</em>
- #set($troubi ="oui")
- #set($desc = $cobj.getXWikiObject().get("comment").value)
- #else
- [$bentrydoc.name>${bentrydoc.web}.$bentrydoc.name] #if
($ptitle != $bentrydoc.name) <em>- $ptitle</em>#end
- #end
- #else
- #set($comment = "")
-
[$bentrydoc.name>${bentrydoc.web}.$bentrydoc.name.replaceAll("@","%40")] #if
($ptitle != $bentrydoc.name) <em>- $ptitle</em>#end
- #end
- </td><td style="text-align:left">
- [$bentrydoc.web>${bentrydoc.web}.WebHome]
- </td><td style="text-align:left">
- $xwiki.formatDate($bentrydoc.date,"yyyy MMM dd") at
$xwiki.formatDate($bentrydoc.date,"HH:mm")</td><td
style="text-align:center">
- #if($troubi =="oui")
- #set($createur = $xwiki.getUserName($cobj.author) )
- #end
- #if ($createur == "XWikiGuest")
- Guest
- #else
- $createur
- #end
- </td>
- #if ($isScored)
- <td style="text-align:left">
- #set($resval=$bentrydoc.score*100)
- #set($starurl=$xwiki.getSkinFile("icons/search/star.png"))
- #set($star = "<img src='$starurl' alt='$resval' />")
- <span class="hidden">$bentrydoc.score</span>
- #if($resval>10) $star #end
- #if($resval>20) $star #end
- #if($resval>40) $star #end
- #if($resval>60) $star #end
- #if($resval>90) $star #end
- #set ($perc = $resval.toString())
- ${perc.substring(0, $perc.indexOf("."))}%
- </td>
- #set ($bentrydoc =
$xwiki.getDocument("${bentrydoc.web}.${bentrydoc.name}"))
- #end
- #if($xwiki.hasAdminRights())
- <td>
- <a href="$xwiki.getURL("XWiki.CopyDocument", "view",
"sourcedoc=${bentrydoc.fullName}")">Copy</a> - <a
href="$bentrydoc.getURL("delete")">Delete</a> - <a
href="$bentrydoc.getURL("view",
"xpage=rename&amp;step=1")">Rename</a> - <a
href="$bentrydoc.getURL("edit", "editor=rights")">Rights</a>
- </td>
- #end
- </tr>
- #end
- #end
-</table>
-</content>
-</xwikidoc>
\ No newline at end of file
+<content>#set($showdata = 0)
+#set($formatDate = "yyyy MMMM dd, HH:mm")
+
+## WARNING: Do not add any empty line inside the table element. This will
potentially break
+## the Javascript we're using for filtering/sorting columns. It might work in
FF but will break
+## in other browsers like IE. This is because empty lines add <p
class="paragraph"></p> elements
+## when rendered.
+
+<table id="searchTableUnique" class="grid sortable filterable doOddEven">
+ <tr class="sortHeader">
+ <th>Page</th>
+ <th style="width:150px" class="selectFilter">Space</th>
+ <th style="width:150px">Date</th>
+ <th style="width:150px">Last Author</th>
+ #if($isScored)
+ <th style="width:150px" class="noFilter">>Score</th>
+ #end
+ #if($xwiki.hasAdminRights())
+ <th style="width:210px" class="unsortable
noFilter">Actions</th>
+ #end
+ </tr>
+ #foreach ($item in $list)
+ #set($troubi = "non")
+ #if ($xwiki.hasAccessLevel("view", $context.user,
"${context.database}:${item}"))
+ #if ($item.class == "class java.lang.String")
+ #set($bentrydoc = $xwiki.getDocument($item))
+ #elseif ($item.class == "class
com.xpn.xwiki.plugin.lucene.SearchResult")
+ #set($bentrydoc = $item)
+ #end
+ #set($cclass =
$xwiki.getDocument("XWiki.XWikiComments").getxWikiClass())
+ #set($comment = $cclass.newObject())
+ #if($xwiki.getWebPreferenceAsInt("commentsorder",1)==0)
+ #set($comments = $bentrydoc.getComments())
+ #else
+ #set($comments = $bentrydoc.getComments(false))
+ #end
+ #set($createur = $xwiki.getUserName($bentrydoc.author))
+ #set($ptitle = $bentrydoc.getDisplayTitle())
+ <tr><td style="text-align:left">
+ ## LUCENE : entries are typed
+ #if ($bentrydoc.type)
+ #set ($ptitle =
$xwiki.getDocument("${bentrydoc.web}.${bentrydoc.name}").getDisplayTitle())
+ #if ($bentrydoc.type == "attachment")
+ <a href="${bentrydoc.url}" target="_blank"><img
src="${xwiki.getSkinFile("icons/search/disk.png")}" ALT="download" />
${bentrydoc.filename}</a>\\
+ Attachment of
+ #end
+ #end
+ #if($comments && $comments.size()>0)
+ #set($i = 0)
+ #set($cobj = $comments.get($i))
+ #set($comment = $bentrydoc.display("comment", "view", $cobj))
+ #set($date = $cobj.getXWikiObject().get("date").value)
+ #if($date)
+ #set($date2 = $!xwiki.formatDate($date,"yyyy MM dd HH:mm:ss") )
+ #end
+ #if($bentrydoc)
+ #set($date1 = $!xwiki.formatDate($!bentrydoc.date,"yyyy MM dd
HH:mm:ss") )
+ #end
+ #if($date1.equals($date2) )
+ [$ptitle>${bentrydoc.web}.$bentrydoc.name] <em>- 1 new
comment</em>
+ #set($troubi ="oui")
+ #set($desc = $cobj.getXWikiObject().get("comment").value)
+ #else
+ [$bentrydoc.name>${bentrydoc.web}.$bentrydoc.name] #if
($ptitle != $bentrydoc.name) <em>- $ptitle</em>#end
+ #end
+ #else
+ #set($comment = "")
+
[$bentrydoc.name>${bentrydoc.web}.$bentrydoc.name.replaceAll("@","%40")] #if
($ptitle != $bentrydoc.name) <em>- $ptitle</em>#end
+ #end
+ </td><td style="text-align:left">
+ [$bentrydoc.web>${bentrydoc.web}.WebHome]
+ </td><td style="text-align:left">
+ $xwiki.formatDate($bentrydoc.date,"yyyy MMM dd") at
$xwiki.formatDate($bentrydoc.date,"HH:mm")</td><td
style="text-align:center">
+ #if($troubi =="oui")
+ #set($createur = $xwiki.getUserName($cobj.author) )
+ #end
+ #if ($createur == "XWikiGuest")
+ Guest
+ #else
+ $createur
+ #end
+ </td>
+ #if ($isScored)
+ <td style="text-align:left">
+ #set($resval=$bentrydoc.score*100)
+ #set($starurl=$xwiki.getSkinFile("icons/search/star.png"))
+ #set($star = "<img src='$starurl' alt='$resval' />")
+ <span class="hidden">$bentrydoc.score</span>
+ #if($resval>10) $star #end
+ #if($resval>20) $star #end
+ #if($resval>40) $star #end
+ #if($resval>60) $star #end
+ #if($resval>90) $star #end
+ #set ($perc = $resval.toString())
+ ${perc.substring(0, $perc.indexOf("."))}%
+ </td>
+ #set ($bentrydoc =
$xwiki.getDocument("${bentrydoc.web}.${bentrydoc.name}"))
+ #end
+ #if($xwiki.hasAdminRights())
+ <td>
+ <a href="$xwiki.getURL("XWiki.CopyDocument", "view",
"sourcedoc=${bentrydoc.fullName}")">Copy</a> - <a
href="$bentrydoc.getURL("delete")">Delete</a> - <a
href="$bentrydoc.getURL("view",
"xpage=rename&amp;step=1")">Rename</a> - <a
href="$bentrydoc.getURL("edit", "editor=rights")">Rights</a>
+ </td>
+ #end
+ </tr>
+ #end
+ #end
+</table>
+</content></xwikidoc>
\ No newline at end of file
_______________________________________________
notifications mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/notifications