Module:CareerList: Difference between revisions
Jump to navigation
Jump to search
no edit summary
No edit summary |
No edit summary |
||
local p = {}
▲local function getSiteConfig(site)
if not config then▼
return config▼
end
function p.CareerListTop(frame)
local list = args.list or ""
return config.url:gsub('%$1', id)▼
local bgcolor = args.bgcolor or "#F2F2F2"
return string.format([[
<th>Site</th>
<th>Alias</th>
<th>Notes</th>
]], bgcolor, list)
end
function p.
local args = frame
local site = args.site or ""
local id = args.id or ""
local
local notes = args.notes or "N/A"
▲ if not config then
▲ local items = mw.text.split(list, '%s*{{CareerList%s*|')
▲ html = html .. '<tr style="background-color:#F2F2F2;">\n'
html = html .. '</tr>\n'▼
▲ local i = 1
▲ if item ~= '' then
▲ local config = getSiteConfig(site)
▲ html = html .. rowHtml
▲ i = i + 1
▲ end
end
local bgcolor = config.type == "Studio" and "#DADADA" or "#FFFFFF"
▲html = html .. '</table>'
local color = config.type == "Studio" and "#000000" or "#000000"
return
<tr style="background-color:%s;color:%s;">
<td><a href="%s">%s</a></td>
<td>%s</td>
<td>%s</td>
<td>%s</td>
]], bgcolor, color, url, config.name, id, alias, notes)
end
|