On 02/02/2010 07:13 PM, vmassol (SVN) wrote:
Author: vmassol
Date: 2010-02-02 19:13:59 +0100 (Tue, 02 Feb 2010)
New Revision: 26615
Modified:
platform/web/trunk/standard/src/main/webapp/resources/js/xwiki/xwiki.js
platform/web/trunk/standard/src/main/webapp/templates/javascript.vm
Log:
XWIKI-4841: Section editing links should not appear on pages for which users don't
have edit rights
* Use boolean (good suggestion from Jerome Velociter)
Modified: platform/web/trunk/standard/src/main/webapp/templates/javascript.vm
===================================================================
--- platform/web/trunk/standard/src/main/webapp/templates/javascript.vm 2010-02-02
18:02:33 UTC (rev 26614)
+++ platform/web/trunk/standard/src/main/webapp/templates/javascript.vm 2010-02-02
18:13:59 UTC (rev 26615)
@@ -36,7 +36,7 @@
XWiki.docisnew = $!doc.isNew();
XWiki.docsyntax = "$!doc.getSyntaxId()";
XWiki.blacklistedSpaces = [ #foreach($space in
$blacklistedSpaces)#if($velocityCount> 1),#end"$space"#end ];
-XWiki.hasEdit = "$hasEdit";
+XWiki.hasEdit = #if($hasEdit) true #else false #end;
Why not simply
XWiki.hasEdit = ${hasEdit};
since it is a boolean and will be printed as a boolean.
--
Sergiu Dumitriu
http://purl.org/net/sergiu/