Modification de Module:Infobox
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 | ||
} | } | ||
-- 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 | ||
if subtext and (subtext ~= text) then | if subtext and (subtext ~= text) then | ||
text = text .. '<br /><small>' .. subtext .. '</small>' | text = text .. '<br /><small>' .. subtext .. '</small>' | ||
end | end | ||
local class = ' | local class = 'entete' | ||
local style = {} | local style = {} | ||
Ligne 72 : | Ligne 67 : | ||
style[i] = j | style[i] = j | ||
end | end | ||
end | end | ||
local subhead = nil | local subhead = nil | ||
if part.subhead then | if part.subhead then | ||
local subheadText = | 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 | ||
}) | }}) | ||
subhead = tostring(mw.html.create('div') | |||
:addClass('subhead') | |||
:wikitext(subheadText) | |||
:allDone()) | |||
end | end | ||
Ligne 100 : | Ligne 85 : | ||
:addClass(class) | :addClass(class) | ||
:css(style) | :css(style) | ||
:node(subhead) | :node(subhead) | ||
:tag('div') | :tag('div') | ||
:wikitext(text) | :wikitext(text) | ||
:allDone() | :allDone() | ||
Ligne 177 : | Ligne 160 : | ||
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 182 : | Ligne 168 : | ||
local image = mw.html.create('div') | local image = mw.html.create('div') | ||
:addClass(" | :addClass("images") | ||
:css(style) | :css(style) | ||
:wikitext(imagesString) | :wikitext(imagesString) | ||
Ligne 192 : | Ligne 178 : | ||
:wikitext(caption) | :wikitext(caption) | ||
:css(part.legendstyle or {}) | :css(part.legendstyle or {}) | ||
:addClass(" | :addClass("legend") | ||
:done() | :done() | ||
end | end | ||
Ligne 309 : | Ligne 295 : | ||
function p.buildsuccession(part) | function p.buildsuccession(part) | ||
if not part.value then | if not part.value then | ||
return nil | return nil | ||
end | end | ||
Ligne 354 : | Ligne 331 : | ||
if color == 'default' then | if color == 'default' then | ||
arrowLeft = '[[Fichier: | arrowLeft = '[[Fichier:Arrleft.svg|13px|alt=Précédent|link=]]' | ||
arrowRight = '[[Fichier: | arrowRight = '[[Fichier:Arrright.svg|13px|alt=Précédent|link=]]' | ||
else | else | ||
arrowLeft = '[[Fichier: | arrowLeft = '[[Fichier:Arrleft.svg|13px|alt=Suivant|link=]]' | ||
arrowRight = '[[Fichier: | arrowRight = '[[Fichier:Arrright.svg|13px|alt=Suivant|link=]]' | ||
style['background-color'] = color | style['background-color'] = color | ||
end | end | ||
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 498 : | ||
local text = getValue(part.value, part) | local text = getValue(part.value, part) | ||
local formattedlabel | local formattedlabel | ||
Ligne 537 : | Ligne 515 : | ||
function p.buildtable(part) | function p.buildtable(part) | ||
local tab = mw.html.create('table'):css(part.style or {}) | |||
local tab = mw.html.create('table') | |||
local rows = part.rows | local rows = part.rows | ||
Ligne 687 : | Ligne 653 : | ||
-- class | -- class | ||
local class = ' | local class = 'avt-infobox' | ||
if moduledata.class then | if moduledata.class then | ||
class = class .. ' ' .. moduledata.class | class = class .. ' ' .. moduledata.class |