Модуль:Карточка: различия между версиями

мНет описания правки
мНет описания правки
Строка 45: Строка 45:
h.increment()
h.increment()
local args = h.overwrite()
local args = h.overwrite()
args.skipSectionRows = tonumber(args.skipSectionRows or 0)
h.skipSectionRows = tonumber(args.skipSectionRows) or 3
h.sectionHeaderCounter = 0
h.sectionHeaderCounter = 0
local sep = args.sep or ','
local sep = args.sep or ','
Строка 488: Строка 488:
function h.printSectionHeader(node, section, args)
function h.printSectionHeader(node, section, args)
if h.castBool(args[section .. '_nolabel']) then return end
if h.castBool(args[section .. '_nolabel']) then return end
 
h.sectionHeaderCounter = h.sectionHeaderCounter + 1
h.sectionHeaderCounter = (h.sectionHeaderCounter or 0) + 1
if h.sectionHeaderCounter <= h.skipSectionRows then return end
if args.skipSectionRows and h.sectionHeaderCounter <= args.skipSectionRows then return end


local tr = node:tag(h.getTag('row'))
local tr = node:tag(h.getTag('row'))
Строка 540: Строка 539:
local tabs = args[section .. '_tabs']
local tabs = args[section .. '_tabs']
if not tabs or #tabs == 0 then return end
if not tabs or #tabs == 0 then return end
 
if h.sectionHeaderCounter <= h.skipSectionRows then return end
if args.skipSectionRows and (h.sectionHeaderCounter or 0) <= args.skipSectionRows then return end


local tr = node:tag(h.getTag('sectionTabsOuter'))
local tr = node:tag(h.getTag('sectionTabsOuter'))