Module:Navbar: திருத்தங்களுக்கு இடையிலான வேறுபாடு
உள்ளடக்கம் நீக்கப்பட்டது உள்ளடக்கம் சேர்க்கப்பட்டது
சி update |
சி Sivakosaranஆல் செய்யப்பட்ட கடைசித் தொகுப்புக்கு முன்நிலையாக்கப்பட்டது |
||
வரிசை 2:
local getArgs
local HtmlBuilder = require('Module:HtmlBuilder')
local function trim(s)
return mw.ustring.match(s, "^%s*(.-)%s*$")
end
local function htmlError(s)
span
.addClass('error')
.css('float', 'left')
.css('white-space', 'nowrap')
.wikitext('Error: ' .. s)
return tostring(span)
end
local function getTitle(pageName)
pageName = trim(pageName);
local page_title, talk_page_title;
if mw.ustring.sub(pageName, 1, 1) == ':' then
page_title = mw.title.new( mw.ustring.sub(pageName, 2));
else
end
if page_title then
talk_page_title = page_title.talkPageTitle;
else
talk_page_title = nil;
end
return page_title, talk_page_title;
end
function p._navbar(args)
local good, title, talk_title;
local titleArg = 1
if args.collapsible then
titleArg = 2
வரி 16 ⟶ 53:
args.style = 'float:left; text-align:left; width:6em;'
end
if not good then
▲ local title = mw.title.new(mw.text.trim(titleText), 'Template');
return htmlError(title);
end
if not title then
return htmlError('Page does not exist')
end
local
local talkpage = talk_title and talk_title.fullText or ''
local editurl = title:fullUrl('action=edit');
local viewLink, talkLink, editLink = 'view', 'talk', 'edit'
▲ local div = mw.html.create():tag('div')
if args.mini then
viewLink, talkLink, editLink = 'பா', 'உ', 'தொ'
end
local div = HtmlBuilder.create().tag('div')
div
if args.mini then div
if not (args.mini or args.plain) then
div
end
if args.brackets then
div
end
local ul = div
ul
if not args.noedit then
ul
end
if args.brackets then
div
end
if args.collapsible then
div
end
return tostring(div
end
| |||