« Module:Version imprimable » : différence entre les versions

Contenu supprimé Contenu ajouté
MEP
MEP
Ligne 8 :
Ending1 = "GFDL"
Ending2 = ""
templateLeft = '<div style="float: left;">[[File:Go-previous-grey.svg|48px|link=]] [['
templateRight = '<div style="float: right;">[[File:Go-next-grey.svg|48px|link=]] [['
TOC = "Sommaire"
sep = "/"
OnlySubpages = true
debug = false
 
 
local p = {}
Ligne 169 ⟶ 170 :
local lines_ = mw.text.split(text, "\n")
local footer = {}
local previousChapter = '../|' .. TOC
local found = false
local chapter
Ligne 184 ⟶ 185 :
if (PageName ~= nil and PageName ~= '') then
if found == true then
table.insert(footer, templateLeft .. previousChapter .. ']]</div>')
table.insert(footer, templateRight .. BookName .. sep .. PageName .. '|' .. PageName .. ']]</div>')
break
elseif PageName == currentPageName then
Ligne 204 ⟶ 205 :
if found == true and table.getn(footer) == 0 then
-- No next chapter
table.insert(footer, templateLeft .. previousChapter .. ']]</div>')
table.insert(footer, templateRight .. '../|' .. TOC .. ']]</div>')
end
 
return table.concat(footer, "|")
end