Module:Copied/sandbox: Difference between revisions

Content deleted Content added
m fix
Syncing sandbox code with main template (sync-template-sandbox.js)
Line 1:
local MessageBox = require('Module:Message box')
 
 
local p = {}
Line 28 ⟶ 29:
local to_diff = args["to_diff"] or args["to_diff1"]
local to_oldid = args["to_oldid"] or args["to_oldid1"]
 
if (diff) then
text = string.format("%s with [%s this edit]",text,diff)
Line 115:
end
end
 
return text
end
Line 121 ⟶ 120:
local function multiText(args)
local pageType
if (mw.title.getCurrentTitle():inNamespace(01)) then
pageType = "article"
else
Line 128 ⟶ 127:
local historyList = list(args)
local collapse =if (args["collapse"] == 'yes') then
if (args["from10"]) and (not collapse) then
collapse = "yes"
end
if (collapse == 'yes') then
local collapsedText = '<table style="width:100%%; background: transparent;" class="collapsible collapsed">\n<tr><th>Copied pages:</th></tr>\n<tr><td> %s </td></tr></table>'
historyList = string.format(collapsedText, historyList)
end
 
local text = "Text has been copied to or from this %s; see the list below. The source pages now serve to [[WP:Copying within Wikipedia|provide attribution]] for the content in the destination pages and must not be deleted so long as the copies exist. For attribution and to access older versions of the copied text, please see the history links below. %s"
text = string.format(text, pageType, historyList)
Line 157 ⟶ 153:
small = args["small"],
image = '[[File:Splitsection.svg|50px]]',
smallimage = 'none',
text = BannerText(args)
})