Content deleted Content added
m Reverted edit by Pigsonthewing (talk) to last version by Jonesey95 |
update from sandbox, per talk page - bug should be fixed now |
||
Line 82:
function Navigator:makeBlurb()
local args = self.args
local current = self.currentTitle
if args[1] == '1' then▼
return ''▼
else
local talkPage = current.nsText .. ':'
▲ local ret
if args.
▲ ret = args.text
else
if args.prefix then▼
▲ talkPage = talkPage .. self.currentTitle.baseText
else▼
▲ end
▲ if self.currentTitle.isTalkPage == true then
▲ namespace = 'talk'
local subjectPage = current.subjectNsText .. ':' .. current.rootText
else▼
▲ namespace = 'main'
▲ end
▲ if args.period then
'', namespace)
▲ ret = self:message('blurb-noperiod', talkPage, namespace)
end▼
end
end
end
function Navigator:makeMessageBox()
local args = self.args
local image
if args.image then
Line 133 ⟶ 130:
-- PS: Needs to be changed if the template is renamed!
local mainTemplatePage = ''
if self.currentTitle.fullText == 'Template:Archive/sandbox' then
mainTemplatePage = 'talk'
end
Line 143 ⟶ 140:
style = args.style or '',
textstyle = args.textstyle or 'text-align:center',
text = self:makeBlurb(),
})
Line 319 ⟶ 316:
end
ret[#ret + 1] = '\n|}'
return table.concat(ret)
end
function Navigator:__tostring()
local args = self.args
return self:makeMessageBox() ..▼
▲ self:makeArchiveLinksWikitable() ..
' __NONEWSECTIONLINK__ __NOEDITSECTION__ __ARCHIVEDTALK__'
-- Do not make the mbox if |1=1 or |omit=banner.
if args[1] ~= '1' and args.omit ~= 'banner' then
-- I'll give out a barnstar to whoever figures out why not prepending
-- an HTML comment makes it add a line break before the archive table.
-- -User:Hilst
archiveBox = '<!--suppress line break-->' .. archiveBox
return archiveBox
end
Line 342 ⟶ 351:
function p._aan(args, cfg, currentTitle)
cfg = cfg or mw.loadData('Module:Archive/config/sandbox')
currentTitle = currentTitle or mw.title.getCurrentTitle()
local aan = Navigator.new(args, cfg, currentTitle)
|