1,131
edits
(Created page with "--[=[ -- For documentation, see Module:Infobox/doc --]=] -- <nowiki> local Infobox = {} Infobox.__index = Infobox Infobox.__tostring = Infobox.tostring -- Edit button for unknown params local editbutton = require('Module:Edit button') local var = mw.ext.VariablesLua local edit = editbutton("'''?''' (edit)") -- Page title local pagename = mw.title.getCurrentTitle().fullText -- map of flags to html tags used by Infobox.addRow() -- let's only define it once, since :...") |
No edit summary |
||
| Line 37: | Line 37: | ||
end | end | ||
-- Standardized "Yes or no" function | |||
function yesNo(arg, default) | |||
if not Infobox.isDefined(arg) then | |||
return nil | |||
end | |||
arg = string.lower(arg) | |||
if arg == 'yes' then | |||
return 'Yes' | |||
elseif arg == 'no' then | |||
return 'No' | |||
end | |||
return arg | |||
end | |||
-- Standardized "name" function | -- Standardized "name" function | ||
| Line 85: | Line 99: | ||
image = image, | image = image, | ||
numbers = numbers, | numbers = numbers, | ||
yes_no = yesNo, | |||
yesNo = yesNo, | |||
} | } | ||