Module:Navbox: திருத்தங்களுக்கு இடையிலான வேறுபாடு

உள்ளடக்கம் நீக்கப்பட்டது உள்ளடக்கம் சேர்க்கப்பட்டது
missed an option
edit for succinctness
வரிசை 82:
 
 
function formNavBar( div, args )
if not args[1] then
local class = 'noprint plainlinks hlist navbar';
local title;span = HtmlBuilder.create('span')
 
args[1] = trim( args[1] or '' );
span
.addClass('error')
.css('float', 'left')
.css('white-space', 'nowrap')
.wikitext('Error: No name provided')
return span
end
local title;
if args[1] == '' then
local titlepageName = mw.title.newtrim( ''args[1] );
elseifif args[1]pageName:sub(1,1) == ':' then
title = mw.title.new( args[1]pageName:sub(2) );
else
title = mw.title.new( args[1]pageName );
if title.namespace == 0 then
title = mw.title.newmakeTitle( 'Template:', .. args[1]pageName );
end
end
local mainpage, talkpage,= editurltitle.fullText;
mainpagelocal talkpage = title.talkPageTitle and title.talkPageTitle.fullText; or ''
talkpagelocal editurl = title.talkPageTitle:fullUrl( 'action=edit' );
talkpage = talkpage.fullText or '';
editurl = title:fullUrl( 'action=edit' );
local viewLink, talkLink, editLink = 'view', 'talk', 'edit'
if args.mini ~= nil then
if args.mini then
class = class .. ' mini';
viewLink, talkLink, editLink = 'v', 't', 'e'
end
 
local div = HtmlBuilder.create( 'div' )
div
.addClass( class'noprint' )
.cssTextaddClass( args.style or 'plainlinks' )
.addClass( 'hlist' )
.addClass( 'navbar')
.cssText( args.style )
if args.mini ==then nil and argsdiv.plainaddClass('mini') == nil thenend
div.tag( 'span' )
if not (args.mini or args.plain) then
.css( 'word-spacing', 0 )
div
.cssText( args.fontstyle or '' )
.wikitexttag( args.text or 'This box:span' );
.css( 'word-spacing', 0 )
.cssText( args.fontstyle )
.wikitext( args.text or 'This box:' )
.wikitext( ' ' )
end
if args.brackets ~= nil then
div.wikitext(' ');
div .tag('span')
.css('margin-right', '-0.125em')
.cssText( args.fontstyle or '' )
.wikitext( '[' )
.newline();
end
local ul = div.tag('ul');
local inner
if args.mini ~= nil then
inner = 'v';
else
inner = 'view';
end
ul.tag( 'li' )
.addClasstag( 'nv-viewli' )
.wikitext( '[[' .. mainpage ..addClass( '|nv-view' )
.tagwikitext( 'span[[' .. mainpage .. '|' )
.attrtag( 'title', 'View thisspan template' )
.cssTextattr( args.fontstyle or'title', 'View this template' )
.wikitextcssText( innerargs.fontstyle or '' )
.wikitext( viewLink )
.done()
.wikitext( ']]' )
.done()
.wikitexttag( ']]li' );
.addClass( 'nv-talk' )
 
.wikitext( '[[' .. talkpage .. '|' )
if args.mini ~= nil then
inner = 't';
else
inner = 'talk';
end
ul.tag( 'li' )
.addClass( 'nv-talk' )
.wikitext( '[[' .. talkpage .. '|' )
.tag( 'span ' )
.attr( 'title', 'Discuss this template' )
.cssText( args.fontstyle or '' )
.wikitext( inner )
.done()
.wikitext( ']]' );
 
if args.noedit == nil then
if args.mini ~= nil then
inner = 'e';
else
inner = 'edit';
end
ul.tag( 'li' )
.addClass( 'nv-edit' )
.wikitext( '[' .. editurl .. ' ' )
.tag( 'span ' )
.attr( 'title', 'EditDiscuss this template' )
.cssText( args.fontstyle or '' )
.wikitext( innertalkLink )
.done()
.wikitext( ']]' );
 
if not args.noedit then
ul
.tag( 'li' )
.addClass( 'nv-edit' )
.wikitext( '[' .. editurl .. ' ' )
.tag( 'span ' )
.attr( 'title', 'Edit this template' )
.cssText( args.fontstyle or '' )
.wikitext( editLink )
.done()
.wikitext( ']' );
end
if args.brackets ~= nil then
div.tag('span')
.csstag('margin-left', '-0.125emspan')
.cssText( args.fontstyle or .css('margin-left', '-0.125em')
.wikitextcssText( args.fontstyle or ']' )
.newlinewikitext() ']' )
.newline();
end
 
வரிசை 208:
if args.state == 'plain' then spacerSide = 'right' end
 
if argstitleCell.namenode(formNavBar({ then
localargs.name, div = HtmlBuilder.create('div');
local argsmini = {1,
fontstyle = (args.basestyle or '') .. ';' .. (args.titlestyle or '') .. ';background:none transparent;border:none;'
args.name,
mini = 1, }))
fontstyle = (args.basestyle or '') .. ';' .. (args.titlestyle or '') .. ';background:none transparent;border:none;'
};
div = formNavBar( div, args );
titleCell.node( div )
else
titleCell
.tag('span')
.addClass('error')
.css('float', 'left')
.css('white-space', 'nowrap')
.wikitext('Error: No name provided')
end
end
வரி 532 ⟶ 519:
end
end
return tostring( formNavBar( args ) )
local div = HtmlBuilder.create('div')
return tostring( formNavBar( div, args ) )
end
"https://tamilar.wiki/w/Module:Navbox" இலிருந்து மீள்விக்கப்பட்டது