Module:Sandbox/ProcrastinatingReader/ib: Difference between revisions

Content deleted Content added
No edit summary
+
Line 64:
return ""
end
end
 
function p.demographics(frame)
local args = getArgs(frame)
local tArgs = {
['child'] = 'yes',
['headerstyle'] = 'text-align:left',
}
 
for i = 1,2 do
local dtype = getNetValue(frame, 'demographics', 'type'..i)
if not isempty(dtype) then
local series = i + 20 * (i-1)
tArgs['header'..series] = dtype..'<div style="font-weight:normal;display:inline;">'.. getNetValue(frame, 'demographics1', 'footnotes') ..'</div>'
for j = 1,10 do
local dval = getNetValue(frame, 'demographics1', 'title'..j)
if not isempty(dval) then
tArgs['rowclass'..(series + j)] = 'mergedrow'
tArgs['label'..(series + j)] = '&nbsp;•&nbsp;'..getNetValue(frame, 'demographics1', 'title'..j)
tArgs['data'..(series + j)] = getNetValue(frame, 'demographics1', 'info'..j)
end
end
end
end
return frame:expandTemplate{ title = 'infobox', args = tArgs}
end