Module:Video game reviews/sandbox: Difference between revisions

Content deleted Content added
heh
No edit summary
 
(9 intermediate revisions by 6 users not shown)
Line 1:
require('Module:No globalsstrict')
 
local p = {}
Line 264:
:addClass(data.i18n.class.wikidata)
:addClass(state and 'mw-collapsible-content' or nil)
:wikitext(data.i18n.display.editOnWikidata .. vgwd.getUpdateLink('nosub'))
-- TODO: I think getUpdateLink can be made const in the other module.
:wikitext(data.i18n.display.editOnWikidata .. vgwd.getUpdateLink('nosub'))
:done()
end
Line 276 ⟶ 275:
end
end
 
 
local function renderTitles(builder, title, subtitle)
Line 303 ⟶ 301:
)
local div = mw.html.create('div')
:attr('role', 'complementary')
:addClass(data.i18n.class.container)
:addClass(#activeSystems == 0 and data.i18n.class.containersingle or nil)
Line 310 ⟶ 309:
:addClass(is_collapsible and args.state == data.i18n.state.collapsed and 'mw-collapsed' or nil)
:addClass(is_collapsible and args.state == data.i18n.state.autocollapse and args.state or nil)
:css('width', #activeSystems == 0 and args.width or nil)
 
renderTitles(div, args.title, args.subtitle)
Line 340 ⟶ 338:
)
renderEditOnWikidata(div, wikidata, args.state)
categorizePlatformCount(div, #activeSystems)
return div
Line 347 ⟶ 345:
local function checkForWikidata(frame, args, activeSystems, providedAggregators)
local wikidata = false
if args.qid == 'none' then
return wikidata
end
 
vgwd.setDateFormat(args['.df'])
vgwd.setGame(args['.qid'])
vgwd.setSystem(nil)
vgwd.setGenerateReferences(true)
vgwd.setShowUpdateLink(false)
vgwd.setUpdateLinkStyle("text and pen")
vgwd.setSystemFormat(args['.systemFormat'])
 
-- Loop through aggregators if we have any.