Module:Banned

local p = {}

local banned = require("Module:Banned/data")

function p.list local items = {} local ret = mw.html.create('table') ret :addClass('wikitable sortable') :tag('tr') :tag('th'):wikitext('Username'):done :tag('th'):wikitext('Reason'):done :done

for index, data in ipairs(banned) do   ret:node( generateRow(data.username, data.reason, data.link) ) end return ret end

function generateRow(username, reason, link) local ret = mw.html.create('tr') if link == nil then ret:tag('td'):wikitext ( username ):done else ret:tag('td'):wikitext ( "" .. username .. "" ):done end ret:tag('td'):wikitext( reason ):done return ret end

return p