Moduł:Navbox/printer/default
Wygląd
Dokumentacja modułu
[stwórz] [ ]
Zobacz podstrony tego modułu.
require ("strict")
local res = mw.loadData('Moduł:Navbox/res')
return {
root = 'table',
update = function(container, isleaf, node, printlog)
container:addClass(isleaf and res.class.hlist or nil)
end,
print = function(container, tree, printList, printlog)
container:addClass(res.class.innerStandard)
for i, node in ipairs(tree) do
local tr = container:tag('tr')
:addClass(node.address())
local needTH = node.peek(res.arg.group.name)
if needTH then
tr:tag('th')
:addClass(res.class.group)
:attr('scope', 'row')
:wikitext(node.get(res.arg.group.name))
end
local cell = tr:tag('td')
:attr('colspan', not needTH and '2' or nil)
:addClass(res.class.list)
printList(cell, node)
end
end,
}