Author: tmortagne Date: 2007-11-19 17:24:20 +0100 (Mon, 19 Nov 2007) New Revision: 6019
Modified: xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/WikiCode/DeleteWikiCode xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/WikiCode/LastCreatedWikisWidget xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/WikiCode/LastWikiModificationsCode xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/WikiCode/LastWikiModificationsWidget xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/WikiCode/Macros xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/WikiCode/MyLastWikiModificationsWidget xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/WikiCode/SetWikiVisibilityCode xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/WikiCode/UserWikisIsAdminWidget xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/WikiCode/UserWikisIsOwnerWidget xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/WikiCode/UserWikisIsUserWidget xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/WikiManager/CreateNewWiki xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/WikiManager/WebHome xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/WikiResources/Translations xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/XApp/XWikiApplicationWikiManager xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/XApp/XWikiApplicationXwikiserverclass xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/XWiki/XWikiServerClass xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/XWiki/XWikiServerClassSheet xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/XWiki/XWikiServerClassTemplate Log: XAWM-23: Separate wiki and wiki alias concepts. Modified: xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/WikiCode/DeleteWikiCode =================================================================== --- xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/WikiCode/DeleteWikiCode 2007-11-19 16:19:09 UTC (rev 6018) +++ xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/WikiCode/DeleteWikiCode 2007-11-19 16:24:20 UTC (rev 6019) @@ -13,8 +13,8 @@ <contentAuthor>XWiki.Admin</contentAuthor> <creationDate>1190984758000</creationDate> <date>1194018382000</date> -<contentUpdateDate>1194018382000</contentUpdateDate> -<version>1.2</version> +<contentUpdateDate>1195305639000</contentUpdateDate> +<version>1.1</version> <title></title> <template></template> <defaultTemplate></defaultTemplate> @@ -53,18 +53,18 @@ <tags/> </property> </object> -<content>#if($action == "delete") - #if($confirm && $confirm == 1) - #set($result = $WikiManager.deleteWiki($wikiname, $serverid)) - #if ($result == $Exception.ERROR_NOERROR) - #info($msg.get("wikimanager.successdeletewiki", [$wikiname])) - #elseif ($result == $Exception.ERROR_XWIKI_ACCESS_DENIED) - #error($msg.get("notallowed")) - #else - #error($msg.get("wikimanager.errordeletewiki", [$wikiname, $result])) - #end - #else - #xwikimessagebox($msg.get("wikimanager.answer.deletewiki.title") $msg.get("wikimanager.answer.deletewiki.msg", [$wikiname]) $doc.getURL("view", "$!request.queryString&confirm=1") $doc.getURL("view") $msg.get("yes") $msg.get("no")) - #end +<content>#if($action == "delete") + #if($confirm && $confirm == 1) + #set($result = $WikiManager.deleteWiki($wikiname, $serverid)) + #if ($result == $Exception.ERROR_NOERROR) + #info($msg.get("wikimanager.successdeletewiki", [$wikiname])) + #elseif ($result == $Exception.ERROR_XWIKI_ACCESS_DENIED) + #error($msg.get("notallowed")) + #else + #error($msg.get("wikimanager.errordeletewiki", [$wikiname, $result])) + #end + #else + #xwikimessagebox($msg.get("wikimanager.answer.deletewiki.title") $msg.get("wikimanager.answer.deletewiki.msg", [$wikiname]) $doc.getURL("view", "$!request.queryString&confirm=1") $doc.getURL("view") $msg.get("yes") $msg.get("no")) + #end #end</content> </xwikidoc> Modified: xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/WikiCode/LastCreatedWikisWidget =================================================================== --- xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/WikiCode/LastCreatedWikisWidget 2007-11-19 16:19:09 UTC (rev 6018) +++ xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/WikiCode/LastCreatedWikisWidget 2007-11-19 16:24:20 UTC (rev 6019) @@ -13,7 +13,7 @@ <contentAuthor>XWiki.Admin</contentAuthor> <creationDate>1191861931000</creationDate> <date>1192548685000</date> -<contentUpdateDate>1192719385000</contentUpdateDate> +<contentUpdateDate>1195305639000</contentUpdateDate> <version>1.1</version> <title></title> <template></template> Modified: xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/WikiCode/LastWikiModificationsCode =================================================================== --- xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/WikiCode/LastWikiModificationsCode 2007-11-19 16:19:09 UTC (rev 6018) +++ xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/WikiCode/LastWikiModificationsCode 2007-11-19 16:24:20 UTC (rev 6019) @@ -13,8 +13,8 @@ <contentAuthor>XWiki.Admin</contentAuthor> <creationDate>1191514175000</creationDate> <date>1195044573000</date> -<contentUpdateDate>1195044573000</contentUpdateDate> -<version>1.29</version> +<contentUpdateDate>1195305639000</contentUpdateDate> +<version>1.1</version> <title></title> <template></template> <defaultTemplate></defaultTemplate> @@ -53,34 +53,34 @@ <tags/> </property> </object> -<content>#includeMacros("WikiCode.Macros") - -############################################################################# - -#if(!$nb) - #set($nb = 30) -#end - -#if(!$wikinamelist) - #if(!$wikiname) - #set($wikinamelist = [$context.Database]) - #else - #set($wikinamelist = [$wikiname]) - #end -#end - -#set($documentlist = []) -#foreach($wikiname in $wikinamelist) - #addlastwikimodifications($documentlist $wikiname $usermodifications $usermodificationswiki $nb) -#end - -#if($documentlist.size() > $nb) - #set($documentlist = $documentlist.subList(0, $nb)) -#end - -############################################################################# - -#foreach ($item in $documentlist) - #displaymodification($item.name $item.prefixedFullName $item.date $formatDate $item.author true) +<content>#includeMacros("WikiCode.Macros") + +############################################################################# + +#if(!$nb) + #set($nb = 30) +#end + +#if(!$wikinamelist) + #if(!$wikiname) + #set($wikinamelist = [$context.Database]) + #else + #set($wikinamelist = [$wikiname]) + #end +#end + +#set($documentlist = []) +#foreach($wikiname in $wikinamelist) + #addlastwikimodifications($documentlist $wikiname $usermodifications $usermodificationswiki $nb) +#end + +#if($documentlist.size() > $nb) + #set($documentlist = $documentlist.subList(0, $nb)) +#end + +############################################################################# + +#foreach ($item in $documentlist) + #displaymodification($item.name $item.prefixedFullName $item.date $formatDate $item.author true) #end</content> </xwikidoc> Modified: xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/WikiCode/LastWikiModificationsWidget =================================================================== --- xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/WikiCode/LastWikiModificationsWidget 2007-11-19 16:19:09 UTC (rev 6018) +++ xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/WikiCode/LastWikiModificationsWidget 2007-11-19 16:24:20 UTC (rev 6019) @@ -13,8 +13,8 @@ <contentAuthor>XWiki.Admin</contentAuthor> <creationDate>1191858101000</creationDate> <date>1195041935000</date> -<contentUpdateDate>1195041935000</contentUpdateDate> -<version>1.5</version> +<contentUpdateDate>1195305639000</contentUpdateDate> +<version>1.1</version> <title></title> <template></template> <defaultTemplate></defaultTemplate> @@ -96,33 +96,33 @@ <category>Information</category> </property> <property> -<content>#panelheader($msg.get("wikimanager.widget.lastmodifications.title")) - - #includeMacros("WikiCode.Macros") - - #set($WikiManager = $xwiki.wikimanager) - #set($Exception = $WikiManager.DefaultException) - -############################################################################# - - #if(!$allwikilist) - #set($allwikilist = $WikiManager.getWikiDocumentList()) - #end - - #if(!$allwikinamelist) - #set($allwikinamelist = [$context.mainWiki]) - - #foreach($wikidoc in $wikilist) - #set($added = $allwikinamelist.add($wikidoc.wikiName)) - #end - #end - - #set($wikinamelist = $allwikinamelist) - -############################################################################# - - #includeInContext("WikiCode.LastWikiModificationsCode") - +<content>#panelheader($msg.get("wikimanager.widget.lastmodifications.title")) + + #includeMacros("WikiCode.Macros") + + #set($WikiManager = $xwiki.wikimanager) + #set($Exception = $WikiManager.DefaultException) + +############################################################################# + + #if(!$allwikilist) + #set($allwikilist = $WikiManager.getWikiDocumentList()) + #end + + #if(!$allwikinamelist) + #set($allwikinamelist = [$context.mainWiki]) + + #foreach($wikidoc in $wikilist) + #set($added = $allwikinamelist.add($wikidoc.wikiName)) + #end + #end + + #set($wikinamelist = $allwikinamelist) + +############################################################################# + + #includeInContext("WikiCode.LastWikiModificationsCode") + #panelfooter()</content> </property> <property> Modified: xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/WikiCode/Macros =================================================================== --- xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/WikiCode/Macros 2007-11-19 16:19:09 UTC (rev 6018) +++ xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/WikiCode/Macros 2007-11-19 16:24:20 UTC (rev 6019) @@ -13,8 +13,8 @@ <contentAuthor>XWiki.Admin</contentAuthor> <creationDate>1191500546000</creationDate> <date>1195043959000</date> -<contentUpdateDate>1195043959000</contentUpdateDate> -<version>1.19</version> +<contentUpdateDate>1195305639000</contentUpdateDate> +<version>1.1</version> <title></title> <template></template> <defaultTemplate></defaultTemplate> @@ -53,82 +53,82 @@ <tags/> </property> </object> -<content>#macro(sortDocumentByCreationDate $documentlist $sorteddocumentlist $asc) - #set($sorteddocumentlist = []) - - #if($documentlist.size() >0) - #set($doc0 = $documentlist.get(0)) - - #foreach($doc1 in $documentlist) - - #foreach($doc2 in $documentlist) - #if (!$sorteddocumentlist.contains($doc2)) - #if($sorteddocumentlist.contains($doc0) || ($asc && ($doc0.creationDate.compareTo($doc2.creationDate)) > 0) || (!$asc && ($doc0.creationDate.compareTo($doc2.creationDate) < 0))) - #set($doc0 = $doc2) - #end - #end - #end - - #set($added = $sorteddocumentlist.add($doc0)) - #end - #end -#end - -#macro(displaymodification $pagename $pagelink $date $formatDate $user $star) - #if(!$formatDate) - #set($formatDate = $msg.get("wikimanager.defaultdatetimeformat")) - #end - #if($formatDate == "wikimanager.defaultdatetimeformat") - #set($formatDate = "yyyy MMMM dd 'at' HH:mm") - #end - - #set($username = $xwiki.getUserName($user)) - #if ($username == "XWikiGuest") - #set($username = "Guest") - #end - - #if($star)*#end [$pagename>$pagelink] $xwiki.formatDate($date, $formatDate) $username -#end - -#macro(addlastwikimodifications $documentlist $wikiname $usermodifications $usermodificationswiki $nb) - #set($currentwiki = $context.database) - #if($wikiname) - $context.setDatabase($wikiname) - #else - #set($wikiname = $context.Database) - #end - - #set($sql = "where 1=1") - #if($usermodifications) - #if($context.database != $usermodificationswiki) - #set($sql = "${sql} and doc.author='${usermodificationswiki}:${usermodifications}'") - #else - #set($sql = "${sql} and doc.author='${usermodifications}'") - #end - #end - #set($sql = "${sql} order by doc.date desc") - - #set($list = $xwiki.searchDocuments($sql , $nb , 0)) - - #foreach($docname in $list) - #if ($xwiki.hasAccessLevel("view", $context.user, "${context.database}:${docname}")) - #set($item = $xwiki.getDocument($docname)) - #set($insertAt = $xwiki.null) - #foreach($sorteddoc in $documentlist) - #if(!$insertAt && $sorteddoc.date.before($item.date)) - #set($inserAt = $velocityCount-1) - #end - #end - #if($inserAt) - #set($added = $documentlist.add($inserAt, $item)) - #else - #set($added = $documentlist.add($item)) - #end - #end - #end - - #if($context.database != $currentwiki) - $context.setDatabase($currentwiki) - #end +<content>#macro(sortDocumentByCreationDate $documentlist $sorteddocumentlist $asc) + #set($sorteddocumentlist = []) + + #if($documentlist.size() >0) + #set($doc0 = $documentlist.get(0)) + + #foreach($doc1 in $documentlist) + + #foreach($doc2 in $documentlist) + #if (!$sorteddocumentlist.contains($doc2)) + #if($sorteddocumentlist.contains($doc0) || ($asc && ($doc0.creationDate.compareTo($doc2.creationDate)) > 0) || (!$asc && ($doc0.creationDate.compareTo($doc2.creationDate) < 0))) + #set($doc0 = $doc2) + #end + #end + #end + + #set($added = $sorteddocumentlist.add($doc0)) + #end + #end +#end + +#macro(displaymodification $pagename $pagelink $date $formatDate $user $star) + #if(!$formatDate) + #set($formatDate = $msg.get("wikimanager.defaultdatetimeformat")) + #end + #if($formatDate == "wikimanager.defaultdatetimeformat") + #set($formatDate = "yyyy MMMM dd 'at' HH:mm") + #end + + #set($username = $xwiki.getUserName($user)) + #if ($username == "XWikiGuest") + #set($username = "Guest") + #end + + #if($star)*#end [$pagename>$pagelink] $xwiki.formatDate($date, $formatDate) $username +#end + +#macro(addlastwikimodifications $documentlist $wikiname $usermodifications $usermodificationswiki $nb) + #set($currentwiki = $context.database) + #if($wikiname) + $context.setDatabase($wikiname) + #else + #set($wikiname = $context.Database) + #end + + #set($sql = "where 1=1") + #if($usermodifications) + #if($context.database != $usermodificationswiki) + #set($sql = "${sql} and doc.author='${usermodificationswiki}:${usermodifications}'") + #else + #set($sql = "${sql} and doc.author='${usermodifications}'") + #end + #end + #set($sql = "${sql} order by doc.date desc") + + #set($list = $xwiki.searchDocuments($sql , $nb , 0)) + + #foreach($docname in $list) + #if ($xwiki.hasAccessLevel("view", $context.user, "${context.database}:${docname}")) + #set($item = $xwiki.getDocument($docname)) + #set($insertAt = $xwiki.null) + #foreach($sorteddoc in $documentlist) + #if(!$insertAt && $sorteddoc.date.before($item.date)) + #set($inserAt = $velocityCount-1) + #end + #end + #if($inserAt) + #set($added = $documentlist.add($inserAt, $item)) + #else + #set($added = $documentlist.add($item)) + #end + #end + #end + + #if($context.database != $currentwiki) + $context.setDatabase($currentwiki) + #end #end</content> </xwikidoc> Modified: xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/WikiCode/MyLastWikiModificationsWidget =================================================================== --- xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/WikiCode/MyLastWikiModificationsWidget 2007-11-19 16:19:09 UTC (rev 6018) +++ xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/WikiCode/MyLastWikiModificationsWidget 2007-11-19 16:24:20 UTC (rev 6019) @@ -13,8 +13,8 @@ <contentAuthor>XWiki.Admin</contentAuthor> <creationDate>1191862105000</creationDate> <date>1192967360000</date> -<contentUpdateDate>1192967360000</contentUpdateDate> -<version>1.2</version> +<contentUpdateDate>1195305639000</contentUpdateDate> +<version>1.1</version> <title></title> <template></template> <defaultTemplate></defaultTemplate> @@ -96,34 +96,34 @@ <category>Information</category> </property> <property> -<content>#panelheader($msg.get("wikimanager.widget.mylastmodifications.title")) - - #includeMacros("WikiCode.Macros") - - #set($WikiManager = $xwiki.wikimanager) - #set($Exception = $WikiManager.DefaultException) - -############################################################################# - - #if(!$allwikilist) - #set($allwikilist = $WikiManager.getWikiDocumentList()) - #end - - #if(!$allwikinamelist) - #set($allwikinamelist = [$context.mainWiki]) - #foreach($wikidoc in $wikilist) - #set($added = $allwikinamelist.add($wikidoc.wikiName)) - #end - #end - - #set($wikinamelist = $allwikinamelist) - -############################################################################# - - #set($usermodifications = "${context.user}") - #set($usermodificationswiki = "${context.database}") - #includeInContext("WikiCode.LastWikiModificationsCode") - +<content>#panelheader($msg.get("wikimanager.widget.mylastmodifications.title")) + + #includeMacros("WikiCode.Macros") + + #set($WikiManager = $xwiki.wikimanager) + #set($Exception = $WikiManager.DefaultException) + +############################################################################# + + #if(!$allwikilist) + #set($allwikilist = $WikiManager.getWikiDocumentList()) + #end + + #if(!$allwikinamelist) + #set($allwikinamelist = [$context.mainWiki]) + #foreach($wikidoc in $wikilist) + #set($added = $allwikinamelist.add($wikidoc.wikiName)) + #end + #end + + #set($wikinamelist = $allwikinamelist) + +############################################################################# + + #set($usermodifications = "${context.user}") + #set($usermodificationswiki = "${context.database}") + #includeInContext("WikiCode.LastWikiModificationsCode") + #panelfooter()</content> </property> <property> Modified: xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/WikiCode/SetWikiVisibilityCode =================================================================== --- xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/WikiCode/SetWikiVisibilityCode 2007-11-19 16:19:09 UTC (rev 6018) +++ xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/WikiCode/SetWikiVisibilityCode 2007-11-19 16:24:20 UTC (rev 6019) @@ -13,8 +13,8 @@ <contentAuthor>XWiki.Admin</contentAuthor> <creationDate>1190985121000</creationDate> <date>1194019884000</date> -<contentUpdateDate>1194019884000</contentUpdateDate> -<version>1.5</version> +<contentUpdateDate>1195305639000</contentUpdateDate> +<version>1.1</version> <title></title> <template></template> <defaultTemplate></defaultTemplate> @@ -53,14 +53,14 @@ <tags/> </property> </object> -<content>#if($action == "setvisibility") - #set($result = $WikiManager.setWikiVisibility($wikiname, $serverid, $wikivisibility)) - #if ($result == $Exception.ERROR_NOERROR) - #info($msg.get("wikimanager.successsetvisibility", [$wikiname, $wikivisibility])) - #elseif ($result == $Exception.ERROR_XWIKI_ACCESS_DENIED) - #error($msg.get("notallowed")) - #else - #error($msg.get("wikimanager.errorsetvisibility", [$wikiname, $result])) - #end +<content>#if($action == "setvisibility") + #set($result = $WikiManager.setWikiVisibility($wikiname, $serverid, $wikivisibility)) + #if ($result == $Exception.ERROR_NOERROR) + #info($msg.get("wikimanager.successsetvisibility", [$wikiname, $wikivisibility])) + #elseif ($result == $Exception.ERROR_XWIKI_ACCESS_DENIED) + #error($msg.get("notallowed")) + #else + #error($msg.get("wikimanager.errorsetvisibility", [$wikiname, $result])) + #end #end</content> </xwikidoc> Modified: xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/WikiCode/UserWikisIsAdminWidget =================================================================== --- xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/WikiCode/UserWikisIsAdminWidget 2007-11-19 16:19:09 UTC (rev 6018) +++ xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/WikiCode/UserWikisIsAdminWidget 2007-11-19 16:24:20 UTC (rev 6019) @@ -13,7 +13,7 @@ <contentAuthor>XWiki.Admin</contentAuthor> <creationDate>1191861990000</creationDate> <date>1192549257000</date> -<contentUpdateDate>1192719385000</contentUpdateDate> +<contentUpdateDate>1195305639000</contentUpdateDate> <version>1.1</version> <title></title> <template></template> Modified: xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/WikiCode/UserWikisIsOwnerWidget =================================================================== --- xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/WikiCode/UserWikisIsOwnerWidget 2007-11-19 16:19:09 UTC (rev 6018) +++ xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/WikiCode/UserWikisIsOwnerWidget 2007-11-19 16:24:20 UTC (rev 6019) @@ -13,7 +13,7 @@ <contentAuthor>XWiki.Admin</contentAuthor> <creationDate>1191862009000</creationDate> <date>1192549207000</date> -<contentUpdateDate>1192719385000</contentUpdateDate> +<contentUpdateDate>1195305639000</contentUpdateDate> <version>1.1</version> <title></title> <template></template> Modified: xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/WikiCode/UserWikisIsUserWidget =================================================================== --- xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/WikiCode/UserWikisIsUserWidget 2007-11-19 16:19:09 UTC (rev 6018) +++ xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/WikiCode/UserWikisIsUserWidget 2007-11-19 16:24:20 UTC (rev 6019) @@ -13,7 +13,7 @@ <contentAuthor>XWiki.Admin</contentAuthor> <creationDate>1191861970000</creationDate> <date>1192548761000</date> -<contentUpdateDate>1192719385000</contentUpdateDate> +<contentUpdateDate>1195305639000</contentUpdateDate> <version>1.1</version> <title></title> <template></template> Modified: xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/WikiManager/CreateNewWiki =================================================================== --- xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/WikiManager/CreateNewWiki 2007-11-19 16:19:09 UTC (rev 6018) +++ xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/WikiManager/CreateNewWiki 2007-11-19 16:24:20 UTC (rev 6019) @@ -13,8 +13,8 @@ <contentAuthor>XWiki.Admin</contentAuthor> <creationDate>1186676964000</creationDate> <date>1195049983000</date> -<contentUpdateDate>1195049983000</contentUpdateDate> -<version>1.3</version> +<contentUpdateDate>1195305639000</contentUpdateDate> +<version>1.1</version> <title></title> <template></template> <defaultTemplate></defaultTemplate> @@ -53,108 +53,108 @@ <tags/> </property> </object> -<content>#set($wikimanager = $xwiki.wikimanager) -#set($Exception = $wikimanager.DefaultException) - -#set($domainname = "localdomain.com") - -#set($wikidocument = $wikimanager.createWikiDocument()) -#set($wikidocumentobject = $wikidocument.updateObjectFromRequest("XWiki.XWikiServerClass")) - -#set($action = $request.getParameter("action")) - -#set($wikiname = $request.getParameter("wikiname")) -#set($wikitemplate = $request.getParameter("wikitemplate")) -#set($wikipackage = $request.getParameter("wikipackage")) -#if ($wikidocument.owner == "") - $wikidocument.set("owner", $context.user) -#end -#if ($wikidocument.server == "" && $wikiname && $wikiname != "") - $wikidocument.set("server", "${wikiname}.${domainname}") -#end - -############################################################################# - -1 $msg.get("wikimanager.createwiki") - -#if ($action && $action == "create") - #set($result = $wikimanager.createNewWiki($wikiname, $wikitemplate, $wikipackage, $wikidocument, true)) - - #if ($result == $Exception.ERROR_NOERROR) - #info($msg.get("wikimanager.successcreatewiki", [$wikiname, $wikidocument.getHomePageUrl()])) - #else - #if ($result == $Exception.ERROR_WM_WIKIALREADYEXISTS) - #error($msg.get("wikimanager.errorcreatewiki.ERROR_WM_WIKIALREADYEXISTS", [$wikiname, $result])) - #else - #error($msg.get("wikimanager.errorcreatewiki", [$wikiname, $result])) - #end - #end -#end - -<style> - .xem_userlisttable td {} -</style> - -<form method="get" name="createwiki"> - <input type="hidden" name="action" value="create"> - - <table width="100%"> - <tr> - <td>$msg.get("wikimanager.wikiname")</td> - <td><input size="30" id="wikiname" name="wikiname" type="text"></td> - <td id="wikinameerrormsg" width="40%"></td> - </tr> - <tr> - <td>$msg.get("wikimanager.wikidesc")</td> - <td>$wikidocument.display("description", "edit")</td> - <td id="wikidescerrormsg" width="40%"></td> - </tr> - <tr> - <td>$msg.get("wikimanager.wikidomain")</td> - <td>$wikidocument.display("server", "edit")</td> - <td id="wikidomainerrormsg" width="40%"></td> - </tr> - <tr> - <td>$msg.get("wikimanager.wikiadmin")</td> - <td>$wikidocument.display("owner", "edit")</td> - <td id="wikiadminerrormsg" width="40%"></td> - </tr> - <tr> - <td>$msg.get("wikimanager.wikivisibility")</td> - <td>$wikidocument.display("visibility", "edit")</td> - <td id="wikivisibilityerrormsg" width="40%"></td> - </tr> - <tr> - <td>$msg.get("wikimanager.wikistate")</td> - <td>$wikidocument.display("state", "edit")</td> - <td id="wikistateerrormsg" width="40%"></td> - </tr> - <tr> - <td>$msg.get("wikimanager.wikitemplate")</td> - <td> - <select name="wikitemplate" id="wikitemplate"> - <option value=""></option> - #set($listtemplate=$wikimanager.getWikiTemplateList()) - #foreach ($template in $listtemplate) - <option value="$template.wikiName">$template.wikiName</option> - #end - </select> - </td> - <tr> - <td>$msg.get("wikimanager.wikipackage")</td> - <td> - <select name="wikipackage" id="wikipackage"> - <option value=""></option> - #set($listpackage=$doc.getAttachmentList()) - #foreach ($package in $listpackage) - <option value="$package.getFilename()">$package.getFilename()</option> - #end - </select> - </td> - <td id="wikitemplateerrormsg" width="40%"></td> - </tr> - </table> - - <input type="submit" value="create"> +<content>#set($wikimanager = $xwiki.wikimanager) +#set($Exception = $wikimanager.DefaultException) + +#set($domainname = "localdomain.com") + +#set($wikidocument = $wikimanager.createWikiDocument()) +#set($wikidocumentobject = $wikidocument.updateObjectFromRequest("XWiki.XWikiServerClass")) + +#set($action = $request.getParameter("action")) + +#set($wikiname = $request.getParameter("wikiname")) +#set($wikitemplate = $request.getParameter("wikitemplate")) +#set($wikipackage = $request.getParameter("wikipackage")) +#if ($wikidocument.owner == "") + $wikidocument.set("owner", $context.user) +#end +#if ($wikidocument.server == "" && $wikiname && $wikiname != "") + $wikidocument.set("server", "${wikiname}.${domainname}") +#end + +############################################################################# + +1 $msg.get("wikimanager.createwiki") + +#if ($action && $action == "create") + #set($result = $wikimanager.createNewWiki($wikiname, $wikitemplate, $wikipackage, $wikidocument, true)) + + #if ($result == $Exception.ERROR_NOERROR) + #info($msg.get("wikimanager.successcreatewiki", [$wikiname, $wikidocument.getHomePageUrl()])) + #else + #if ($result == $Exception.ERROR_WM_WIKIALREADYEXISTS) + #error($msg.get("wikimanager.errorcreatewiki.ERROR_WM_WIKIALREADYEXISTS", [$wikiname, $result])) + #else + #error($msg.get("wikimanager.errorcreatewiki", [$wikiname, $result])) + #end + #end +#end + +<style> + .xem_userlisttable td {} +</style> + +<form method="get" name="createwiki"> + <input type="hidden" name="action" value="create"> + + <table width="100%"> + <tr> + <td>$msg.get("wikimanager.wikiname")</td> + <td><input size="30" id="wikiname" name="wikiname" type="text"></td> + <td id="wikinameerrormsg" width="40%"></td> + </tr> + <tr> + <td>$msg.get("wikimanager.wikidesc")</td> + <td>$wikidocument.display("description", "edit")</td> + <td id="wikidescerrormsg" width="40%"></td> + </tr> + <tr> + <td>$msg.get("wikimanager.wikidomain")</td> + <td>$wikidocument.display("server", "edit")</td> + <td id="wikidomainerrormsg" width="40%"></td> + </tr> + <tr> + <td>$msg.get("wikimanager.wikiadmin")</td> + <td>$wikidocument.display("owner", "edit")</td> + <td id="wikiadminerrormsg" width="40%"></td> + </tr> + <tr> + <td>$msg.get("wikimanager.wikivisibility")</td> + <td>$wikidocument.display("visibility", "edit")</td> + <td id="wikivisibilityerrormsg" width="40%"></td> + </tr> + <tr> + <td>$msg.get("wikimanager.wikistate")</td> + <td>$wikidocument.display("state", "edit")</td> + <td id="wikistateerrormsg" width="40%"></td> + </tr> + <tr> + <td>$msg.get("wikimanager.wikitemplate")</td> + <td> + <select name="wikitemplate" id="wikitemplate"> + <option value=""></option> + #set($listtemplate=$wikimanager.getWikiTemplateList()) + #foreach ($template in $listtemplate) + <option value="$template.wikiName">$template.wikiName</option> + #end + </select> + </td> + <tr> + <td>$msg.get("wikimanager.wikipackage")</td> + <td> + <select name="wikipackage" id="wikipackage"> + <option value=""></option> + #set($listpackage=$doc.getAttachmentList()) + #foreach ($package in $listpackage) + <option value="$package.getFilename()">$package.getFilename()</option> + #end + </select> + </td> + <td id="wikitemplateerrormsg" width="40%"></td> + </tr> + </table> + + <input type="submit" value="create"> </form></content> </xwikidoc> Modified: xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/WikiManager/WebHome =================================================================== --- xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/WikiManager/WebHome 2007-11-19 16:19:09 UTC (rev 6018) +++ xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/WikiManager/WebHome 2007-11-19 16:24:20 UTC (rev 6019) @@ -12,9 +12,9 @@ <customClass></customClass> <contentAuthor>XWiki.Admin</contentAuthor> <creationDate>1186676868000</creationDate> -<date>1194019499000</date> -<contentUpdateDate>1194019499000</contentUpdateDate> -<version>1.12</version> +<date>1195484631000</date> +<contentUpdateDate>1195484631000</contentUpdateDate> +<version>1.24</version> <title></title> <template></template> <defaultTemplate></defaultTemplate> @@ -79,13 +79,15 @@ ############################################################################# -#set($list = $WikiManager.getWikiDocumentList()) +#set($wikiList = $WikiManager.getAllWikis()) <div style="font-weight:bold;"> - $msg.get("wikimanager.totalnumberofwiki") : $list.size()<br /> - [$msg.get("wikimanager.createwiki")>WikiManager.CreateNewWiki]<br /> + $msg.get("wikimanager.totalnumberofwiki") : $wikiList.size()<br /> + #if($hasadmin) + [$msg.get("wikimanager.createwiki")>WikiManager.CreateNewWiki]<br /> + #end </div> -#if($list.size()!=0) +#if($wikiList.size()!=0) <table id="wikiTable" class="grid sortable filterable doOddEven"> <tr class="sortHeader"> <th>$msg.get("wikimanager.listwikiname")</th> @@ -95,25 +97,47 @@ <th>$msg.get("wikimanager.listwikivisibility")</th> <th class="unsortable noFilter">$msg.get("more")</th> </tr> - #foreach($serverdoc in $list) + #foreach($wiki in $wikiList) + #set($wikiAliasList = $wiki.wikiAliasList) <tr> - <td>[$serverdoc.wikiName ($serverdoc.server)>$serverdoc.homePageUrl]</td> - <td>[$serverdoc.owner]</td> - <td>$xwiki.formatDate($serverdoc.creationDate,"dd/MM/yyyy")</td> - <td>$serverdoc.state</td> - <td>$serverdoc.visibility</td> + <td>$wiki.wikiName #if($wikiAliasList.size() == 1) ([$wikiAliasList.get(0).server>$wikiAliasList.get(0).homePageUrl]) #end</td> + <td>#if($wikiAliasList.size()==1) [$wikiAliasList.get(0).owner] #end</td> + <td>$xwiki.formatDate($wiki.creationDate,"dd/MM/yyyy")</td> + <td>#if($wikiAliasList.size()==1) $wikiAliasList.get(0).state #end</td> + <td>#if($wikiAliasList.size()==1) $wikiAliasList.get(0).visibility #end</td> <td> - #if($serverdoc.visibility == "public") - [$msg.get("wikimanager.action.setvisibility.private")>?action=setvisibility&wikiname=$serverdoc.WikiName&serverid=$serverdoc.objectId&wikivisibility=private] | - #elseif($serverdoc.visibility == "private") - [$msg.get("wikimanager.action.setvisibility.template")>?action=setvisibility&wikiname=$serverdoc.WikiName&serverid=$serverdoc.objectId&wikivisibility=template] | - #elseif($serverdoc.visibility == "template") - [$msg.get("wikimanager.action.setvisibility.public")>?action=setvisibility&wikiname=$serverdoc.WikiName&serverid=$serverdoc.objectId&wikivisibility=public] | + #if($wikiAliasList.size()==1) + #if($wikiAliasList.get(0).visibility == "public") + [$msg.get("wikimanager.action.setvisibility.private")>?action=setvisibility&wikiname=$wikiAliasList.get(0).WikiName&serverid=$wikiAliasList.get(0).objectId&wikivisibility=private] | + #elseif($wikiAliasList.get(0).visibility == "private") + [$msg.get("wikimanager.action.setvisibility.template")>?action=setvisibility&wikiname=$wikiAliasList.get(0).WikiName&serverid=$wikiAliasList.get(0).objectId&wikivisibility=template] | + #elseif($wikiAliasList.get(0).visibility == "template") + [$msg.get("wikimanager.action.setvisibility.public")>?action=setvisibility&wikiname=$wikiAliasList.get(0).WikiName&serverid=$wikiAliasList.get(0).objectId&wikivisibility=public] | + #end #end - [$msg.get("delete")>?action=delete&wikiname=$serverdoc.WikiName&serverid=$serverdoc.objectId] | - <a href="$serverdoc.getURL("inline")">$msg.get("edit")</a> - </td> + [$msg.get("delete")>?action=delete&wikiname=$wiki.WikiName] | <a href="$wiki.getURL("inline")">$msg.get("edit")</a></td> </tr> + #if($wikiAliasList.size() > 1) + #foreach($wikiAlias in $wikiAliasList) + <tr> + <td>- [$wikiAlias.server>$wikiAlias.homePageUrl]</td> + <td>[$wikiAlias.owner]</td> + <td></td> + <td>$wikiAlias.state</td> + <td>$wikiAlias.visibility</td> + <td> + #if($wikiAlias.visibility == "public") + [$msg.get("wikimanager.action.setvisibility.private")>?action=setvisibility&wikiname=$wikiAlias.WikiName&serverid=$wikiAlias.objectId&wikivisibility=private] | + #elseif($wikiAlias.visibility == "private") + [$msg.get("wikimanager.action.setvisibility.template")>?action=setvisibility&wikiname=$wikiAlias.WikiName&serverid=$wikiAlias.objectId&wikivisibility=template] | + #elseif($wikiAlias.visibility == "template") + [$msg.get("wikimanager.action.setvisibility.public")>?action=setvisibility&wikiname=$wikiAlias.WikiName&serverid=$wikiAlias.objectId&wikivisibility=public] | + #end + [$msg.get("delete")>?action=delete&wikiname=$wikiAlias.WikiName&serverid=$wikiAlias.objectId] + </td> + </tr> + #end + #end #end </table> #else Modified: xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/WikiResources/Translations =================================================================== --- xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/WikiResources/Translations 2007-11-19 16:19:09 UTC (rev 6018) +++ xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/WikiResources/Translations 2007-11-19 16:24:20 UTC (rev 6019) @@ -13,8 +13,8 @@ <contentAuthor>XWiki.Admin</contentAuthor> <creationDate>1186679007000</creationDate> <date>1195050866000</date> -<contentUpdateDate>1195050866000</contentUpdateDate> -<version>1.2</version> +<contentUpdateDate>1195305638000</contentUpdateDate> +<version>1.1</version> <title></title> <template></template> <defaultTemplate></defaultTemplate> @@ -53,71 +53,71 @@ <tags/> </property> </object> -<content>{table} -wikimanager.wikimanager=Wiki Manager - -wikimanager.wikinameneeded=A name for the wiki is necessary - -# CONF - -wikimanager.defaultdatetimeformat=yyyy MMMM dd 'at' HH:mm - -# LABELS - -wikimanager.createwiki=Create a new wiki -wikimanager.totalnumberofwiki=Total number of wiki -wikimanager.wikiname=Wiki name -wikimanager.wikidesc=Description -wikimanager.wikidomain=Domain -wikimanager.wikiadmin=Administrator -wikimanager.wikivisibility=Visibility -wikimanager.wikistate=State -wikimanager.wikitemplate=From wiki template -wikimanager.wikipackage=From package (attached file) -wikimanager.listwikiname=Name -wikimanager.listwikirank=Rank -wikimanager.listwikiadmin=Admin -wikimanager.listwikicreation=Creation -wikimanager.listwikistate=State -wikimanager.listwikivisibility=Visibility - -# WIDGETS - -wikimanager.widget.lastcreatedwikis.title=Last created wikis -wikimanager.widget.userwikisadmin.title=Wikis you administrate -wikimanager.widget.userwikisuser.title=Wikis you view -wikimanager.widget.userwikisowner.title=Wikis you own -wikimanager.widget.lastmodifications.title=Recent modifications -wikimanager.widget.mylastmodifications.title=My recent modifications - -# ANSWERS - -wikimanager.answer.deletewiki.title=Delete wiki -wikimanager.answer.deletewiki.msg=Are you sure you wish to delete wiki \"{0}\" ? - -# ACTIONS - -wikimanager.listwikiactions=Actions -wikimanager.listwikiactionspref=Pref -wikimanager.listwikiactionsmembers=Members -wikimanager.listwikiactionsrights=Rights -wikimanager.listwikiactionsgroups=Groups -wikimanager.listwikiactionsstat=Stat -wikimanager.action.setvisibility.public=Set as public -wikimanager.action.setvisibility.private=Set as private -wikimanager.action.setvisibility.template=Set as template - -# MESSAGES -wikimanager.successdeletewiki=Wiki \"{0}\" deleted. -wikimanager.errordeletewiki=Wiki \"{0}\" delete failed with error code \"{1}\". -wikimanager.successsetvisibility=Wiki \"{0}\" visibility changed to \"{1}\". -wikimanager.errorsetvisibility=Wiki \"{0}' visibility changing failed with error code \"{1}\". -wikimanager.successcreatewiki=Your wiki \"{0}\" has been created. You can access it at the following address: {1}. -wikimanager.errorcreatewiki=Wiki \"{0}\" creation failed with error code \"{1}\". -wikimanager.errorcreatewiki.ERROR_WM_WIKIALREADYEXISTS=This wiki \"{0}\" already exist. Please choose another name. -wikimanager.listwikiempty=There are no open wikis. - -# MOVE IN STANDARD XWIKI -error.ERROR_XWIKI_ACCESS_DENIED=You don't have permission to make this action. +<content>{table} +wikimanager.wikimanager=Wiki Manager + +wikimanager.wikinameneeded=A name for the wiki is necessary + +# CONF + +wikimanager.defaultdatetimeformat=yyyy MMMM dd 'at' HH:mm + +# LABELS + +wikimanager.createwiki=Create a new wiki +wikimanager.totalnumberofwiki=Total number of wiki +wikimanager.wikiname=Wiki name +wikimanager.wikidesc=Description +wikimanager.wikidomain=Domain +wikimanager.wikiadmin=Administrator +wikimanager.wikivisibility=Visibility +wikimanager.wikistate=State +wikimanager.wikitemplate=From wiki template +wikimanager.wikipackage=From package (attached file) +wikimanager.listwikiname=Name +wikimanager.listwikirank=Rank +wikimanager.listwikiadmin=Admin +wikimanager.listwikicreation=Creation +wikimanager.listwikistate=State +wikimanager.listwikivisibility=Visibility + +# WIDGETS + +wikimanager.widget.lastcreatedwikis.title=Last created wikis +wikimanager.widget.userwikisadmin.title=Wikis you administrate +wikimanager.widget.userwikisuser.title=Wikis you view +wikimanager.widget.userwikisowner.title=Wikis you own +wikimanager.widget.lastmodifications.title=Recent modifications +wikimanager.widget.mylastmodifications.title=My recent modifications + +# ANSWERS + +wikimanager.answer.deletewiki.title=Delete wiki +wikimanager.answer.deletewiki.msg=Are you sure you wish to delete wiki \"{0}\" ? + +# ACTIONS + +wikimanager.listwikiactions=Actions +wikimanager.listwikiactionspref=Pref +wikimanager.listwikiactionsmembers=Members +wikimanager.listwikiactionsrights=Rights +wikimanager.listwikiactionsgroups=Groups +wikimanager.listwikiactionsstat=Stat +wikimanager.action.setvisibility.public=Set as public +wikimanager.action.setvisibility.private=Set as private +wikimanager.action.setvisibility.template=Set as template + +# MESSAGES +wikimanager.successdeletewiki=Wiki \"{0}\" deleted. +wikimanager.errordeletewiki=Wiki \"{0}\" delete failed with error code \"{1}\". +wikimanager.successsetvisibility=Wiki \"{0}\" visibility changed to \"{1}\". +wikimanager.errorsetvisibility=Wiki \"{0}' visibility changing failed with error code \"{1}\". +wikimanager.successcreatewiki=Your wiki \"{0}\" has been created. You can access it at the following address: {1}. +wikimanager.errorcreatewiki=Wiki \"{0}\" creation failed with error code \"{1}\". +wikimanager.errorcreatewiki.ERROR_WM_WIKIALREADYEXISTS=This wiki \"{0}\" already exist. Please choose another name. +wikimanager.listwikiempty=There are no open wikis. + +# MOVE IN STANDARD XWIKI +error.ERROR_XWIKI_ACCESS_DENIED=You don't have permission to make this action. {table}</content> </xwikidoc> Modified: xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/XApp/XWikiApplicationWikiManager =================================================================== --- xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/XApp/XWikiApplicationWikiManager 2007-11-19 16:19:09 UTC (rev 6018) +++ xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/XApp/XWikiApplicationWikiManager 2007-11-19 16:24:20 UTC (rev 6019) @@ -13,7 +13,7 @@ <contentAuthor>XWiki.Admin</contentAuthor> <creationDate>1188217603000</creationDate> <date>1191517448000</date> -<contentUpdateDate>1192719385000</contentUpdateDate> +<contentUpdateDate>1195305639000</contentUpdateDate> <version>1.1</version> <title></title> <template></template> Modified: xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/XApp/XWikiApplicationXwikiserverclass =================================================================== --- xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/XApp/XWikiApplicationXwikiserverclass 2007-11-19 16:19:09 UTC (rev 6018) +++ xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/XApp/XWikiApplicationXwikiserverclass 2007-11-19 16:24:20 UTC (rev 6019) @@ -13,7 +13,7 @@ <contentAuthor>XWiki.Admin</contentAuthor> <creationDate>1188217580000</creationDate> <date>1191432783000</date> -<contentUpdateDate>1192719385000</contentUpdateDate> +<contentUpdateDate>1195305639000</contentUpdateDate> <version>1.1</version> <title></title> <template></template> Modified: xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/XWiki/XWikiServerClass =================================================================== --- xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/XWiki/XWikiServerClass 2007-11-19 16:19:09 UTC (rev 6018) +++ xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/XWiki/XWikiServerClass 2007-11-19 16:24:20 UTC (rev 6019) @@ -13,7 +13,7 @@ <contentAuthor>XWiki.Admin</contentAuthor> <creationDate>1187881140000</creationDate> <date>1192547854000</date> -<contentUpdateDate>1192719385000</contentUpdateDate> +<contentUpdateDate>1195305639000</contentUpdateDate> <version>1.1</version> <title></title> <template></template> Modified: xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/XWiki/XWikiServerClassSheet =================================================================== --- xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/XWiki/XWikiServerClassSheet 2007-11-19 16:19:09 UTC (rev 6018) +++ xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/XWiki/XWikiServerClassSheet 2007-11-19 16:24:20 UTC (rev 6019) @@ -12,9 +12,9 @@ <customClass></customClass> <contentAuthor>XWiki.Admin</contentAuthor> <creationDate>1187881143000</creationDate> -<date>1194016301000</date> -<contentUpdateDate>1194016301000</contentUpdateDate> -<version>1.17</version> +<date>1195488803000</date> +<contentUpdateDate>1195488803000</contentUpdateDate> +<version>1.35</version> <title></title> <template></template> <defaultTemplate></defaultTemplate> @@ -53,20 +53,72 @@ <tags/> </property> </object> -<content>1 Wiki "$doc.name.substring(11).toLowerCase()" +<content>#set($WikiManager = $xwiki.wikimanager) +#set($Exception = $WikiManager.DefaultException) -#set($class = $doc.getObject("XWiki.XWikiServerClass").xWikiClass) +#set($action = $request.getParameter("action")) +#set($domain = $request.getParameter("domain")) -#set($objList = $doc.getObjects("XWiki.XWikiServerClass")) +#set($wiki = $WikiManager.getWikiFromDocumentName($doc.fullName)) -#foreach($obj in $objList) - 1.1 $doc.display("server", "view", $obj): +############################################################################# - <dl> - #foreach($prop in $class.properties) - <dt> ${prop.prettyName} </dt> - <dd>$doc.display($prop.getName(), $obj)</dd> +#if($action && ($action == "create") && $domain && ($domain.trim().length() > 0)) + #set($alias = $wiki.getWikiAlias($domain)) + #if(!$alias) + #set($alias = $wiki.newObject("XWiki.XWikiServerClass")) + $alias.set("server", $domain) + $wiki.save() + #end +#end + +#if($action && ($action == "delete") && $domain && ($domain.trim().length() > 0)) + #set($alias = $wiki.getWikiAlias($domain)) + #if($alias) + #set($removed = $wiki.removeObject($alias.objectApi)) + $wiki.save() + #end +#end + +############################################################################# + +#set($wikiAliasList = $wiki.wikiAliasList) + +#if($wikiAliasList.size() > 0) + 1 Wiki "$wiki.wikiName" + + #if($context.action == "view") + 1.1 Create new alias + + <form method="get" action="$doc.getURL("inline")"> + <input type="hidden" name="action" value="create"/> + Create new alias: <input type="text" name="domain" class="wikialiasinput"/> + <input type="submit" class="button" value="$msg.get("create")"/> + </form> + #end + + + #if($context.action == "view") + 1.1 View aliases + #end + + #foreach($wikiAlias in $wikiAliasList) + 1.1.1 $wikiAlias.server + #if($context.action == "view") + <form method="get" action="$doc.getURL("view")"> + <input type="hidden" name="action" value="delete"/> + <input type="hidden" name="domain" value="$wikiAlias.server"/> + <input type="submit" class="button" value="$msg.get("delete")"/> + </form> #end - </dl> -#end -</content></xwikidoc> \ No newline at end of file + + <dl> + #set($class = $wikiAlias.objectApi.xWikiClass) + #foreach($prop in $class.properties) + <dt>${prop.prettyName}:</dt> + <dd>$doc.display($prop.getName(), $wikiAlias.objectApi)</dd> + #end + </dl> + #end +#end</content> +</xwikidoc> Modified: xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/XWiki/XWikiServerClassTemplate =================================================================== --- xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/XWiki/XWikiServerClassTemplate 2007-11-19 16:19:09 UTC (rev 6018) +++ xwiki-platform/xwiki-applications/trunk/wiki-manager/src/main/resources/XWiki/XWikiServerClassTemplate 2007-11-19 16:24:20 UTC (rev 6019) @@ -6,15 +6,15 @@ <language></language> <defaultLanguage></defaultLanguage> <translation>1</translation> -<parent>XWikiManager.WebHome</parent> +<parent>WikiManager.WebHome</parent> <creator></creator> <author>XWiki.Admin</author> <customClass></customClass> <contentAuthor>XWiki.Admin</contentAuthor> <creationDate>1187881143000</creationDate> -<date>1192206630000</date> -<contentUpdateDate>1192719385000</contentUpdateDate> -<version>1.1</version> +<date>1195470259000</date> +<contentUpdateDate>1195470259000</contentUpdateDate> +<version>1.2</version> <title></title> <template></template> <defaultTemplate></defaultTemplate> _______________________________________________ notifications mailing list notifications@xwiki.org http://lists.xwiki.org/mailman/listinfo/notifications