Content deleted Content added
make that a class instead |
extract the rendermainheading function, move aggregators above reviewers in supermode table, remove dependency on reviewercount in aggregators in prep to extract to its own table |
||
Line 89:
local function renderHeadingRowWithSystems(builder, mainHeading, activeSystems)
builder:tag('tr')
:addClass('vgr-systems')
:tag('th')
:attr('rowspan', '2')▼
:attr('scope', 'col')
▲ :attr('rowspan', '2')
:wikitext(data.i18n.publication)
:done()
:tag('th')
:attr('colspan', #activeSystems)
▲ :attr('scope', #activeSystems == 1 and 'col' or 'colgroup')
:wikitext(data.i18n.score)
:done()
Line 111 ⟶ 110:
end
local function renderHeadingRow(builder
builder:tag('tr')
:addClass('vgr-hrow')
:tag('th')
:wikitext(nameHeading)▼
:attr('scope', 'col')
▲ :wikitext(nameHeading)
:done()
:tag('th')
:wikitext(data.i18n.score)▼
:attr('scope', 'col')
▲ :wikitext(data.i18n.score)
:done()
end
Line 171 ⟶ 169:
local na = yesno(args.na)
local showplatforms = #activeSystems ~= 1 or yesno(args.showplatforms)
if
if showplatforms then
else
renderHeadingRow(builder, data.i18n.aggregator)
end
for _, v in ipairs(
renderRatingsBySystem(builder, v, data.
end
for _, v in ipairs(
renderRatingsBySystem(builder, v, args[v], activeSystems, args, na)
end
end
if
if
renderMainHeading(builder, #activeSystems + 1,
renderHeadingRowWithSystems(builder, activeSystems)
▲ renderHeadingRowWithSystems(builder, aggregateScore, activeSystems)
else
end
for _, v in ipairs(
renderRatingsBySystem(builder, v, data.
end
for _, v in ipairs(
renderRatingsBySystem(builder, v, args[v], activeSystems, args, na)
end
Line 204:
builder:wikitext(data.i18n.singleplatformCategory)
if aggregatorCount ~= 0 then
renderHeadingRow(builder, data.i18n.aggregator)
for _, v in ipairs(providedAggregators) do
renderRating(builder, data.aggregators[v].name, args[v])
Line 213 ⟶ 214:
end
if reviewerCount ~= 0 then
renderHeadingRow(builder, data.i18n.publication)
for _, v in ipairs(providedReviewers) do
renderRating(builder, data.reviewers[v].name, args[v])
Line 235 ⟶ 237:
builder:tag('tr')
:tag('th')
▲ :wikitext(data.i18n.publication)
:attr('scope', 'col')
:done()
:tag('th')
▲ :wikitext(data.i18n.award)
:attr('scope', 'col')
:wikitext(data.i18n.award)
:done()
|