Редактирование: Модуль:Series overview

Перейти к навигации Перейти к поиску

Примечание. Ваши правки будут показаны в статье только после их проверки участником с соответствующими правами.

Правка может быть отменена. Проверьте сравнение версий ниже и нажмите «Записать страницу».
Если отменяемые вами изменения не вандализм, пожалуйста, допишите причину в описании правки.

Текущая версия Ваш текст
Строка 12: Строка 12:
local SeriesOverview = {}
local SeriesOverview = {}


function SeriesOverview.cellspan(SeasonEntries, SeasonEntries_ordered, key, cell, multipart, setspan)
function SeriesOverview.cellspan(SeasonEntries, SeasonEntries_ordered, key, cell)
if setspan ~= nil then return setspan end
local spanlength = 1
local spanlength = 1
local firstEntry = SeasonEntries[SeasonEntries_ordered[cell]]
if key == 'network' and firstEntry.networkA and not firstEntry.networkB then spanlength = 2 end
for i = cell+1, #SeasonEntries_ordered do
for i = cell+1, #SeasonEntries_ordered do
local entry = SeasonEntries[SeasonEntries_ordered[i]]
local entry = SeasonEntries[SeasonEntries_ordered[i]]
Строка 27: Строка 21:
else break end
else break end
if not entry[key..'B'] then spanlength = spanlength + 1
if not entry[key..'B'] then spanlength = spanlength + 1
else break end
if not entry[key..'C'] then spanlength = spanlength + 1
else break end
else break end
else
else
if not entry[key] and (key == 'network' or (string.sub(key,0,3) == 'aux' and (not entry.special or entry.episodes)) or (string.sub(key,0,4) == 'info') and multipart) then
if not entry[key] and (key == 'network' or (string.sub(key,0,3) == 'aux' and (not entry.special or entry.episodes))) then
spanlength = spanlength + 1
spanlength = spanlength + 1
else break end
else break end
Строка 89: Строка 85:
function SeriesOverview.new(frame, args)
function SeriesOverview.new(frame, args)
args = args or {}
args = args or {}
local initialArticle = args['1'] or ''
local categories = ''
local categories = ''
local title = mw.title.getCurrentTitle()
local title = mw.title.getCurrentTitle()
Строка 96: Строка 90:


-- Create series overview table
-- Create series overview table
local root = mw.html.create((args.multiseries or not args.series) and 'table' or '')
local root = mw.html.create('table')
local cellPadding = '0 8px'
local cellPadding = '0 8px'
local basePadding = '0.2em 0.4em'


root
root
Строка 104: Строка 97:
:addClass('plainrowheaders')
:addClass('plainrowheaders')
:css('text-align', 'center')
:css('text-align', 'center')
-- Sortable
if args.sortable then
root:addClass('sortable');
end
-- Width
if args.width then
root:css('width', args.width)
end


-- Caption
-- Caption
if args.caption then
if args.caption then
root:tag('caption'):wikitext(frame:expandTemplate{title='sronly',args={args.caption}})
root:tag('caption'):wikitext(args.caption)
end
end
 
-- Extract seasons info and place into a 3D array
-- Extract seasons info and place into a 3D array
local SeasonEntries = {}
local SeasonEntries = {}
Строка 150: Строка 133:
table.sort(SeasonEntries_ordered,SeriesOverview.series_sort)
table.sort(SeasonEntries_ordered,SeriesOverview.series_sort)
local firstRow = args.multiseries and {} or SeasonEntries[SeasonEntries_ordered[1]]
local firstRow = SeasonEntries[SeasonEntries_ordered[1]]
-- Colspan calculation for information cells (0 = no info set)
-- Colspan calculation for information cells (0 = no info set)
Строка 162: Строка 145:
-- Top info cell
-- Top info cell
-- @ = string.char(64), A = string.char(65)
-- @ = string.char(64), A = string.char(65)
local topInfoCell = numInfoCells > 0 and string.char(numInfoCells + (string.byte('A') - 1)) or '@'
local topInfoCell = args.infoheader and (numInfoCells > 0 and string.char(numInfoCells + (string.byte('A') - 1)) or 'A') or '@'
-- Networks are included if the very first entry sets the first network
local setNetwork = (args.multiseries and args.network) or firstRow.network or firstRow.networkA
local networkTransclude = args.network_transclude
if (networkTransclude == 'onlyinclude' and title.fullText == initialArticle) or (networkTransclude == 'noinclude' and title.fullText ~= initialArticle) then
setNetwork = false
end


-- Headers
-- Headers
do
do
if args.multiseries or not args.series then
local headerRow = root:tag('tr')
local headerRow = root:tag('tr')
headerRow
headerRow
:css('text-align', 'center')
:css('text-align', 'center')
 
-- Networks are included if the very first entry sets the first network
local releasedBlurb = args.released and 'released' or 'aired'
local setNetwork = firstRow.network or firstRow.networkA
local releasedBlurb = args.released and 'дата' or 'дата'
-- Base series/season content on the format of the first date; Series = D M Y, Season = M D, Y
local matchDMY = false
-- Base series/season content on the format of the first date; Series = D M Y, Season = M D, Y
local thisStart = firstRow.start or firstRow.startA
local matchDMY = false
if thisStart then
local thisStart = firstRow.start or firstRow.startA
if string.match(thisStart:gsub(" "," "), '(%d+)%s(%a+)%s(%d+)') then
if thisStart then
matchDMY = true
if string.match(thisStart:gsub(" "," "), '(%d+)%s(%a+)%s(%d+)') then
end
matchDMY = true
end
end
end
-- Multiple series header
if args.multiseries then
-- Season header
headerRow:tag('th')
:attr('scope', 'col')
:attr('rowspan', allReleased and numInfoCells == 0 and 1 or 2)
:attr('colspan', 2)
:css('padding', cellPadding)
:wikitext(args.seriesT or args.seasonT or (matchDMY and 'Эпизоды') or 'Сезон')
-- Aux headers
for i = string.byte('A'), string.byte('Z') do
local param = 'aux' .. string.char(i)
if args[param] then
numAuxCells = numAuxCells + 1
headerRow:tag('th')
headerRow:tag('th')
:attr('scope', 'col')
:attr('scope', 'col')
:css('padding', cellPadding)
:css('padding', cellPadding)
:attr('rowspan', allReleased and 1 or 2)
:attr('rowspan', allReleased and numInfoCells == 0 and 1 or 2)
:wikitext('Эпизодов')
:wikitext(args[param])
end
end
end
-- Season header
 
-- Episodes header
headerRow:tag('th')
:attr('scope', 'col')
:attr('rowspan', allReleased and numInfoCells == 0 and 1 or 2)
:attr('colspan', 2)
:css('padding', cellPadding)
:wikitext('Эпизодов')
 
-- Originally aired header
headerRow:tag('th')
:attr('scope', 'col')
:attr('rowspan', allReleased and numInfoCells > 0 and 2 or 1)
:attr('colspan', setNetwork and 3 or 2)
:wikitext('Трансляция')
-- Network subheader for released series
if setNetwork and allReleased then
headerRow:tag('th')
headerRow:tag('th')
:attr('scope', 'col')
:attr('scope', 'col')
:attr('rowspan', allReleased and 1 or 2)
:attr('rowspan', allReleased and numInfoCells == 0 and 1 or 2)
:attr('colspan', 2)
:css('min-width', '50px')
:css('padding', cellPadding)
:css('padding', cellPadding)
:wikitext(args.seriesT or args.seasonT or (matchDMY and 'Эпизодов') or 'Сезон')
:wikitext('Телесеть')
end
-- Aux headers
for i = string.byte('A'), string.byte('Z') do
-- Subheader row
local param = 'aux' .. string.char(i)
local subheaderRow = mw.html.create('tr')
if args[param] then
numAuxCells = numAuxCells + 1
headerRow:tag('th')
:attr('scope', 'col')
:css('padding', cellPadding)
:attr('rowspan', allReleased and 1 or 2)
:wikitext(args[param])
end
end


-- Episodes header
-- Info header
if args.infoheader then
headerRow:tag('th')
headerRow:tag('th')
:attr('scope', 'col')
:attr('scope', 'col')
:attr('rowspan', allReleased and 1 or 2)
:attr('colspan', numInfoCells > 0 and numInfoCells or nil)
:attr('colspan', 2)
:attr('rowspan', (allReleased and 1) or (numInfoCells > 0 and 1) or 2)
:css('padding', cellPadding)
:css('padding', cellPadding)
:wikitext('Эпизодов')
:wikitext(args.infoheader)
end
 
if not allReleased then
-- First aired subheader
subheaderRow:tag('th')
:attr('scope', 'col')
:wikitext('Премьера сезона')


-- Originally aired header
-- Last aired subheader
local OriginallyColspan = (not allReleased and setNetwork) and 3 or 2
subheaderRow:tag('th')
local countryBlurb = ''
if args.country then
countryBlurb = ' (' .. args.country .. ')'
end
headerRow:tag('th')
:attr('scope', 'col')
:attr('scope', 'col')
:attr('colspan', OriginallyColspan)
:wikitext('Финал сезона')
--:wikitext('Премьера ' .. releasedBlurb .. countryBlurb)
:wikitext('Премьера')
-- Network subheader for aired series
if setNetwork then
-- Network subheader for released series
subheaderRow:tag('th')
if setNetwork and allReleased then
headerRow:tag('th')
:attr('scope', 'col')
:attr('scope', 'col')
:attr('rowspan', allReleased and 1 or 2)
:css('padding', cellPadding)
:css('padding', cellPadding)
:wikitext('Телесеть')
:wikitext('Телесеть')
end
end
end
-- Information headers
if topInfoCell ~= '@' then
for i = string.byte('A'), string.byte(topInfoCell) do
local param = 'info' .. string.char(i)
local infoTransclude = args[param .. '_transclude']
if (infoTransclude == 'onlyinclude' and title.fullText == initialArticle) or (infoTransclude == 'noinclude' and title.fullText ~= initialArticle) then else
headerRow:tag('th')
:attr('scope', 'col')
:attr('rowspan', allReleased and 1 or 2)
:css('padding', cellPadding)
:wikitext(args[param])
end
end
end
-- Subheader row
local subheaderRow = mw.html.create('tr')


if not allReleased then
-- Information subheaders, only if the infoheader doesn't span down (i.e. 2+ info cells set)
-- First aired subheader
if topInfoCell ~= 'A' then
for i = string.byte('A'), string.byte(topInfoCell) do
local param = 'info' .. string.char(i)
subheaderRow:tag('th')
subheaderRow:tag('th')
:attr('scope', 'col')
:attr('scope', 'col')
--:wikitext('Премьера ' .. releasedBlurb)
:css('padding', cellPadding)
:wikitext('Премьера')
:wikitext(args[param])
-- Last aired subheader
subheaderRow:tag('th')
:attr('scope', 'col')
--:wikitext('Финал ' .. releasedBlurb)
:wikitext('Финал')
-- Network subheader for aired series
if setNetwork then
subheaderRow:tag('th')
:attr('scope', 'col')
:css('padding', cellPadding)
:wikitext('Телесеть')
end
end
-- Check for scenarios with an empty subheaderRow
if not allReleased or numInfoCells > 0 then
root:node(subheaderRow)
end
end
end
-- Check for scenarios with an empty subheaderRow
if not allReleased or numInfoCells > 0 then
root:node(subheaderRow)
end
end
end
end
Строка 297: Строка 263:
-- Season rows
-- Season rows
do
do
if args.multiseries then
-- One row entries, only categorized in the mainspace
-- Multi series individual entries
if title.namespace == 0 and #SeasonEntries == 1 then
if args.multiseries ~= "y" then
categories = categories .. '[[Category:Articles using Template:Series overview with only one row]]'
root:node(args.multiseries)
end
for X = 1, #SeasonEntries_ordered do
local season, entry = SeasonEntries_ordered[X], SeasonEntries[SeasonEntries_ordered[X]]
local splitSeason = entry.startA
-- New season row
local seasonRow = root:tag('tr')
-- Dates
local startDate = entry['start']
local endDate = entry['end']
-- First season row
-- Coloured cell
-- Add # to colors if necessary
if entry.color ~= nil and HTMLcolor[entry.color] == nil then entry.color = '#'..(mw.ustring.match(entry.color, '^[%s#]*([a-fA-F0-9]*)[%s]*$') or '') end
if entry.colorA ~= nil and HTMLcolor[entry.colorA] == nil then entry.colorA = '#'..(mw.ustring.match(entry.colorA, '^[%s#]*([a-fA-F0-9]*)[%s]*$') or '') end
if entry.colorB ~= nil and HTMLcolor[entry.colorB] == nil then entry.colorB = '#'..(mw.ustring.match(entry.colorB, '^[%s#]*([a-fA-F0-9]*)[%s]*$') or '') end
 
seasonRow:tag('td')
:attr('scope','row')
:attr('rowspan', ((splitSeason and entry.color) or (entry.colorA and entry.colorA == entry.colorB)) and 2 or nil)
:css('background',entry.colorA or entry.color)
:css('width','10px')
-- Season number link
seasonRow:tag('td')
:attr('rowspan', splitSeason and 2 or nil)
:attr('colspan', entry.special and not entry.episodes and 3+numAuxCells or 1)
:wikitext(entry.link and '[[' .. entry.link .. '|' .. (entry.linkT or season) .. ']]' or (entry.linkT or season))
-- Aux cells
for i = string.byte('A'), string.byte('Z') do
local param = 'aux' .. string.char(i)
if entry[param] or entry[param..'A'] then
local thisCell = SeriesOverview.season_cell(entry[param] or entry[param..'A'], frame)
:attr('scope', 'col')
:attr('rowspan', SeriesOverview.cellspan(SeasonEntries, SeasonEntries_ordered, param, X))
:css('padding', cellPadding)
seasonRow:node(thisCell)
end
end
-- Episodes
if entry.episodes then
local thisCell = SeriesOverview.season_cell(entry.episodes, frame)
:attr('colspan', splitSeason and 1 or 2)
:attr('rowspan', splitSeason and 2 or nil)
seasonRow:node(thisCell)
elseif not entry.special then
local infoCell = SeriesOverview.series_attributes( frame:expandTemplate{title='N/A',args={'TBA'}} )
infoCell
:attr('colspan', splitSeason and 1 or 2)
:attr('rowspan', splitSeason and 2 or nil)
seasonRow:node(infoCell)
end
-- Episodes for first half of split season
if splitSeason then
if entry.episodesA then
local thisCell = SeriesOverview.season_cell(entry.episodesA, frame)
seasonRow:node(thisCell)
else
local infoCell = SeriesOverview.series_attributes( frame:expandTemplate{title='N/A',args={'TBA'}} )
seasonRow:node(infoCell)
end
end
-- Start date
if entry.startA or startDate then
local thisCell = SeriesOverview.season_cell(entry.startA or startDate, frame)
:attr('colspan', ((not entry.special and endDate == 'start') or (entry.special and not endDate)) and 2 or 1)
:css('padding',cellPadding)
seasonRow:node(thisCell)
else
local infoCell = SeriesOverview.series_attributes( frame:expandTemplate{title='N/A',args={'TBA'}})
infoCell:css('padding',cellPadding)
seasonRow:node(infoCell)
if title.namespace == 0 then
categories = categories .. '[[Category:Articles using Template:Series overview with empty start date]]'
end
end
-- End date
if not allReleased and endDate ~= 'start' and ((entry.special and endDate) or not entry.special) then
if entry.endA or endDate then
local thisCell = SeriesOverview.season_cell(entry.endA or endDate, frame)
:css('padding',cellPadding)
seasonRow:node(thisCell)
else
local infoCell = SeriesOverview.series_attributes( frame:expandTemplate{title='N/A',args={'TBA'}} )
infoCell:css('padding',cellPadding)
seasonRow:node(infoCell)
end
end
end
else
-- One row entries, only categorized in the mainspace
-- Network
if title.namespace == 0 and #SeasonEntries == 1 then
if entry.network or entry.networkA then
categories = categories .. '[[Категория:Статьи с использованием Шаблона:Обзор Series overview только с одной строкой]]'
local thisCell = SeriesOverview.season_cell(entry.networkA or entry.network, frame)
:attr('rowspan', SeriesOverview.cellspan(SeasonEntries, SeasonEntries_ordered, 'network', X))
seasonRow:node(thisCell)
end
end
-- Determine number of rows in the whole overview
-- Information
local SeasonEntriesRows = 0
for i = string.byte('A'), string.byte(topInfoCell) do
for X = 1, #SeasonEntries_ordered do
local param = 'info' .. string.char(i)
local season, entry = SeasonEntries_ordered[X], SeasonEntries[SeasonEntries_ordered[X]]
local infoParam = entry[param .. 'A'] or entry[param]
local splits = 0
if infoParam then
for i = string.byte('A'), string.byte('Z') do
-- Cells with {{N/A|...}} already expanded
local param = 'start' .. string.char(i)
if string.sub(infoParam,1,5) == 'style' then
if entry[param] then splits = splits + 1 end
local infoCell = SeriesOverview.series_attributes(infoParam)
infoCell:attr('rowspan', (splitSeason and entry[param]) and 2 or nil)
seasonRow:node(infoCell)
else
-- Unstyled content info cell
local thisCell = SeriesOverview.season_cell(infoParam, frame)
:attr('rowspan', (splitSeason and entry[param]) and 2 or nil)
seasonRow:node(thisCell)
end
else
local infoCell = SeriesOverview.series_attributes( frame:expandTemplate{title='N/A',args={'TBA'}} )
infoCell:attr('rowspan', (splitSeason and entry[param]) and 2 or nil)
seasonRow:node(infoCell)
end
end
if splits == 0 then splits = 1 end
SeasonEntriesRows = SeasonEntriesRows + splits
end
end
for X = 1, #SeasonEntries_ordered do
-- Second season row for split seasons
local season, entry = SeasonEntries_ordered[X], SeasonEntries[SeasonEntries_ordered[X]]
if splitSeason then
-- Second row
local seasonRowB = root:tag('tr')
-- Coloured cell
if not entry.color and entry.colorB and entry.colorA ~= entry.colorB then
seasonRowB:tag('td')
:attr('scope','row')
:css('background',entry.colorB)
:css('width','10px')
end
-- Determine number of splits in a season
-- Aux cells
local splits = 0
for i = string.byte('A'), string.byte('Z') do
for i = string.byte('A'), string.byte('Z') do
local param = 'start' .. string.char(i)
local param = 'aux' .. string.char(i)
if entry[param] then splits = splits + 1 end
if entry[param..'B'] then
local thisCell = SeriesOverview.season_cell(entry[param .. 'B'], frame)
:attr('scope', 'col')
:attr('rowspan', SeriesOverview.cellspan(SeasonEntries, SeasonEntries_ordered, param, X))
:css('padding', cellPadding)
seasonRowB:node(thisCell)
end
end
-- Episodes for first half of split season
if entry.episodesB then
local thisCell = SeriesOverview.season_cell(entry.episodesB, frame)
seasonRowB:node(thisCell)
else
local infoCell = SeriesOverview.series_attributes( frame:expandTemplate{title='N/A',args={'TBA'}} )
infoCell:css('padding',cellPadding)
seasonRowB:node(infoCell)
end
end
local splitSeason = (splits > 1)
-- Season rows for each season
-- Start date
for k0 = string.byte('A')-1, string.byte('Z') do
if entry.startB then
local k = string.char(k0)
local thisCell = SeriesOverview.season_cell(entry.startB, frame)
if k0 == string.byte('A')-1 then k = '' end
:attr('colspan',entry.endB == 'start' and 2 or 1)
:css('padding',cellPadding)
-- New season row
seasonRowB:node(thisCell)
-- local seasonRow = (entry['color' .. k] or entry['episodes' .. k] or entry['start' .. k] or entry['end' .. k]) and root:tag('tr') or mw.html.create('tr')
else
local seasonRow = entry['start' .. k] and root:tag('tr') or mw.html.create('tr')
local infoCell = SeriesOverview.series_attributes( frame:expandTemplate{title='N/A',args={'TBA'}} )
infoCell:css('padding',cellPadding)
-- Series name for group overviews
seasonRowB:node(infoCell)
if X == 1 and (k == '' or k == 'A') and args.series then
end
seasonRow:tag('th')
:attr('scope', 'row')
:attr('rowspan', SeasonEntriesRows)
:wikitext(args.series)
end
-- Coloured cell
if entry['color' .. k] ~= nil and HTMLcolor[entry['color' .. k]] == nil then
entry['color' .. k] = '#'..(mw.ustring.match(entry['color' .. k], '^[%s#]*([a-fA-F0-9]*)[%s]*$') or '')
end
if splitSeason and entry.color then
if k == 'A' then
seasonRow:tag('td')
:attr('rowspan', entry.color and splits or 1)
:css('background', entry.color)
:css('width','10px')
end
else
seasonRow:tag('td')
:css('background',entry['color' .. k])
:css('width','10px')
end
-- Season number link, included only in the first row
if k == '' or k == 'A' then
seasonRow:tag(args.series and 'td' or 'th')
:attr('scope', 'row')
:attr('rowspan', splitSeason and splits or nil)
:attr('colspan', entry.special and not entry.episodes and 3+numAuxCells or 1)
:css('text-align', 'center')
:wikitext((entry.link and '[[' .. entry.link .. '|' .. (entry.linkT or season) .. ']]' or (entry.linkT or season)) .. (entry.linkR or ''))
end
-- Aux cells
for i = string.byte('A'), string.byte('Z') do
local param = 'aux' .. string.char(i)
if entry[param .. k] then
local thisCell = SeriesOverview.season_cell(entry[param .. k], frame)
:attr('scope', 'col')
:attr('rowspan', SeriesOverview.cellspan(SeasonEntries, SeasonEntries_ordered, param, X, (args.series and true or false), entry[param .. k .. 'span'] or nil))
:css('padding', cellPadding)
seasonRow:node(thisCell)
end
end
-- Episodes counts
if ((splitSeason and k == 'A' and entry.episodes ~= 'hide') or not splitSeason) then
if entry.episodes then
local thisCell = SeriesOverview.season_cell(entry.episodes, frame)
:attr('colspan', splitSeason and 1 or 2)
:attr('rowspan', splitSeason and splits or nil)
seasonRow:node(thisCell)
elseif not entry.special then
local infoCell = SeriesOverview.series_attributes( frame:expandTemplate{title='N/A',args={'TBA'}} )
infoCell
:attr('colspan', splitSeason and 1 or 2)
:attr('rowspan', splitSeason and splits or nil)
seasonRow:node(infoCell)
end
end
if splitSeason then
if entry['episodes' .. k] then
local thisCell = SeriesOverview.season_cell(entry['episodes' .. k], frame)
:attr('colspan', (entry.episodes ~= 'hide') and 1 or 2)
seasonRow:node(thisCell)
else
local infoCell = SeriesOverview.series_attributes( frame:expandTemplate{title='N/A',args={'TBA'}} )
:attr('colspan', (entry.episodes ~= 'hide') and 1 or 2)
seasonRow:node(infoCell)
end
end
-- Start date
-- End date
if entry['start' .. k] then
if not allReleased and entry.endB ~= 'start' then
local thisCell = SeriesOverview.season_cell(entry['start' .. k], frame)
if entry.endB then
:attr('colspan',((not entry.special and entry['end' .. k] == 'start') or (entry.special and not entry['end' .. k]) or allReleased) and 2 or 1)
local thisCell = SeriesOverview.season_cell(entry.endB, frame)
:css('padding',basePadding)
:css('padding',cellPadding)
seasonRow:node(thisCell)
seasonRowB:node(thisCell)
else
else
local infoCell = SeriesOverview.series_attributes( frame:expandTemplate{title='N/A',args={'TBA'}} )
local infoCell = SeriesOverview.series_attributes( frame:expandTemplate{title='N/A',args={'TBA'}} )
infoCell:css('padding',basePadding)
infoCell:css('padding',cellPadding)
seasonRow:node(infoCell)
seasonRowB:node(infoCell)
end
end
end
-- End date
if not allReleased and entry['end' .. k] ~= 'start' and ((entry.special and entry['end' .. k]) or not entry.special) then
-- Network
if entry['end' .. k] then
if entry.networkB then
local thisCell = SeriesOverview.season_cell(entry['end' .. k], frame)
local thisCell = SeriesOverview.season_cell(entry.networkB, frame)
:css('padding',cellPadding)
:attr('rowspan', SeriesOverview.cellspan(SeasonEntries, SeasonEntries_ordered, 'network', X))
seasonRow:node(thisCell)
seasonRowB:node(thisCell)
else
end
local infoCell = SeriesOverview.series_attributes( frame:expandTemplate{title='N/A',args={'TBA'}} )
infoCell:css('padding',cellPadding)
-- Information
seasonRow:node(infoCell)
for i = string.byte('A'), string.byte('Z') do
end
local param = 'info' .. string.char(i)
if entry[param .. 'B'] then
local thisCell = SeriesOverview.season_cell(entry[param .. 'B'], frame)
seasonRowB:node(thisCell)
end
end
end
-- Network
end -- End 'if' splitSeason
if entry['network' .. k] and setNetwork then
end -- End 'for' SeasonEntries_ordered
local thisCell = SeriesOverview.season_cell(entry['network' .. k], frame)
:attr('rowspan', SeriesOverview.cellspan(SeasonEntries, SeasonEntries_ordered, 'network', X, (args.series and true or false), entry['network' .. k .. 'span'] or nil))
seasonRow:node(thisCell)
end
-- Information
for i = string.byte('A'), string.byte(topInfoCell) do
local param0 = 'info' .. string.char(i)
local param = 'info' .. string.char(i) .. k
local infoTransclude = args[param .. '_transclude']
if (infoTransclude == 'onlyinclude' and title.fullText == initialArticle) or (infoTransclude == 'noinclude' and title.fullText ~= initialArticle) then else
local infoParam = entry[param]
if infoParam and splitSeason and k == '' and not entry[param .. 'A'] then
entry[param .. 'A'] = entry[param]
entry[param .. 'spanning'] = 'y'
end
local rowspan = (entry[param0 .. 'spanning'] and splits) or
(args.series and SeriesOverview.cellspan(SeasonEntries, SeasonEntries_ordered, param0, X, (args.series and true or false), entry[param0 .. 'span'] or nil))
or nil
if k == 'A' or (k ~= 'A' and not entry[param0 .. 'spanning']) then
-- Cells with {{N/A|...}} already expanded
if infoParam then
if string.sub(infoParam,1,5) == 'style' then
local infoCell = SeriesOverview.series_attributes(infoParam)
infoCell:attr('rowspan', rowspan)
seasonRow:node(infoCell)
else
-- Unstyled content info cell
local thisCell = SeriesOverview.season_cell(infoParam, frame)
:attr('rowspan', rowspan)
seasonRow:node(thisCell)
end
else
if not args.series then
local infoCell = SeriesOverview.series_attributes( frame:expandTemplate{title='N/A',args={'TBA'}} )
infoCell:attr('rowspan', rowspan)
seasonRow:node(infoCell)
end
end
elseif not entry[param0 .. 'spanning'] then
if not args.series then
local infoCell = SeriesOverview.series_attributes( frame:expandTemplate{title='N/A',args={'TBA'}} )
infoCell:attr('rowspan', rowspan)
seasonRow:node(infoCell)
end
end
end
end
end -- End k0 string.byte
end -- End 'for' SeasonEntries_ordered
end -- End 'if' multiseries
end -- End 'do' season rows
end -- End 'do' season rows


return (args.dontclose and mw.ustring.gsub(tostring(root), "</table>", "") or tostring(root)) .. categories
return tostring(root) .. categories
end
end


Быстрая вставка: «» „“ | {{}} [[]] [] [[|]] {{|}} {{подст:}} <br> &nbsp; #перенаправление [[]] [[Категория:]] {{DEFAULTSORT:}} [[Участник:]] {{u|}} {{userlinks|}} {{ping|}} {{pagelinks|}} {{D-|}} [[d:|]] ~~~~

__NOTOC__ __TOC__ __FORCETOC__   [[ ()|]] [[ (фильм)|]] {{commonscat|}} [[wikt:]] [[Special:Diff/|]] [[Special:Permalink/|]] [[Special:Contributions/]]

Теги: <></>   <!-- -->   <blockquote></blockquote>   <code></code>   <code><nowiki></nowiki></code>   <nowiki></nowiki>   <includeonly></includeonly>   <noinclude></noinclude>   <onlyinclude></onlyinclude>   <poem></poem>   <pre></pre>   <s></s>   <small></small>   <syntaxhighlight lang=""></syntaxhighlight>   <sub></sub>   <sup></sup>

Теги галереи файлов: <gallery></gallery>   <gallery class="center" caption=""></gallery>   <gallery mode="packed" heights="" caption=""></gallery>

Разделы: == ==   === ===   == См. также ==   == Примечания == {{примечания}}   == Литература ==   == Ссылки ==

Шаблоны: {{tl|}}   {{cl|}}   {{clear}}   {{lang-en|}}   {{ref-en}}   {{s|}}   {{неоднозначность}}   {{колонки}}{{колонки|конец}}   {{подст:L}}   {{начало цитаты}}{{конец цитаты|источник=}}   {{hello}}~~~~  

Источники: <ref></ref>   <ref name=""></ref>   <ref name="" />   <ref group=""></ref>   {{ref+||group=""}}  

Символы: Ё ё ~ # @ § · ¡ ¿ \ ½ ¼ ¾ ± × ÷ ° ^ ¹ ² ³ £ ¥ $ ¢ © ® {{подст:ударение}}

Греческий алфавит: Α α Β β Γ γ Δ δ Ε ε Ζ ζ Η η Θ θ Ι Ϊ ι ϊ Κ κ Λ λ Μ μ Ν ν Ξ ξ Ο ο Π π Ρ ρ Σ σ ς Τ τ Υ Ϋ υ ϋ Φ φ Χ χ Ψ ψ Ω ω