Index: xwiki-platform-core/xwiki-core/src/main/resources/ApplicationResources.properties
===================================================================
--- xwiki-platform-core/xwiki-core/src/main/resources/ApplicationResources.properties	(revision 9788)
+++ xwiki-platform-core/xwiki-core/src/main/resources/ApplicationResources.properties	(working copy)
@@ -963,6 +963,7 @@
 rightsmanager.createnewgroup=Create new group
 rightsmanager.creategroup=Create group
 rightsmanager.groupexist=__name__ cannot be used for the group name, as another document with this name already exists.
+rightsmanager.documentrequireviewrights=(*) Some documents require special rights to be view.
 
 ui.ajaxTable.loading=Loading...
 
Index: xwiki-product-enterprise/wiki/src/main/resources/XWiki/Tableresults
===================================================================
--- xwiki-product-enterprise/wiki/src/main/resources/XWiki/Tableresults	(revision 9788)
+++ xwiki-product-enterprise/wiki/src/main/resources/XWiki/Tableresults	(working copy)
@@ -21,179 +21,184 @@
 <validationScript></validationScript>
 <comment></comment>
 <minorEdit>false</minorEdit>
-<content>{pre}
-## ============================================================================================
-## This page is called from live grids via Ajax with the argument xpage=plain. It returns a
-## set of results serialized in JSON.
-## You can see an example of live grid in XWiki.Tableview (note : this grid doesn't use all the
-## serialized fields).
-## ============================================================================================
+<content>{pre}
+## ============================================================================================
+## This page is called from live grids via Ajax with the argument xpage=plain. It returns a
+## set of results serialized in JSON.
+## You can see an example of live grid in XWiki.Tableview (note : this grid doesn't use all the
+## serialized fields).
+## ============================================================================================
 #if($request.get("xpage") &amp;&amp; $request.get("xpage") == "plain")
 #set($offset = $util.parseInt( $request.get( "offset" ) ) )
-## offset starts from 0 in velocity and 1 in javascript
+## offset starts from 0 in velocity and 1 in javascript
 #set($off = $offset - 1 )
 #set($limit = $util.parseInt($request.get("limit")))
-#set($page = $request.get("page"))
-#set($space = $request.get("space"))
-#set($author = $request.get("author"))
-#set($formatDate = "yyyy MMMM dd, HH:mm")
-#if($page) 
-  #set($page = $page.trim().toLowerCase())
-  #set($sql = "where lower(doc.name) like '%${page}%'")
-#else #set($sql = "where lower(doc.name) &lt;&gt; ''") #end
-#if($space)  
-  #set($space = $space.trim().toLowerCase())
-  #set($sql = $sql + "and lower(doc.web) like '%${space}%'") 
-#end
-#if($author) 
-  #set($author = $author.trim().toLowerCase())
-  #set($sql = $sql + "and lower(doc.author) like '%${author}%'") 
-#end
-#set($sql = $sql + "order by doc.name")
-#set($items = $xwiki.searchDocuments($sql, $limit, $off))
-#set($countItems= $xwiki.searchDocuments($sql).size())
-
-## ==============================================
-## json starts
-## ==============================================
-{ 
-"totalrows": $countItems,
-"returnedrows": #if($items.size() &lt; $limit) $items.size() #else $limit #end,
-"offset": $offset,
-"reqNo": $request.reqNo,
-"rows": [
-#foreach( $item in $items )
-  ## ==============================================
-  ## Fullname
-  ## ==============================================
-  #if($item.class == "class com.xpn.xwiki.plugin.lucene.SearchResult")
-    #set($itemfullname = "${item.wiki}:${item.web}.${item.name}")
-  #else
-    #set($itemfullname = "${context.database}:${item}")
-  #end
-  ## ==============================================
-  ## Item url
-  ## ==============================================
-  #set($itemurl = $xwiki.getURL($itemfullname))
-  ##==============================================
-  ## Access level
-  ## ==============================================
-  #set($acclev = $xwiki.hasAccessLevel("view", $context.user, $itemfullname))
-  ## ==============================================
-  ## Bentrydoc
-  ## ==============================================
-  #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
-  ## ==============================================
-  ## Item date
-  ## ==============================================
-  #set($itemdate = $!xwiki.formatDate($!bentrydoc.date, $formatDate))
-  ## ==============================================
-  ## Page
-  ## ==============================================
-  #set($page = $bentrydoc.name)
-  #set($ptitle = $xwiki.getXMLEncoded($!bentrydoc.getDisplayTitle()))
-  #if($ptitle == $page)
-  	#set($ptitle = "")
-  #end
-  ## ==============================================
-  ## Space
-  ## ==============================================
-  #set($space = $bentrydoc.web)
-  #set($spaceurl = $xwiki.getURL("${bentrydoc.wiki}:${bentrydoc.web}.WebHome"))
-  ## ==============================================
-  ## Wiki
-  ## ==============================================
+#set($page = $request.get("page"))
+#set($space = $request.get("space"))
+#set($author = $request.get("author"))
+#set($formatDate = "yyyy MMMM dd, HH:mm")
+#if($page) 
+  #set($page = $page.trim().toLowerCase())
+  #set($sql = "where lower(doc.name) like '%${page}%'")
+#else #set($sql = "where lower(doc.name) &lt;&gt; ''") #end
+#if($space)  
+  #set($space = $space.trim().toLowerCase())
+  #set($sql = $sql + "and lower(doc.web) like '%${space}%'") 
+#end
+#if($author) 
+  #set($author = $author.trim().toLowerCase())
+  #set($sql = $sql + "and lower(doc.author) like '%${author}%'") 
+#end
+#set($sql = $sql + "order by doc.name")
+#set($items = $xwiki.searchDocuments($sql, $limit, $off))
+#set($totalItems = $xwiki.searchDocuments($sql).size())
+#set($returnedItems = $items.size())
+## ==============================================
+## json starts
+## ==============================================
+{ 
+"totalrows": $totalItems,
+"returnedrows": #if($returnedItems &lt; $limit) $returnedItems #else $limit #end,
+"offset": $offset,
+"reqNo": $request.reqNo,
+"rows": [
+#foreach($item in $items)
+  ## ==============================================
+  ## Fullname
+  ## ==============================================
+  #if($item.class == "class com.xpn.xwiki.plugin.lucene.SearchResult")
+    #set($itemfullname = "${item.wiki}:${item.web}.${item.name}")
+  #else
+    #set($itemfullname = "${context.database}:${item}")
+  #end
+  ##==============================================
+  ## Access level
+  ## ==============================================
+  #set($acclev = $xwiki.hasAccessLevel("view", $context.user, $itemfullname))
+  ## ==============================================
+  ## Bentrydoc
+  ## ==============================================
+  #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
+  #if ($acclev &amp;&amp; $bentrydoc &amp;&amp; ($bentrydoc != ""))
+  ## ==============================================
+  ## Item url
+  ## ==============================================
+  #set($itemurl = $xwiki.getURL($itemfullname))
+  ## ==============================================
+  ## Item date
+  ## ==============================================
+  #set($itemdate = $!xwiki.formatDate($!bentrydoc.date, $formatDate))
+  ## ==============================================
+  ## Page
+  ## ==============================================
+  #set($page = $bentrydoc.name)
+  #set($ptitle = $xwiki.getXMLEncoded($!bentrydoc.getDisplayTitle()))
+  #if($ptitle == $page)
+  	#set($ptitle = "")
+  #end
+  ## ==============================================
+  ## Space
+  ## ==============================================
+  #set($space = $bentrydoc.web)
+  #set($spaceurl = $xwiki.getURL("${bentrydoc.wiki}:${bentrydoc.web}.WebHome"))
+  ## ==============================================
+  ## Wiki
+  ## ==============================================
   #if($xwiki.isVirtualMode())
-    #set($wiki = $bentrydoc.wiki)
-    #set($wikiurl = $xwiki.getURL("${bentrydoc.wiki}:Main.WebHome"))
-  #end
-  ## ==============================================
-  ## is Attachment
-  ## ==============================================
-  #set($isattach = false)
-  #if ($bentrydoc.type)
-    #set ($ptitle = $xwiki.getDocument($itemfullname).getDisplayTitle())
-    #if ($bentrydoc.type == "attachment")
-      #set($isattach = true)
-      #set($filename = $bentrydoc.filename)
-    #end
-  #end
-  ## ==============================================
-  ## Has new comment
-  ## ==============================================
-  #set($hasnewcomm = false)
-  #set($cclass = $xwiki.getDocument("XWiki.XWikiComments").getxWikiClass())
-  #if($xwiki.getWebPreferenceAsInt("commentsorder", 1) == 0)
-    #set($comments = $bentrydoc.getComments())
-  #else
-    #set($comments = $bentrydoc.getComments(false))
-  #end
-  #if($comments &amp;&amp; $comments.size()&gt;0)
-    #set($i = 0)
-    #set($cobj = $comments.get($i))
-    #set($date = $cobj.getXWikiObject().get("date").value)
-    #if($date)
-      #set($date1 = $!xwiki.formatDate($date, $formatDate))
-    #end
-    #if($itemdate.equals($date1))
-      #set($hasnewcomm = true)
-    #end
-  #end
-  ## ==============================================
-  ## Author
-  ## ==============================================
-  #if($hasnewcomm)
-    #set($author = $cobj.author)
-  #else
-    #set($author = $bentrydoc.author)
-  #end
-  #set($authorpage = $xwiki.getURL($author))
-  #set($dot = $author.indexOf('.') + 1)
-  #if($dot &gt; 1)
-    #set($author = $author.substring($dot))
-  #end
-  ## ==============================================
-  ## Actions
-  ## ==============================================
-  #set($copy = $xwiki.getURL("XWiki.CopyDocument", "view", "sourcedoc=${util.encodeURI($itemfullname)}"))
-  #set($delete = $bentrydoc.getURL("delete"))
-  #set($rename = $bentrydoc.getURL("view", "xpage=rename&amp;amp;step=1"))
-  #set($rights = $bentrydoc.getURL("edit", "editor=rights"))
-   
-  #if( $velocityCount &gt; 1 ) , #end
-  {"acclev"    : $acclev,
-   "page"      : "$page",
-   "url"       : "$itemurl",
-   "title"     : "$ptitle",
-   "space"     : "$space",
-   "spaceurl"  : "$spaceurl",
-   "isvirtual" : $xwiki.isVirtualMode(),
-  #if($xwiki.isVirtualMode())
-   "wiki"      : "$wiki",
-   "wikiurl"   : "$!wikiurl",
-  #end
-   "date"      : "$itemdate",
-   "author"    : "$author",
-   "authorpage" : "$!authorpage",
-   "hasnewcom" : $hasnewcomm,
-  #if($isattach)
-   "filename"  : "$filename",
-  #end
-   "hasadmin"  : $xwiki.hasAdminRights(),
-   "copyurl"   : "$copy",
-   "deleteurl" : "$delete",
-   "renameurl" : "$rename",
-   "rightsurl" : "$rights"
-  }
-#end
-]}
-## ==============================================
-## json ended
-## ==============================================
-#end
-{/pre}
+    #set($wiki = $bentrydoc.wiki)
+    #set($wikiurl = $xwiki.getURL("${bentrydoc.wiki}:Main.WebHome"))
+  #end
+  ## ==============================================
+  ## is Attachment
+  ## ==============================================
+  #set($isattach = false)
+  #if ($bentrydoc.type)
+    #set ($ptitle = $xwiki.getDocument($itemfullname).getDisplayTitle())
+    #if ($bentrydoc.type == "attachment")
+      #set($isattach = true)
+      #set($filename = $bentrydoc.filename)
+    #end
+  #end
+  ## ==============================================
+  ## Has new comment
+  ## ==============================================
+  #set($hasnewcomm = false)
+  #set($cclass = $xwiki.getDocument("XWiki.XWikiComments").getxWikiClass())
+  #if($xwiki.getWebPreferenceAsInt("commentsorder", 1) == 0)
+    #set($comments = $bentrydoc.getComments())
+  #else
+    #set($comments = $bentrydoc.getComments(false))
+  #end
+  #if($comments &amp;&amp; $comments.size()&gt;0)
+    #set($i = 0)
+    #set($cobj = $comments.get($i))
+    #set($date = $cobj.getXWikiObject().get("date").value)
+    #if($date)
+      #set($date1 = $!xwiki.formatDate($date, $formatDate))
+    #end
+    #if($itemdate.equals($date1))
+      #set($hasnewcomm = true)
+    #end
+  #end
+  ## ==============================================
+  ## Author
+  ## ==============================================
+  #if($hasnewcomm)
+    #set($author = $cobj.author)
+  #else
+    #set($author = $bentrydoc.author)
+  #end
+  #set($authorpage = $xwiki.getURL($author))
+  #set($dot = $author.indexOf('.') + 1)
+  #if($dot &gt; 1)
+    #set($author = $author.substring($dot))
+  #end
+  ## ==============================================
+  ## Actions
+  ## ==============================================
+  #set($copy = $xwiki.getURL("XWiki.CopyDocument", "view", "sourcedoc=${util.encodeURI($itemfullname)}"))
+  #set($delete = $bentrydoc.getURL("delete"))
+  #set($rename = $bentrydoc.getURL("view", "xpage=rename&amp;amp;step=1"))
+  #set($rights = $bentrydoc.getURL("edit", "editor=rights"))
+  #end
+   
+  #if( $velocityCount &gt; 1 ) , #end
+  {"acclev"    : $acclev,
+   "fullname"  : "$itemfullname",
+   #if($acclev &amp;&amp; $bentrydoc &amp;&amp; ($bentrydoc != ""))
+   "page"      : "$page",
+   "url"       : "$itemurl",
+   "title"     : "$ptitle",
+   "space"     : "$space",
+   "spaceurl"  : "$spaceurl",
+   "isvirtual" : $xwiki.isVirtual(),
+  #if($xwiki.isVirtual())
+   "wiki"      : "$wiki",
+   "wikiurl"   : "$!wikiurl",
+  #end
+   "date"      : "$itemdate",
+   "author"    : "$author",
+   "authorpage" : "$!authorpage",
+   "hasnewcom" : $hasnewcomm,
+  #if($isattach)
+   "filename"  : "$filename",
+  #end
+   "hasadmin"  : $xwiki.hasAdminRights(),
+   "copyurl"   : "$copy",
+   "deleteurl" : "$delete",
+   "renameurl" : "$rename",
+   "rightsurl" : "$rights"
+   #end
+  }
+#end
+]}
+## ==============================================
+## json ended
+## ==============================================
+#end
+{/pre}
 </content></xwikidoc>
\ No newline at end of file
Index: xwiki-product-enterprise/wiki/src/main/resources/XWiki/Tableview
===================================================================
--- xwiki-product-enterprise/wiki/src/main/resources/XWiki/Tableview	(revision 9788)
+++ xwiki-product-enterprise/wiki/src/main/resources/XWiki/Tableview	(working copy)
@@ -1,140 +1,167 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-
-<xwikidoc>
-<web>XWiki</web>
-<name>Tableview</name>
-<language></language>
-<defaultLanguage></defaultLanguage>
-<translation>0</translation>
-<parent>Main.AllDocs</parent>
-<creator>XWiki.Admin</creator>
-<author>XWiki.Admin</author>
-<customClass></customClass>
-<contentAuthor>XWiki.Admin</contentAuthor>
-<creationDate>1207750266000</creationDate>
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<xwikidoc>
+<web>XWiki</web>
+<name>Tableview</name>
+<language></language>
+<defaultLanguage></defaultLanguage>
+<translation>0</translation>
+<parent>Main.AllDocs</parent>
+<creator>XWiki.Admin</creator>
+<author>XWiki.Admin</author>
+<customClass></customClass>
+<contentAuthor>XWiki.Admin</contentAuthor>
+<creationDate>1207750266000</creationDate>
 <date>1207915279000</date>
 <contentUpdateDate>1207915279000</contentUpdateDate>
 <version>49.1</version>
 <title></title>
-<template></template>
-<defaultTemplate></defaultTemplate>
-<validationScript></validationScript>
-<comment></comment>
-<minorEdit>false</minorEdit>
-<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.Tableview</name>
-<number>0</number>
-<className>XWiki.TagClass</className>
-<property>
-<tags/>
-</property>
-</object>
-<content>&lt;div id="ajax-loader"&gt;$msg.get("ui.ajaxTable.loading")&lt;br /&gt;
-  &lt;img src="$xwiki.getSkinFile('icons/ajax-loader.gif')" alt="$msg.get('ui.ajaxTable.loading')" title="" /&gt;
-&lt;/div&gt;
-&lt;table id="alldocstable"&gt;
-&lt;tr&gt;
- &lt;td colspan="2" style="padding-top:10px;"&gt;
-   &lt;span id="showLimits"&gt;&lt;/span&gt;
- &lt;/td&gt;
-&lt;/tr&gt;
-&lt;tr&gt;&lt;td style="width:100%"&gt;
-      &lt;table class="display"&gt;
-       &lt;thead class="theader"&gt;
-          &lt;tr&gt;
-            &lt;td&gt;$msg.get("wikiname")&lt;/td&gt;
-            &lt;td&gt;$msg.get("wikiweb")&lt;/td&gt;
-            &lt;td&gt;$msg.get("date")&lt;/td&gt;
-            &lt;td&gt;$msg.get("lastauthor")&lt;/td&gt;
-            #if($xwiki.hasAdminRights())&lt;td&gt;$msg.get("actions")&lt;/td&gt;#end
-          &lt;/tr&gt;
-          &lt;tr id="table-filters"&gt;
-              &lt;td&gt;&lt;input name="page" type="text"/&gt;&lt;/td&gt;
-              &lt;td&gt;&lt;input name="space" type="text"/&gt;&lt;/td&gt;
-              &lt;td&gt;&lt;/td&gt; ## date
-              &lt;td&gt;&lt;input name="author" type="text" /&gt;&lt;/td&gt;
-              #if($xwiki.hasAdminRights())&lt;td&gt;&lt;/td&gt;#end
-          &lt;/tr&gt;
-       &lt;/thead&gt;
-       &lt;tbody id="display1"&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;
-      &lt;/table&gt;&lt;/td&gt;
-      &lt;td valign="top"&gt;
-        &lt;div id="scrollbar1" class="scrollbar"&gt;&lt;div class="inscrollbar"&gt;&amp;nbsp;&lt;/div&gt;&lt;/div&gt;
-      &lt;/td&gt;
-    &lt;td id="buff"&gt;&lt;/td&gt;
-&lt;/tr&gt;
-&lt;/table&gt;
-#set($url = "$xwiki.getURL('XWiki.Tableresults')?xpage=plain")
-{pre}
-&lt;script type="text/javascript"&gt;
+<template></template>
+<defaultTemplate></defaultTemplate>
+<validationScript></validationScript>
+<comment></comment>
+<minorEdit>false</minorEdit>
+<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.Tableview</name>
+<number>0</number>
+<className>XWiki.TagClass</className>
+<property>
+<tags/>
+</property>
+</object>
+<content>&lt;div id="ajax-loader"&gt;$msg.get("ui.ajaxTable.loading")&lt;br /&gt;
+  &lt;img src="$xwiki.getSkinFile('icons/ajax-loader.gif')" alt="$msg.get('ui.ajaxTable.loading')" title="" /&gt;
+&lt;/div&gt;
+&lt;table id="alldocstable"&gt;
+&lt;tr&gt;
+ &lt;td colspan="2" style="padding-top:10px;"&gt;
+   &lt;span id="showLimits"&gt;&lt;/span&gt;
+ &lt;/td&gt;
+&lt;/tr&gt;
+&lt;tr&gt;&lt;td style="width:100%"&gt;
+      &lt;table class="display"&gt;
+       &lt;thead class="theader"&gt;
+          &lt;tr&gt;
+            &lt;td&gt;$msg.get("wikiname")&lt;/td&gt;
+            &lt;td&gt;$msg.get("wikiweb")&lt;/td&gt;
+            &lt;td&gt;$msg.get("date")&lt;/td&gt;
+            &lt;td&gt;$msg.get("lastauthor")&lt;/td&gt;
+            #if($xwiki.hasAdminRights())&lt;td&gt;$msg.get("actions")&lt;/td&gt;#end
+          &lt;/tr&gt;
+          &lt;tr id="table-filters"&gt;
+              &lt;td&gt;&lt;input name="page" type="text"/&gt;&lt;/td&gt;
+              &lt;td&gt;&lt;input name="space" type="text"/&gt;&lt;/td&gt;
+              &lt;td&gt;&lt;/td&gt; ## date
+              &lt;td&gt;&lt;input name="author" type="text" /&gt;&lt;/td&gt;
+              #if($xwiki.hasAdminRights())&lt;td&gt;&lt;/td&gt;#end
+          &lt;/tr&gt;
+       &lt;/thead&gt;
+       &lt;tbody id="display1"&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;
+      &lt;/table&gt;&lt;/td&gt;
+      &lt;td valign="top"&gt;
+        &lt;div id="scrollbar1" class="scrollbar"&gt;&lt;div class="inscrollbar"&gt;&amp;nbsp;&lt;/div&gt;&lt;/div&gt;
+      &lt;/td&gt;
+    &lt;td id="buff"&gt;&lt;/td&gt;
+&lt;/tr&gt;
+&lt;/table&gt;
+#if(! $xwiki.hasAccessLevel("view", $context.user, "Stats.Activity"))
+ #info($msg.get("rightsmanager.documentrequireviewrights"))
+#end
+#set($url = "$xwiki.getURL('XWiki.Tableresults')?xpage=plain")
+{pre}
+&lt;script type="text/javascript"&gt;
 //<![CDATA[
-function displayAllDocs(row, i, table)
-{
-  var a = new Element('a', {'href' : row.url}).update(row.page);
-  var page = new Element('td', {'class' : 'pagename'}).update(a);
-  var tr = new Element('tr', {'class' : (i % 2 == 0) ? 'even' : 'odd'} ).update(page);
-  var spaceurl = new Element('a', {'href': row.spaceurl}).update(row.space);
-  var space = new Element('td').update(spaceurl);
-  tr.appendChild(space);
-  if(row.virtual) {
-   var wikiurl = new Element('a', {'href' : row.wikiurl}).update(row.wiki);
-   var wiki = new Element('td').update(wikiurl);
-   tr.appendChild(wiki);
-  }
-  var date = new Element('td').update(row.date);
-  tr.appendChild(date);
-  if(row.authorpage) {
-  	var authorpage = new Element('a', {'href' : row.authorpage}).update(row.author);
-  	var author = new Element('td').update(authorpage);
-  }
-  else
-    var author = new Element('td').update(row.author);
-  tr.appendChild(author);
-  var copy =   new Element('a', {'href' : row.copyurl}).update("$msg.get('copy')");
-  var del = new Element('a', {'href' : row.deleteurl}).update("$msg.get('delete')");
-  var rename = new Element('a', {'href' : row.renameurl}).update("$msg.get('rename')");
-  var rights = new Element('a', {'href' : row.rightsurl}).update("$msg.get('rights')");
-  if(row.hasadmin) {
-  	var actions = new Element('td');
-  	actions.appendChild(copy);
-  	actions.appendChild(new Element('span').update("-"));
-  	actions.appendChild(del);
-  	actions.appendChild(new Element('span').update("-"));
-  	actions.appendChild(rename);
-  	actions.appendChild(new Element('span').update("-"));
-  	actions.appendChild(rights);
-  	tr.appendChild(actions);
-  }
-
-  return tr;
-}
-var ta = new ASSTable("$url", 15, "display1", "scrollbar1", "alldocstable", displayAllDocs, true);
+function displayAllDocs(row, i, table)
+{
+  if(row.acclev == true)
+  {
+      var a = new Element('a', {'href' : row.url}).update(row.page);
+      var page = new Element('td', {'class' : 'pagename'}).update(a);
+      var tr = new Element('tr', {'class' : (i % 2 == 0) ? 'even' : 'odd'} ).update(page);
+	  var spaceurl = new Element('a', {'href': row.spaceurl}).update(row.space);
+	  var space = new Element('td').update(spaceurl);
+	  tr.appendChild(space);
+	  if(row.virtual) {
+	   var wikiurl = new Element('a', {'href' : row.wikiurl}).update(row.wiki);
+	   var wiki = new Element('td').update(wikiurl);
+	   tr.appendChild(wiki);
+	  }
+	  var date = new Element('td').update(row.date);
+	  tr.appendChild(date);
+	  if(row.authorpage) {
+	  	var authorpage = new Element('a', {'href' : row.authorpage}).update(row.author);
+	  	var author = new Element('td').update(authorpage);
+	  }
+	  else
+	    var author = new Element('td').update(row.author);
+	    tr.appendChild(author);
+		var copy =   new Element('a', {'href' : row.copyurl}).update("$msg.get('copy')");
+		var del = new Element('a', {'href' : row.deleteurl}).update("$msg.get('delete')");
+		var rename = new Element('a', {'href' : row.renameurl}).update("$msg.get('rename')");
+		var rights = new Element('a', {'href' : row.rightsurl}).update("$msg.get('rights')");
+		if(row.hasadmin) {
+		 var actions = new Element('td');
+		 actions.appendChild(copy);
+		 actions.appendChild(new Element('span').update("-"));
+		 actions.appendChild(del);
+		 actions.appendChild(new Element('span').update("-"));
+		 actions.appendChild(rename);
+		 actions.appendChild(new Element('span').update("-"));
+		 actions.appendChild(rights);
+		 tr.appendChild(actions);
+	    }
+	
+	  return tr;
+	}
+	else {
+	  var tr = new Element('tr', {'class' : (i % 2 == 0) ? 'even' : 'odd'} );
+	  var page = row.fullname;
+	  var dp = page.indexOf(':');
+	  var p = page.indexOf('.');
+	  if(dp &gt; 0)
+	    var space = page.substring(dp + 1, p);
+	  else  
+	   var space = page.substring(0, p);
+	  var name = page.substring(p + 1);
+	  var td1 = new Element('td', {'class' : 'pagename'}).update(name + "*");
+	  var td2 = new Element('td').update(space);
+	  var td3 = new Element('td').update(" ");
+	  var td4 = new Element('td').update(" ");
+	  tr.appendChild(td1);
+	  tr.appendChild(td2);
+	  tr.appendChild(td3);
+	  tr.appendChild(td4);
+	  
+	  return tr;
+	}
+}
+var ta = new ASSTable("$url", 15, "display1", "scrollbar1", "alldocstable", displayAllDocs, true);
 //]]>
-&lt;/script&gt;
-{/pre}</content>
-</xwikidoc>
+&lt;/script&gt;
+{/pre}</content>
+</xwikidoc>
