Modification de Module:Infobox

Attention : vous n’êtes pas connecté(e). Votre adresse IP sera visible de tout le monde si vous faites des modifications. Si vous vous connectez ou créez un compte, vos modifications seront attribuées à votre propre nom d’utilisateur(rice) et vous aurez d’autres avantages.

La modification peut être annulée. Veuillez vérifier les différences ci-dessous pour voir si c’est bien ce que vous voulez faire, puis publier ces changements pour finaliser l’annulation de cette modification.

Version actuelle Votre texte
Ligne 13 : Ligne 13 :
namespace =  mw.title.getCurrentTitle().namespace
namespace =  mw.title.getCurrentTitle().namespace
}
}
local abb = require('Module:Abréviation')


-- l'objet principal à retourner
-- l'objet principal à retourner
Ligne 59 : Ligne 57 :
local text = getValue(part.value, part) or part.textdefaultvalue or mw.title.getCurrentTitle().text
local text = getValue(part.value, part) or part.textdefaultvalue or mw.title.getCurrentTitle().text
local subtext = getValue(part.subtitle, part) or part.subtitledefaultvalue
local subtext = getValue(part.subtitle, part) or part.subtitledefaultvalue
text = mw.ustring.gsub(text, " [(][^()]*[)]$", "")
if subtext and (subtext ~= text) then
if subtext and (subtext ~= text) then
text = text .. '<br /><small>' .. subtext .. '</small>'
text = text .. '<br /><small>' .. subtext .. '</small>'
Ligne 84 : Ligne 79 :
local subhead = nil
local subhead = nil
if part.subhead then
if part.subhead then
local subheadText = abb.links({
local subheadText = require('Module:Jeux').buildLinksList({args = {
getValue(part.subhead.games, part),
getValue(part.subhead.games, part),
part.subhead.link,
part.subhead.link,
part.subhead.subject
part.subhead.subject
})
}})
if subheadText then
subhead = tostring(mw.html.create('div')
subhead = tostring(mw.html.create('div')
:addClass('avt-infobox-header-subhead')
:addClass('avt-infobox-header-subhead')
:wikitext(subheadText)
:wikitext(subheadText)
:allDone())
:allDone())
end
end
end


Ligne 177 : Ligne 170 :
elseif #images > 1 then
elseif #images > 1 then
imagesString = imagesString .. '|upright=' .. ( 1 / #images )
imagesString = imagesString .. '|upright=' .. ( 1 / #images )
end
if image:sub(-4):lower() == '.svg' then
imagesString = imagesString .. '|lang=' .. wikiLang
end
end
imagesString = imagesString .. ']]'
imagesString = imagesString .. ']]'
Ligne 309 : Ligne 305 :
function p.buildsuccession(part)
function p.buildsuccession(part)
if not part.value then
if not part.value then
return nil
end
local values = part.value
local before = getValue(values['before'], part)
local center = getValue(values['center'], part)
local after  = getValue(values['after'], part)
if not before and not center and not after then
return nil
return nil
end
end
Ligne 363 : Ligne 350 :
local styleTrans = {}
local styleTrans = {}
local values = part.value
local before = values['before']
local center = values['center']
local after = values['after']
local widthCell = '44%'
local widthCell = '44%'
Ligne 516 : Ligne 508 :
local text = getValue(part.value, part)
local text = getValue(part.value, part)
if not text then
return nil
end


local formattedlabel
local formattedlabel
Ligne 537 : Ligne 525 :


function p.buildtable(part)
function p.buildtable(part)
local class = nil
local tab = mw.html.create('table'):css(part.style or {})
if part.collapseparameters then
if part.collapseparameters.collapsible == true then
class = 'mw-collapsible'
if part.collapseparameters.collapsed == true then
class = class ..' mw-collapsed'
end
end
end
local tab = mw.html.create('table')
:addClass(class)
:css(part.style or {})


local rows = part.rows
local rows = part.rows
Ligne 687 : Ligne 663 :
-- class
-- class
local class = 'infobox avt-infobox'
local class = 'avt-infobox'
if moduledata.class then
if moduledata.class then
class = class .. ' ' .. moduledata.class
class = class .. ' ' .. moduledata.class
Notez bien que toutes les contributions à Les Archives de Vault-Tec sont considérées comme publiées sous les termes de la creative Commons - CC BY-NC-SA 3.0 (voir Les Archives de Vault-Tec:Copyrights pour plus de détails). Si vous ne désirez pas que vos écrits soient modifiés et distribués à volonté, merci de ne pas les soumettre ici.
Vous nous promettez aussi que vous avez écrit ceci vous-même, ou que vous l’avez copié d’une source placée dans le domaine public ou d’une ressource libre similaire. N’utilisez aucun travail sous droits d’auteur sans autorisation expresse !
Annuler Aide pour la modification (s’ouvre dans une nouvelle fenêtre)