Module:Navbox: Difference between revisions

Ganaram inukshuk (talk | contribs)
mNo edit summary
Ganaram inukshuk (talk | contribs)
mNo edit summary
Line 73: Line 73:
function p._navbox(args)
function p._navbox(args)
local title          = args["Title"]
local title          = args["Title"]
local is_child_navbox = args["Is Child Navbox"]
local rows            = args["Rows"]
local rows            = args["Rows"]
local is_collapsible  = args["Is Collapsible"] -- Not implemented
local is_collapsible  = args["Is Collapsible"] -- Not implemented
local is_collapsed    = args["Is Collapsible"] -- Not working?
local is_collapsed    = args["Is Collapsed" ] -- Not working?
-- Start of table
-- Start of table
local navbox = p.navbox_title(title, is_collapsible, is_collapsed, is_subtable)
local navbox = p.navbox_title(title, is_collapsible, is_collapsed)
for i = 1, #rows do
for i = 1, #rows do
Line 99: Line 98:
-- Prepropress boolean args
-- Prepropress boolean args
args["Is Collapsible" ] = yesno(args["Is Collapsible" ])
args["Is Collapsible" ] = yesno(args["Is Collapsible" ])
args["Is Collapsible" ] = yesno(args["Is Collapsible" ])
args["Is Collapsed"   ] = yesno(args["Is Collapsed"   ])
args["Is Child Navbox"] = yesno(args["Is Child Navbox"])
-- Preprocess individual entries for, headers, data, and is-row-child into
-- Preprocess individual entries for, headers, data, and is-row-child into
Line 115: Line 113:
row = {
row = {
["Header"] = header,
["Header"] = header,
["Data"] = data,
["Data"] = ((header ~= nil and data == nil) and "" or data),
["Is Navbox"] = is_navbox
["Is Navbox"] = is_navbox
}
}