Author: sdumitriu
Date: 2008-02-13 19:30:32 +0100 (Wed, 13 Feb 2008)
New Revision: 7664

Added:
   xwiki-platform/web/trunk/standard/src/main/webapp/templates/rename.vm
Removed:
   xwiki-platform/skins/trunk/albatross/src/main/resources/albatross/rename.vm
Log:
XWIKI-2114: Upgrade the default templates
XSALBATROSS-13: Move Albatross templates files to the XWiki Core templates 
directory to share them with other skins


Deleted: 
xwiki-platform/skins/trunk/albatross/src/main/resources/albatross/rename.vm
===================================================================
--- xwiki-platform/skins/trunk/albatross/src/main/resources/albatross/rename.vm 
2008-02-13 18:29:50 UTC (rev 7663)
+++ xwiki-platform/skins/trunk/albatross/src/main/resources/albatross/rename.vm 
2008-02-13 18:30:32 UTC (rev 7664)
@@ -1,57 +0,0 @@
-###
-### Rename document template
-###
-#if(!$xwiki.hasAccessLevel("edit"))
-  #template("accessdenied.vm")
-#elseif($doc.isNew())
-  #template("startpage.vm")
-  <div class="main layoutsubsection">
-    #error("$msg.get('core.rename.nonexistingDocument')")
-  </div>
-  #template("endpage.vm")
-#else
-  #template("startpage.vm")
-  ## TODO: Improve the interface, splitting the operation into more steps.
-  #if((!$step) || ($step == ""))
-    #set($step = $request.getParameter("step"))
-  #end
-  #if((!$step) || ($step == ""))
-    #set($step = "1")
-  #end
-  #set($step = $xwiki.parseInt("$step"))
-  <div class="main layoutsubsection">
-    #if($step == 1)
-      ## Display the rename form
-      #template("renameStep1.vm")
-    #else
-      ## Do the rename. It's form on the renameStep1.vm page that calls this 
page
-      ## with step=2.
-      #set ($newFullName = "${request.newSpaceName}.${request.newPageName}")
-      #if((!$request.newPageName) || ($request.newPageName.trim().equals("")))
-        #error("$msg.get('core.rename.emptyName')")
-        #template("renameStep1.vm")
-      #elseif($xwiki.exists($newFullName))
-        #error("$msg.get('core.rename.alreadyExists', [$newFullName, 
$xwiki.getURL($newFullName)])")
-        #template("renameStep1.vm")
-      #else
-        #set($renamedBLs = $xwiki.arrayList)
-        #foreach($param in $request.parameterNames)
-          #if($param.startsWith("backlink_"))
-            #set($discard = $renamedBLs.add($param.substring(9)))
-          #end
-        #end
-
-        ## Save the old document name so that we can display it in the notice 
box. After the rename the
-        ## doc points to the new name!
-        #set ($oldDocName = $doc.fullName)
-
-        $doc.rename($newFullName, $renamedBLs)
-
-        #xwikimessageboxstart("$msg.get('notice')" 
"$msg.get('core.rename.success', [$oldDocName, $doc.fullName, 
$xwiki.getURL($doc.fullName)])")
-        #xwikimessageboxend()
-      #end
-    #end
-<div class="clearfloats"></div>
-</div>## main
-#template("endpage.vm")
-#end
\ No newline at end of file

Copied: xwiki-platform/web/trunk/standard/src/main/webapp/templates/rename.vm 
(from rev 7663, 
xwiki-platform/skins/trunk/albatross/src/main/resources/albatross/rename.vm)
===================================================================
--- xwiki-platform/web/trunk/standard/src/main/webapp/templates/rename.vm       
                        (rev 0)
+++ xwiki-platform/web/trunk/standard/src/main/webapp/templates/rename.vm       
2008-02-13 18:30:32 UTC (rev 7664)
@@ -0,0 +1,57 @@
+###
+### Rename document template
+###
+#if(!$xwiki.hasAccessLevel("edit"))
+  #template("accessdenied.vm")
+#elseif($doc.isNew())
+  #template("startpage.vm")
+  <div class="main layoutsubsection">
+    #error("$msg.get('core.rename.nonexistingDocument')")
+  </div>
+  #template("endpage.vm")
+#else
+  #template("startpage.vm")
+  ## TODO: Improve the interface, splitting the operation into more steps.
+  #if((!$step) || ($step == ""))
+    #set($step = $request.getParameter("step"))
+  #end
+  #if((!$step) || ($step == ""))
+    #set($step = "1")
+  #end
+  #set($step = $xwiki.parseInt("$step"))
+  <div class="main layoutsubsection">
+    #if($step == 1)
+      ## Display the rename form
+      #template("renameStep1.vm")
+    #else
+      ## Do the rename. It's form on the renameStep1.vm page that calls this 
page
+      ## with step=2.
+      #set ($newFullName = "${request.newSpaceName}.${request.newPageName}")
+      #if((!$request.newPageName) || ($request.newPageName.trim().equals("")))
+        #error("$msg.get('core.rename.emptyName')")
+        #template("renameStep1.vm")
+      #elseif($xwiki.exists($newFullName))
+        #error("$msg.get('core.rename.alreadyExists', [$newFullName, 
$xwiki.getURL($newFullName)])")
+        #template("renameStep1.vm")
+      #else
+        #set($renamedBLs = $xwiki.arrayList)
+        #foreach($param in $request.parameterNames)
+          #if($param.startsWith("backlink_"))
+            #set($discard = $renamedBLs.add($param.substring(9)))
+          #end
+        #end
+
+        ## Save the old document name so that we can display it in the notice 
box. After the rename the
+        ## doc points to the new name!
+        #set ($oldDocName = $doc.fullName)
+
+        $doc.rename($newFullName, $renamedBLs)
+
+        #xwikimessageboxstart("$msg.get('notice')" 
"$msg.get('core.rename.success', [$oldDocName, $doc.fullName, 
$xwiki.getURL($doc.fullName)])")
+        #xwikimessageboxend()
+      #end
+    #end
+<div class="clearfloats"></div>
+</div>## main
+#template("endpage.vm")
+#end
\ No newline at end of file

_______________________________________________
notifications mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/notifications

Reply via email to