Module:Copied: Difference between revisions

Content deleted Content added
test
test
Line 2:
local p = {}
 
local function singleText(frame)
from_oldid = frame.args["from_oldid"]
from = frame.args["from"]
Line 29:
end
text = text .. ". The former page's "
text = text .. history()"History"
text = text .. "now serves to [[WP:Copying within Wikipedia|provide attribution]] for that content in the latter page, and it must not be deleted so long as the latter page exists."
return text
end
 
local function multiText(frame)
collapse = frame.args["collapse"]
text = "Text has been copied to or from this {{#ifeq:{{SUBJECTSPACE}}||article|page}}; 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."
Line 40:
text = text .. '<table style="width:100%; background: transparent;" class="collapsible collapsed">\n<tr><th>Copied pages:</th></tr>\n<tr><td>'
end
text = text .. list(frame)
if collapse == 'yes' then
text = text .. '</td></tr></table>'
Line 47:
end
 
local function BannerText(frame)
local text
from2 = frame.args["from2"]
if not (from2 == nil or from2 == "") then
text = singleText(frame)
else
text = multiText(frame)
end
return text
end
 
local function renderBanner(frame)
return MessageBox.main('tmbox', {
small = frame.args["small"],
Line 64:
image = '[[File:Splitsection.svg|50px]]',
smallimage = 'none',
text = BannerText(frame)
})
end
 
function p.main(frame)
return renderBanner(frame)
end