Modul:InfoboxSzemely
A modult a Modul:InfoboxSzemely/doc lapon tudod dokumentálni
local capiunto = require 'capiunto'
local p = {}
function p.main(frame)
local args = frame:getParent().args
local headerStyle
if args.headerstyle and args.headerstyle ~= '' then
headerStyle = string.format('background-color:%s;', args.headerstyle)
else
headerStyle = 'background-color:grey;'
end
local infobox = capiunto.create( {
top = args.nev,
topStyle = 'background:#476a4a; color: #fff; font-size: 135%; height: 40px; vertical-align: middle; font-weight: bolder; line-height: 1.2em;' ,
} )
if args.kep ~= nil and args.kep ~= '' then infobox:addImage( args.kep, args.kepalairas ) end
if args.szuletesinev ~= nil and args.szuletesinev ~= '' then infobox:addRow('Születési név', args.szuletesinev) end
if args.szuletesidatum ~= nil and args.szuletesidatum ~= '' then infobox:addRow('Születési dátum', args.szuletesidatum) end
if args.szuletesihely ~= nil and args.szuletesihely ~= '' then infobox:addRow('Születési hely', args.szuletesihely) end
if args.halalozasidatum ~= nil and args.halalozasidatum ~= '' then infobox:addRow('Halálozási dátum', args.halalozasidatum) end
if args.halalozasihely ~= nil and args.halalozasihely ~= '' then infobox:addRow('Halálozási hely', args.halalozasihely) end
if args.sirhely ~= nil and args.sirhely ~= '' then infobox:addRow('Sírhely', args.sirhely) end
if args.hazastars ~= nil and args.hazastars ~= '' then infobox:addRow('Házastárs', args.hazastars) end
if args.foglalkozas ~= nil and args.foglalkozas ~= '' then infobox:addRow('Foglalkozás', args.foglalkozas) end
return infobox
end
return p
