Module:Shortcut: Difference between revisions
From Test Wiki
Content deleted Content added
incorporate clear/pre/redirect of Template:Template shortcut; suppress module calls |
m 1 revision imported Tags: Mobile edit Mobile web edit |
||
| (4 intermediate revisions by 4 users not shown) | |||
| Line 57: | Line 57: | ||
listItems[i] = frame:expandTemplate{ |
listItems[i] = frame:expandTemplate{ |
||
title = 'No redirect', |
title = 'No redirect', |
||
args = templateMode and {templatePath, shortcut} or {shortcut} |
args = templateMode and {templatePath, shortcut} or {shortcut, shortcut} |
||
} |
} |
||
if templateMode then |
if templateMode then |
||
| Line 77: | Line 77: | ||
local root = mw.html.create() |
local root = mw.html.create() |
||
root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = 'Shortcut/styles.css'} }) |
root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = 'Module:Shortcut/styles.css'} }) |
||
-- Anchors |
-- Anchors |
||
local anchorDiv = root |
local anchorDiv = root |
||
| Line 103: | Line 103: | ||
local shortcutList = root |
local shortcutList = root |
||
:tag('div') |
:tag('div') |
||
:addClass('module-shortcutboxplain |
:addClass('module-shortcutboxplain noprint') |
||
:attr('role', 'note') |
:attr('role', 'note') |
||
if options.float and options.float:lower() == 'left' then |
if options.float and options.float:lower() == 'left' then |
||
| Line 117: | Line 117: | ||
:wikitext(shortcutHeading) |
:wikitext(shortcutHeading) |
||
end |
end |
||
local list = shortcutList:tag('ul') |
|||
local ubl = require('Module:List').unbulleted(listItems) |
|||
shortcutList:wikitext(ubl) |
|||
end |
|||
return tostring(root) |
return tostring(root) |
||
end |
end |
||