Module:Episode list: Difference between revisions

Content deleted Content added
Fix title usage
Update per suggestion on talk page
Line 52:
-- List of cells that have parameter groups
local parameterGroupCells = {}
local firstParameterGroupCell;
 
-- List of title parameter names in this order.
Line 293 ⟶ 294:
-- createTitleCell()
]]--
local function createCells(args, isSerial, currentRow, onInitialPage, title, numberOfParameterGroups)
for _k, v in ipairs(cellNameList) do
if (v == 'ProdCode') then
createProductionCodeCell(args, v)
Line 312 ⟶ 313:
if (currentRow > 1) then
args[v] = removeWikilinks(args, v)
end
local thisRowspan
if (firstParameterGroupCell and k < firstParameterGroupCell) then
thisRowspan = numberOfParameterGroups
else
thisRowspan = 1
end
if (currentRow == 1 or (currentRow > 1 and k >= firstParameterGroupCell)) then
createTableData(args[v], 1thisRowspan, textAlign)
end
nonNilParams = nonNilParams + 1
checkUsageOfDateTemplates(args, v, onInitialPage, title)
Line 628 ⟶ 638:
createEpisodeNumberCell2(args, 1)
createTitleCell(args, numberOfParameterGroups, multiTitleListEnabled, false)
createCells(args, false, 1, onInitialPage, title, numberOfParameterGroups)
end
 
Line 641 ⟶ 651:
for i = 1, numberOfParameterGroups do
args = extractDataFromNumberedSerialArgs(args, i, numberOfParameterGroups, title)
createCells(args, true, i, onInitialPage, title, numberOfParameterGroups)
if (i ~= numberOfParameterGroups) then
row = row:done() -- Use done() to close the 'tr' tag in rowspaned rows.
Line 652 ⟶ 662:
-- Local function which is used to retrieve the NumParts value.
local function getnumberOfParameterGroups(args)
for _k, v in ipairs(cellNameList) do
local numberedParameter = v .. "_" .. 1
if (args[numberedParameter]) then
parameterGroupCells[v] = true
if not firstParameterGroupCell then
firstParameterGroupCell = k
end
end
end