Module:WikiProject banner/sandbox: Difference between revisions

Content deleted Content added
not ready for this
Line 347:
local importance_rating = cfg.importance.rating:format(pagetype, rating, scale)
local colour = cfg.importance.colour[importance] or frame:expandTemplate{title='Importance/colour', args={importance}}
add_category(local category = (importance=='' and 'Unknown' or importance) .. '-' .. importance_name .. ' ' .. assessment_cat)
local importance_row = mw.html.create('tr')
:tag('td')
importance_row
:addClass('import'):addClass('import-' .. importance)
:node(frame:expandTemplate{title='Importance', args={importance, category=assessment_cat, impn=importance_name}})
:css('background', colour):wikitext(wikilink(':Category:' .. category, importance=='' and '???' or importance))
:done()
:tag('td'):addClass('mbox-text'):attr('colspan', '2'):wikitext(importance_rating)
:allDone()
Line 361 ⟶ 364:
end
if importance then --add importance category
add_category(category)
add_category((importance=='' and 'Unknown' or importance) .. '-' .. importance_name .. ' ' .. assessment_cat)
end
if class or importance then