Modul:Navbox: Unterschied zwischen den Versionen
add hlist vevent to tracking options as per edit request
Keine Bearbeitungszusammenfassung |
(add hlist vevent to tracking options as per edit request) |
||
Zeile 5: | Zeile 5: | ||
local p = {} | local p = {} | ||
local HtmlBuilder = require(' | local HtmlBuilder = require('Module:HtmlBuilder') | ||
local Navbar = require(' | local Navbar = require('Module:Navbar') | ||
local args | local args | ||
Zeile 263: | Zeile 263: | ||
if mw.ustring.sub(s, 1, 1) == '0' then return end -- not in template space | if mw.ustring.sub(s, 1, 1) == '0' then return end -- not in template space | ||
local subpage = mw.ustring.lower(mw.ustring.sub(s, 2)) | local subpage = mw.ustring.lower(mw.ustring.sub(s, 2)) | ||
if subpage == ' | if subpage == 'doc' or subpage == 'sandbox' or subpage == 'testcases' then return end | ||
for i, cat in ipairs(getTrackingCategories()) do | for i, cat in ipairs(getTrackingCategories()) do | ||
builder.wikitext('[[ | builder.wikitext('[[Category:' .. cat .. ']]') | ||
end | end | ||
end | end | ||
Zeile 272: | Zeile 272: | ||
function getTrackingCategories() | function getTrackingCategories() | ||
local cats = {} | local cats = {} | ||
if needsHorizontalLists() then table.insert(cats, 'Navigational boxes without horizontal lists') end | |||
if hasBackgroundColors() then table.insert(cats, 'Navboxes using background colours') end | |||
return cats | return cats | ||
end | end | ||
Zeile 280: | Zeile 280: | ||
if border == 'child' or border == 'subgroup' or args.tracking == 'no' then return false end | if border == 'child' or border == 'subgroup' or args.tracking == 'no' then return false end | ||
local listClasses = {'plainlist', 'hlist', 'hlist hnum', 'hlist vcard', 'vcard hlist'} | local listClasses = {'plainlist', 'hlist', 'hlist hnum', 'hlist hwrap', 'hlist vcard', 'vcard hlist', 'hlist vevent'} | ||
for i, cls in ipairs(listClasses) do | for i, cls in ipairs(listClasses) do | ||
if args.listclass == cls or args.bodyclass == cls then | if args.listclass == cls or args.bodyclass == cls then |