Module:Infobox: Difference between revisions
Jump to navigation
Jump to search
no edit summary
OtherXAdmin (talk | contribs) No edit summary Tag: Reverted |
OtherXAdmin (talk | contribs) No edit summary Tag: Reverted |
||
Line 9: | Line 9: | ||
local edit = editbutton("'''?''' (edit)") | local edit = editbutton("'''?''' (edit)") | ||
-- | -- Standardized "has content" function | ||
function hasContent(arg, default) | function hasContent(arg, default) | ||
return string.match(arg or '','%S') and arg or default | return string.match(arg or '','%S') and arg or default | ||
Line 48: | Line 48: | ||
end | end | ||
-- Generate the infobox based on the added rows | -- Generate the infobox based on the added rows | ||
function Infobox.create(self) | function Infobox.create(self) | ||
Line 63: | Line 61: | ||
return table.concat(output, "\n") -- Convert the table to a string | return table.concat(output, "\n") -- Convert the table to a string | ||
end | end | ||
return Infobox | return Infobox |