17,233
edits
(remove OoX from staging, add TP+ST) |
m (change label class to zdw-label to distinguish from bootstrap) |
||
(8 intermediate revisions by the same user not shown) | |||
Line 26: | Line 26: | ||
-- override | -- override | ||
function Listbox:renderContent() | function Listbox:renderContent() | ||
local listing = Listing._parseListing | local listing = Listing._parseListing( self.subject ) | ||
-- If categories weren't set already (because caller used single arg), then use the ones parsed from the page. | |||
-- CODE SMELL: setting unrelated state. this only works because renderFooter is called after renderContent. | |||
if #self.categories == 0 then self.categories = listing.categories end | |||
local content = mw.html.create( 'table' ) | local content = mw.html.create( 'table' ) | ||
Line 41: | Line 45: | ||
local row = content:tag( 'tr' ) | local row = content:tag( 'tr' ) | ||
row:tag( 'th' ) | row:tag( 'th' ) | ||
:addClass( 'label' ) | :addClass( 'zdw-label' ) | ||
:wikitext( group.name ) | :wikitext( group.name ) | ||
local cell = row:tag( 'td' ) | local cell = row:tag( 'td' ) | ||
Line 65: | Line 69: | ||
getParent = function() return { | getParent = function() return { | ||
args = { | args = { | ||
[1] = "The Legend of Zelda | [1] = "The Legend of Zelda Locations" | ||
} | } | ||
} end | } end |