Author: lucaa
Date: 2008-02-20 14:06:05 +0100 (Wed, 20 Feb 2008)
New Revision: 7870
Added:
xwiki-products/xwiki-watch/trunk/wikis/watch/src/main/resources/WatchSheets/Results
Removed:
xwiki-products/xwiki-watch/trunk/wikis/watch/src/main/resources/XWiki/Results
Modified:
xwiki-products/xwiki-watch/trunk/wikis/watch/src/main/resources/WatchCode/Translations
xwiki-products/xwiki-watch/trunk/wikis/watch/src/main/resources/WatchCode/Translations.fr
xwiki-products/xwiki-watch/trunk/wikis/watch/src/main/resources/WatchSheets/FeedSheet
xwiki-products/xwiki-watch/trunk/wikis/watch/src/main/resources/WatchSheets/GroupSheet
xwiki-products/xwiki-watch/trunk/wikis/watch/src/main/resources/WatchSheets/KeywordSheet
xwiki-products/xwiki-watch/trunk/wikis/watch/src/main/resources/WatchSheets/TagsSheet
xwiki-products/xwiki-watch/trunk/wikis/watch/src/main/resources/WatchSheets/WikiWebHomeSheet
Log:
XWATCH-5: Wiki integration
* Fetched articles documents are displayed using their display title
* Space is no longer displayed in the items tables
* Updated items table to support i18n
Modified:
xwiki-products/xwiki-watch/trunk/wikis/watch/src/main/resources/WatchCode/Translations
===================================================================
---
xwiki-products/xwiki-watch/trunk/wikis/watch/src/main/resources/WatchCode/Translations
2008-02-20 12:44:07 UTC (rev 7869)
+++
xwiki-products/xwiki-watch/trunk/wikis/watch/src/main/resources/WatchCode/Translations
2008-02-20 13:06:05 UTC (rev 7870)
@@ -341,6 +341,12 @@
watch.wiki.reader=XWiki Watch Reader
watch.wiki.reader.goto=Go to the {0}
+watch.wiki.page=Page
+watch.wiki.date=Date
+watch.wiki.lastauthor=Last author
+watch.wiki.actions=Actions
+watch.wiki.score=Score
+
watch.filter.dates.title = Date filters
watch.filter.dates.startDate = From date:
watch.filter.dates.endDate = To date:
Modified:
xwiki-products/xwiki-watch/trunk/wikis/watch/src/main/resources/WatchCode/Translations.fr
===================================================================
---
xwiki-products/xwiki-watch/trunk/wikis/watch/src/main/resources/WatchCode/Translations.fr
2008-02-20 12:44:07 UTC (rev 7869)
+++
xwiki-products/xwiki-watch/trunk/wikis/watch/src/main/resources/WatchCode/Translations.fr
2008-02-20 13:06:05 UTC (rev 7870)
@@ -340,6 +340,13 @@
watch.wiki.reader=Lecteur de flux
watch.wiki.reader.goto=Acc�der au {0}
+watch.wiki.page=Page
+watch.wiki.date=Date
+watch.wiki.lastauthor=Dernier auteur
+watch.wiki.actions=Actions
+watch.wiki.score=Score
+
+
watch.filter.dates.title = Filtrer sur les dates
watch.filter.dates.startDate = Date de d�but:
watch.filter.dates.endDate = Date de fin:
Modified:
xwiki-products/xwiki-watch/trunk/wikis/watch/src/main/resources/WatchSheets/FeedSheet
===================================================================
---
xwiki-products/xwiki-watch/trunk/wikis/watch/src/main/resources/WatchSheets/FeedSheet
2008-02-20 12:44:07 UTC (rev 7869)
+++
xwiki-products/xwiki-watch/trunk/wikis/watch/src/main/resources/WatchSheets/FeedSheet
2008-02-20 13:06:05 UTC (rev 7870)
@@ -64,7 +64,7 @@
#set($aggregatorName = $doc.name)
#set($searchSql = ", BaseObject obj where obj.name=doc.fullName and
obj.className='XWiki.FeedEntryClass' and doc.web='${doc.space}' and doc.name
like '%Feed_${aggregatorName}%'")
#set($list = $xwiki.searchDocuments($searchSql))
- #includeForm("XWiki.Results")
+ #includeForm("WatchSheets.Results")
#else
#warning($msg.get("watch.wiki.notAggregator"))
#end</content>
Modified:
xwiki-products/xwiki-watch/trunk/wikis/watch/src/main/resources/WatchSheets/GroupSheet
===================================================================
---
xwiki-products/xwiki-watch/trunk/wikis/watch/src/main/resources/WatchSheets/GroupSheet
2008-02-20 12:44:07 UTC (rev 7869)
+++
xwiki-products/xwiki-watch/trunk/wikis/watch/src/main/resources/WatchSheets/GroupSheet
2008-02-20 13:06:05 UTC (rev 7870)
@@ -62,7 +62,7 @@
#set($parList = $xwiki.arrayList)
#set($dispose = $parList.add($groupObj.getProperty("name").value))
1.1 $msg.get("watch.wiki.group.articles", $parList)
- #includeForm("XWiki.Results")
+ #includeForm("WatchSheets.Results")
#else
#warning($msg.get("watch.wiki.group.noGroup"))
#end</content>
Modified:
xwiki-products/xwiki-watch/trunk/wikis/watch/src/main/resources/WatchSheets/KeywordSheet
===================================================================
---
xwiki-products/xwiki-watch/trunk/wikis/watch/src/main/resources/WatchSheets/KeywordSheet
2008-02-20 12:44:07 UTC (rev 7869)
+++
xwiki-products/xwiki-watch/trunk/wikis/watch/src/main/resources/WatchSheets/KeywordSheet
2008-02-20 13:06:05 UTC (rev 7870)
@@ -71,7 +71,7 @@
#set($parList = $xwiki.arrayList)
#set($dispose = $parList.add($keywordValue))
1.1 $msg.get("watch.wiki.keyword.articles", $parList)
- #includeForm("XWiki.Results")
+ #includeForm("WatchSheets.Results")
#else
#warning($msg.get("watch.wiki.keyword.noKeyword"))
#end</content>
Copied:
xwiki-products/xwiki-watch/trunk/wikis/watch/src/main/resources/WatchSheets/Results
(from rev 7860,
xwiki-products/xwiki-watch/trunk/wikis/watch/src/main/resources/XWiki/Results)
===================================================================
---
xwiki-products/xwiki-watch/trunk/wikis/watch/src/main/resources/WatchSheets/Results
(rev 0)
+++
xwiki-products/xwiki-watch/trunk/wikis/watch/src/main/resources/WatchSheets/Results
2008-02-20 13:06:05 UTC (rev 7870)
@@ -0,0 +1,165 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<xwikidoc>
+<web>WatchSheets</web>
+<name>Results</name>
+<language></language>
+<defaultLanguage>en</defaultLanguage>
+<translation>0</translation>
+<parent></parent>
+<creator>XWiki.Admin</creator>
+<author>XWiki.Admin</author>
+<customClass></customClass>
+<contentAuthor>XWiki.Admin</contentAuthor>
+<creationDate>1158300067000</creationDate>
+<date>1194539913000</date>
+<contentUpdateDate>1195114894000</contentUpdateDate>
+<version>1.1</version>
+<title></title>
+<template></template>
+<defaultTemplate></defaultTemplate>
+<validationScript></validationScript>
+<comment></comment>
+<object>
+<class>
+<name>XWiki.TagClass</name>
+<customClass></customClass>
+<customMapping></customMapping>
+<defaultViewSheet></defaultViewSheet>
+<defaultEditSheet></defaultEditSheet>
+<defaultWeb></defaultWeb>
+<nameField></nameField>
+<validationScript></validationScript>
+<tags>
+<cache>0</cache>
+<displayType>input</displayType>
+<multiSelect>1</multiSelect>
+<name>tags</name>
+<number>1</number>
+<prettyName>Tags</prettyName>
+<relationalStorage>1</relationalStorage>
+<separator> </separator>
+<separators> ,|</separators>
+<size>30</size>
+<unmodifiable>0</unmodifiable>
+<values></values>
+<classType>com.xpn.xwiki.objects.classes.StaticListClass</classType>
+</tags>
+</class>
+<name>WatchSheets.Results</name>
+<number>0</number>
+<className>XWiki.TagClass</className>
+<property>
+<tags/>
+</property>
+</object>
+<content>#set($showdata = 0)
+#set($formatDate = "yyyy MMMM dd, HH:mm")
+#set($filterable = "filterable")
+#set($tableId = "searchTableUnique")
+#if ($noFilter)
+ #set($filterable = "")
+ #set($tableId = "searchTable")
+#end
+
+## 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="${tableId}" class="grid sortable ${filterable} doOddEven">
+ <tr class="sortHeader">
+ <th>$msg.get("watch.wiki.page")</th>
+ <th style="width:150px">$msg.get("watch.wiki.date")</th>
+ <th style="width:150px">$msg.get("watch.wiki.lastauthor")</th>
+ #if($isScored)
+ <th style="width:150px">$msg.get("watch.wiki.score")</th>
+ #end
+ #if($xwiki.hasAdminRights())
+ <th style="width:210px" class="unsortable
noFilter">$msg.get("watch.wiki.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
+ [$ptitle | ${bentrydoc.web}.$bentrydoc.name]
+ #end
+ #else
+ #set($comment = "")
+ [$ptitle | ${bentrydoc.web}.$bentrydoc.name.replaceAll("@","%40")]
+ #end
+ </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>
Modified:
xwiki-products/xwiki-watch/trunk/wikis/watch/src/main/resources/WatchSheets/TagsSheet
===================================================================
---
xwiki-products/xwiki-watch/trunk/wikis/watch/src/main/resources/WatchSheets/TagsSheet
2008-02-20 12:44:07 UTC (rev 7869)
+++
xwiki-products/xwiki-watch/trunk/wikis/watch/src/main/resources/WatchSheets/TagsSheet
2008-02-20 13:06:05 UTC (rev 7870)
@@ -74,5 +74,5 @@
#set($dispose = $parList.add(""))
#end
1.1 $msg.get("watch.wiki.articles.tags", $parList)
-#includeForm("XWiki.Results")</content>
+#includeForm("WatchSheets.Results")</content>
</xwikidoc>
Modified:
xwiki-products/xwiki-watch/trunk/wikis/watch/src/main/resources/WatchSheets/WikiWebHomeSheet
===================================================================
---
xwiki-products/xwiki-watch/trunk/wikis/watch/src/main/resources/WatchSheets/WikiWebHomeSheet
2008-02-20 12:44:07 UTC (rev 7869)
+++
xwiki-products/xwiki-watch/trunk/wikis/watch/src/main/resources/WatchSheets/WikiWebHomeSheet
2008-02-20 13:06:05 UTC (rev 7870)
@@ -74,7 +74,7 @@
#set($aggregatorsSql = ", BaseObject obj where doc.fullName=obj.name and
obj.className='XWiki.AggregatorURLClass' and doc.web='${doc.space}' order by
doc.creationDate desc")
#set($list = $xwiki.searchDocuments($aggregatorsSql))
#set($noFilter = true)
-#includeForm("XWiki.Results")
+#includeForm("WatchSheets.Results")
##create the keywords list and print them
<div style="border:1px solid #CCCCCC; margin: 10px 10px 10px 0;
padding:10px; background-color:#E4F6FF;">
#set($keywordsSql = ", BaseObject obj where doc.fullName = obj.name and
obj.className = 'XWiki.KeywordClass' and doc.web = '${doc.space}'")
@@ -148,7 +148,7 @@
#set($articlesSql = ", BaseObject obj where doc.fullName=obj.name and
obj.className='XWiki.FeedEntryClass' and doc.web='${doc.space}' order by
doc.creationDate desc")
#set($list = $xwiki.searchDocuments($articlesSql, $articlesLimit, 0))
#set($noFilter = false)
-#includeForm("XWiki.Results")
+#includeForm("WatchSheets.Results")
</div>
*#</content>
</xwikidoc>
Deleted:
xwiki-products/xwiki-watch/trunk/wikis/watch/src/main/resources/XWiki/Results
===================================================================
---
xwiki-products/xwiki-watch/trunk/wikis/watch/src/main/resources/XWiki/Results
2008-02-20 12:44:07 UTC (rev 7869)
+++
xwiki-products/xwiki-watch/trunk/wikis/watch/src/main/resources/XWiki/Results
2008-02-20 13:06:05 UTC (rev 7870)
@@ -1,168 +0,0 @@
-<?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>
-<creator>XWiki.Admin</creator>
-<author>XWiki.Admin</author>
-<customClass></customClass>
-<contentAuthor>XWiki.Admin</contentAuthor>
-<creationDate>1158300067000</creationDate>
-<date>1194539913000</date>
-<contentUpdateDate>1195114894000</contentUpdateDate>
-<version>1.1</version>
-<title></title>
-<template></template>
-<defaultTemplate></defaultTemplate>
-<validationScript></validationScript>
-<comment></comment>
-<object>
-<class>
-<name>XWiki.TagClass</name>
-<customClass></customClass>
-<customMapping></customMapping>
-<defaultViewSheet></defaultViewSheet>
-<defaultEditSheet></defaultEditSheet>
-<defaultWeb></defaultWeb>
-<nameField></nameField>
-<validationScript></validationScript>
-<tags>
-<cache>0</cache>
-<displayType>input</displayType>
-<multiSelect>1</multiSelect>
-<name>tags</name>
-<number>1</number>
-<prettyName>Tags</prettyName>
-<relationalStorage>1</relationalStorage>
-<separator> </separator>
-<separators> ,|</separators>
-<size>30</size>
-<unmodifiable>0</unmodifiable>
-<values></values>
-<classType>com.xpn.xwiki.objects.classes.StaticListClass</classType>
-</tags>
-</class>
-<name>XWiki.Results</name>
-<number>0</number>
-<className>XWiki.TagClass</className>
-<property>
-<tags/>
-</property>
-</object>
-<content>#set($showdata = 0)
-#set($formatDate = "yyyy MMMM dd, HH:mm")
-#set($filterable = "filterable")
-#set($tableId = "searchTableUnique")
-#if ($noFilter)
- #set($filterable = "")
- #set($tableId = "searchTable")
-#end
-
-## 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="${tableId}" 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
_______________________________________________
notifications mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/notifications