Módulo:Staff
Erro em Lua em package.lua na linha 80: module 'Dev:Docbunto' not found.
--- Used for staff badges on their userpages, as well as categorization under
-- staff categories ([[:Category:Staff]]).
-- @module staff
-- @alias p
-- @author [[User:KockaAdmiralac|KockaAdmiralac]]
-- <nowiki>
local p = {}
-- Module dependencies.
local data = mw.loadData('Module:Staff/data')
-- Module variables.
local title = mw.title.getCurrentTitle()
-- Package items.
--- Template entrypoint for [[Template:Staff]].
-- @function p.main
-- @returns {string} Staff badge and category
function p.main()
if title.namespace ~= 2 then
return
end
local group = data.users[title.text]
if not group then
-- HACK: Get the template to work with retired staff members properly
return '[[Categoria:Membros do Staff aposentados]]'
end
local groupdata = data.appearance[group]
local str = {}
table.insert(str, '<span title="This user is ')
local first = mw.ustring.lower(mw.ustring.sub(groupdata.name, 0, 1))
if first == 'a' or first == 'e' or first == 'i' or first == 'o' or first == 'u' then
table.insert(str, 'an')
else
table.insert(str, 'a')
end
table.insert(str, ' ')
table.insert(str, groupdata.name)
table.insert(str, ' of the ')
table.insert(str, mw.site.siteName)
table.insert(str, '." class="plainlinks staff')
if not groupdata.icon then
table.insert(str, ' noicon')
end
table.insert(str, '">[')
table.insert(str, tostring(mw.uri.fullUrl('Category:' .. groupdata.category)))
table.insert(str, ' ')
if groupdata.icon then
table.insert(str, mw.site.server)
table.insert(str, '/resources-ucp/v2/dist/svg/wds-avatar-badges-')
table.insert(str, groupdata.icon)
table.insert(str, '.svg#.png')
else
table.insert(str, '*')
end
table.insert(str, ']</span>[[Category:')
table.insert(str, groupdata.category)
table.insert(str, ']]')
return table.concat(str)
end
return p
-- </nowiki>