Module:Navbox: திருத்தங்களுக்கு இடையிலான வேறுபாடு
உள்ளடக்கம் நீக்கப்பட்டது உள்ளடக்கம் சேர்க்கப்பட்டது
missed an option |
edit for succinctness |
||
வரிசை 82:
function formNavBar(
if not args[1] then
local
span
.addClass('error')
.css('float', 'left')
.css('white-space', 'nowrap')
.wikitext('Error: No name provided')
return span
end
local title;
local
title = mw.title.new(
else
title = mw.title.new(
if title.namespace == 0 then
title = mw.title.
end
end
local mainpage
local viewLink, talkLink, editLink = 'view', 'talk', 'edit'
if args.mini then
viewLink, talkLink, editLink = 'v', 't', 'e'
end
local div = HtmlBuilder.create( 'div' )
div
.addClass(
.
.addClass( 'hlist' )
.addClass( 'navbar')
.cssText( args.style )
if args.mini
if not (args.mini or args.plain) then
div
.
.css( 'word-spacing', 0 )
.cssText( args.fontstyle )
.wikitext( args.text or 'This box:' )
.wikitext( ' ' )
end
if args.brackets
div
.css('margin-right', '-0.125em')
.cssText( args.fontstyle
.wikitext( '[' )
.newline();
end
local ul = div.tag('ul');
ul
.
.
.
.
.
.wikitext( viewLink )
.done()
.wikitext( ']]' )
.done()
.
.addClass( 'nv-talk' )
.wikitext( '[[' .. talkpage .. '|' )
.tag( 'span ' )
.attr( 'title', '
.cssText( args.fontstyle or '' )
.wikitext(
.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
div
.
.
.
.newline();
end
வரிசை 208:
if args.state == 'plain' then spacerSide = 'right' end
fontstyle = (args.basestyle or '') .. ';' .. (args.titlestyle or '') .. ';background:none transparent;border:none;'
end
வரி 532 ⟶ 519:
end
end
return tostring( formNavBar( args ) )
end
| |||