Content deleted Content added
update from sandbox, per talk page Tag: Reverted |
m Reverted edit by Pigsonthewing (talk) to last version by Jonesey95 |
||
Line 82:
function Navigator:makeBlurb()
local args = self.args
-- The old template used "|1" to suppress the blurb.
local ret▼
▲ if args.text then
ret = args.text▼
else
if args.
▲ ret = args.text
talkPage = talkPage .. current.baseText▼
else
local talkPage =
end▼
local namespace▼
talkPage = talkPage .. self.currentTitle.rootText
if current.isTalkPage == true then▼
▲ end
namespace = 'talk'▼
local namespace
end▼
else
▲ if args.period then
ret = self:message('blurb-period', talkPage, makeWikilink(current.subjectPageTitle.fullText),▼
▲ end
args.period, namespace)▼
ret = self:message('blurb-period', talkPage, args.period, namespace)
else
▲ ret = self:message('blurb-
end
return ret
end
▲ return ret
end
function Navigator:makeMessageBox()
local args = self.args
local image
if args.image then
Line 129 ⟶ 133:
-- PS: Needs to be changed if the template is renamed!
local mainTemplatePage = ''
if self.currentTitle.fullText == 'Template:Archive
mainTemplatePage = 'talk'
end
Line 139 ⟶ 143:
style = args.style or '',
textstyle = args.textstyle or 'text-align:center',
text = self:makeBlurb()
})
Line 315 ⟶ 319:
end
ret[#ret + 1] = '\n|}'
return table.concat(ret)
end
function Navigator:__tostring()
'\n' ..
' __NONEWSECTIONLINK__ __NOEDITSECTION__ __ARCHIVEDTALK__'
▲ archiveBox = self:makeMessageBox() .. '\n' .. archiveBox
▲ else
▲ end
end
Line 350 ⟶ 342:
function p._aan(args, cfg, currentTitle)
cfg = cfg or mw.loadData('Module:Archive/config
currentTitle = currentTitle or mw.title.getCurrentTitle()
local aan = Navigator.new(args, cfg, currentTitle)
|