Hi Sergiu,
I thought this was done in some previous release. I can see it's on
xwiki.org which is using 1.1M3 and I've found this in the release
notes of 1.1M2: "When deleting a page, first show the list of pages
linking to it and warn about them".
Or is this something different?
Thanks
-Vincent
On Aug 12, 2007, at 3:03 AM, Sergiu Dumitriu wrote:
Author: sdumitriu
Date: 2007-08-12 03:03:46 +0200 (Sun, 12 Aug 2007)
New Revision: 4196
Modified:
xwiki-platform/web/trunk/standard/src/main/webapp/skins/
albatross/delete.vm
Log:
XWIKI-1297: When deleting a page, first show the list of pages that
will be orphaned
Done (velocity files)
Modified: xwiki-platform/web/trunk/standard/src/main/webapp/skins/
albatross/delete.vm
===================================================================
--- xwiki-platform/web/trunk/standard/src/main/webapp/skins/
albatross/delete.vm 2007-08-11 23:59:11 UTC (rev 4195)
+++ xwiki-platform/web/trunk/standard/src/main/webapp/skins/
albatross/delete.vm 2007-08-12 01:03:46 UTC (rev 4196)
@@ -8,23 +8,41 @@
<div id="xwikimessage">$message</div>
#end
#set($links=$doc.getBacklinks())
+#set($orphans = $xwiki.searchDocuments(" where doc.fullName <> '$
{doc.fullName}as' and (doc.parent = '${doc.fullName}' or
(doc.parent = '${doc.name}' and doc.web = '${doc.web}'))"))
#if($request.xredirect)
#set($redirectparam = "&xredirect=$request.xredirect")
#end
+#set($quote = '"')
+#set($hasInlinks = false)
+#set($fullmsg = "")
#if($links && $links.size() > 0)
- #set($quote = '"')
- #set ($fullmsg="</p><ul style=${quote}text-align:
left;${quote}>")
+ #set($tmpmsg = "</p><ul style=${quote}text-align:
left;${quote}>")
#foreach($docname in $links)
#set($rdoc = $xwiki.getDocument($docname).getTranslatedDocument
())
- #set($fullmsg = "${fullmsg}<li><a href=${quote}${rdoc.getURL
('view')}${quote}>${rdoc.displayTitle}</a></li>")
+ #set($tmpmsg = "${tmpmsg}<li><a href=${quote}${rdoc.getURL
('view')}${quote}>${rdoc.displayTitle}</a></li>")
#end
- #set($fullmsg = "${fullmsg}</ul><p class=${quote}xwikimessage$
{quote}>")
- #set($fullmsg=$msg.get("core.delete.backlinksWarning", [$fullmsg]))
- #set($fullmsg="${fullmsg}</p><p class=${quote}xwikimessage$
{quote}>"+$msg.get("core.delete.confirmWithBacklinks"))
- #xwikimessagebox($msg.get("core.delete") $fullmsg $doc.getURL
("delete", "confirm=1$!{redirectparam}&$languageparams")
$doc.getURL("view") $msg.get("yes") $msg.get("no"))
+ #set($tmpmsg = "${tmpmsg}</ul><p class=${quote}xwikimessage$
{quote}>")
+ #set($tmpmsg = $msg.get("core.delete.backlinksWarning", [$tmpmsg]))
+ #set($fullmsg="${fullmsg}${tmpmsg}</p><p class=${quote}
xwikimessage${quote}>")
+ #set($hasInlinks = true)
+#end
+#if($orphans && $orphans.size() > 0)
+ #set($tmpmsg ="</p><ul style=${quote}text-align:
left;${quote}>")
+ #foreach($docname in $orphans)
+ #set($rdoc = $xwiki.getDocument($docname).getTranslatedDocument
())
+ #set($tmpmsg = "${tmpmsg}<li><a href=${quote}${rdoc.getURL
('view')}${quote}>${rdoc.displayTitle}</a></li>")
+ #end
+ #set($tmpmsg = "${tmpmsg}</ul><p class=${quote}xwikimessage$
{quote}>")
+ #set($tmpmsg = $msg.get("core.delete.orphansWarning", [$tmpmsg]))
+ #set($fullmsg="${fullmsg}${tmpmsg}</p><p class=${quote}
xwikimessage${quote}>")
+ #set($hasInlinks = true)
+#end
+#if($hasInlinks)
+ #set($fullmsg="${fullmsg}${msg.get
('core.delete.confirmWithInlinks')}")
#else
- #xwikimessagebox($msg.get("core.delete") $msg.get
("core.delete.confirm") $doc.getURL("delete", "confirm=1$!
{redirectparam}&$languageparams") $doc.getURL("view") $msg.get
("yes") $msg.get("no"))
+ #set($fullmsg = $msg.get("core.delete.confirm"))
#end
+#xwikimessagebox($msg.get("core.delete") $fullmsg $doc.getURL
("delete", "confirm=1$!{redirectparam}&$languageparams")
$doc.getURL("view") $msg.get("yes") $msg.get("no"))
</div>
<div class="clearfloats"></div>
#template("endpage.vm")
\ No newline at end of file
--
You receive this message as a subscriber of the xwiki-
commits(a)objectweb.org mailing list.
To unsubscribe: mailto:xwiki-commits-unsubscribe@objectweb.org
For general help: mailto:sympa@objectweb.org?subject=help
ObjectWeb mailing lists service home page:
http://www.objectweb.org/
wws