Module:Infobox: Difference between revisions

Ganaram inukshuk (talk | contribs)
m font size
Ganaram inukshuk (talk | contribs)
add navbar option; adds vte links to bottom of infobox
Line 1: Line 1:
local getArgs = require("Module:Arguments").getArgs
local getArgs = require("Module:Arguments").getArgs
local yesno = require("Module:Yesno")
local navbar  = require("Module:Navbar")._navbar
local yesno   = require("Module:Yesno")
 
local p = {}
local p = {}


Line 7: Line 9:
-- - Allow for headerless data rows and dataless header rows. Requires changing
-- - Allow for headerless data rows and dataless header rows. Requires changing
--  row content from a regular array to an associative array.
--  row content from a regular array to an associative array.
-- TODO (medium priority): nest helper functions


--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Line 21: Line 21:
local rows      = args["Rows"  ]
local rows      = args["Rows"  ]
local footer_row = args["Footer"]
local footer_row = args["Footer"]
local name = args["Name"]
-- Nested helper function
-- Nested helper function
Line 126: Line 127:
if footer_row then
if footer_row then
table.insert(lines, header_footer_row(footer_row))
table.insert(lines, header_footer_row(footer_row))
end
-- Template navbar
if name then
table.insert(lines, header_footer_row(navbar(name, "mini", "")))
end
end