Module:Proposal support: Difference between revisions
From Tardis Wiki, the free Doctor Who reference
Bongolium500 (talk | contribs) No edit summary |
Bongolium500 (talk | contribs) mNo edit summary |
||
Line 11: | Line 11: | ||
local s = "s" | local s = "s" | ||
if supporters == 1 then s = "" end | if supporters == 1 then s = "" end | ||
local final = '<div data-sort-value="' .. supporters .. '">' .. supporters .. 'supporter' .. s .. list .. '\n</div>' | local final = '<div data-sort-value="' .. supporters .. '">' .. supporters .. ' supporter' .. s .. list .. '\n</div>' | ||
return final | return final | ||
end | end | ||
return p | return p |
Revision as of 08:01, 5 January 2023
Documentation for this module may be created at Module:Proposal support/doc
local p = {}
function p.proposalSupport(frame)
local args = frame:getParent().args
local supporters = 0
local list = ""
for _, sig in ipairs(args) do
list = list .. "\n* " .. sig
supporters = supporters + 1
end
local s = "s"
if supporters == 1 then s = "" end
local final = '<div data-sort-value="' .. supporters .. '">' .. supporters .. ' supporter' .. s .. list .. '\n</div>'
return final
end
return p