Module:WikiProject banner/sandbox: Difference between revisions

Content deleted Content added
remove deprecated class
nested display
Line 608:
end
---------------------------
-- MakeNested bannerdisplay ------------
---------------------------
if args.HOOK_NESTED then
Line 614:
table.insert(nested_tf, hook_nested)
end
local nested_tf_str = ''
if #nested_tf>0 then
nested_tf_str = tostring(mw.html.create('span')
Line 620:
:wikitext(': ' .. table.concat(nested_tf, ' / '))
)
else
nested_tf_str = ''
end
local nested_ratings_str = #nested_ratings>0 and table.concat(nested_ratings, ' ') or ''
Line 630 ⟶ 628:
)
end
local nested_row = mw.html.create('tr')
:addClass('wpb-header')
:tag('td')
:addClass('wpb-header-icon')
:attr('width', '50px')
:css('text-align', 'center')
:wikitext(image({
image = args.IMAGE_LEFT,
size = '35x25px',
alt = 'WikiProject icon'
}))
:done()
:tag('td')
:addClass('wpb-header-combined')
:wikitext(wikilink(project_link.prefixedText, project) .. nested_tf_str .. ' ' .. nested_ratings_str)
:allDone()
---------------------------
-- Make banner ------------
---------------------------
local status_class = (cfg.status[args.PROJECT_STATUS] or cfg.status.default) .. '-wikiproject'
local banner = mw.html.create('table')
local banner_rows = banner
:addClass('tmbox tmbox-notice mw-collapsible innercollapse wpb ' .. status_class)
:addClass(status_class)
:css('table-layout', 'fixed')
:tagnode('tr'nested_row)
:addClass('wpb-header')
:tag('td')
:addClass('wpb-header-icon')
:attr('width', '50px')
:css('text-align', 'center')
:wikitext(image({
image = args.IMAGE_LEFT,
size = '35x25px',
alt = 'WikiProject icon'
}))
:done()
:tag('td')
:addClass('wpb-header-combined')
:wikitext(wikilink(project_link.prefixedText, project) .. nested_tf_str .. ' ' .. nested_ratings_str)
:done()
:done()
:tag('tr')
:tag('td')