Content deleted Content added
BrandonXLF (talk | contribs) No edit summary |
BrandonXLF (talk | contribs) store for history Tag: Reverted |
||
Line 1:
local getArgs = require('Module:Arguments').getArgs
local p = {}
function
local file = nil▼
if not image then
return nil
end
local file = ''
▲ local file = nil
file = frame:expandTemplate{title = "flagicon image", args = { image } }▼
▲ file = frame:expandTemplate{title = "flagicon image", args = {image}}
▲ elseif string.match(image, ".-%s%(.-%)") then
local country, var = string.match(image,"(.-)%s%((.-)%)")
file = frame:expandTemplate{title = "flagdeco", args = { country, var } }
else
file = frame:expandTemplate{title = "flagdeco", args = { image } }
end
return file
end
function
return country▼
local args = getArgs(frame)
local
local
local countries = {}
local i = 1
while args['c' .. i] do
▲ post = args[i + 2] and ' (' .. args[i + 2] .. ')' or ''
▲ i = i + 3
end
local hasimages = next(images)
out = out .. '<tr>'
out = out .. (images[i] and ('<td style="vertical-align:top;">' .. images[i] .. '</td>') or (hasimages and '<td></td>' or ''))
out = out .. '<td style="width:100%;vertical-align:top;">' .. country .. '</td>'
out = out .. '</tr>'
end
local html = '<table style="padding:5px;float:' .. (args.float or 'left') .. ';background-color:#f8f9fa;border:1px solid #aaa;width:20em;font-size:90%;">'
html = html .. '<tr><th colspan="' .. (hasimages and 2 or 1) .. '" style="text-align:center;font-size:larger;font-weight:bold;">' .. (args.title and args.title or 'Historical affiliations') .. '</th></tr>'
html = html .. out
html = html .. '</table>'
▲ for i, entry in ipairs(entries) do
end
|