« Module:Infobox/Contenu téléchargeable » : différence entre les versions
Page créée avec « local localdata = require('Module:Infobox/Localdata') function buildReleaseDateRow(localdata, index) local row = { type = 'text'} if localdata['plateforme'..index] and… » |
mAucun résumé des modifications |
||
Ligne 4 : | Ligne 4 : | ||
local row = { type = 'text'} | local row = { type = 'text'} | ||
if localdata['plateforme'..index] and localdata['plateforme'..index..'date'] then | if localdata['plateforme'..index] and localdata['plateforme'..index..'date'] then | ||
row = { type = 'row', label = localdata['plateforme'..index], value = localdata['plateforme'..index..'date'] } | row = { type = 'row', label = localdata['plateforme'..index], value = function(localdata) return localdata['plateforme'..index..'date'] end } | ||
end | end | ||
return row | return row | ||
Ligne 12 : | Ligne 12 : | ||
local row = { type = 'text'} | local row = { type = 'text'} | ||
if localdata['plateforme'..index] and localdata['plateforme'..index..'dispo'] then | if localdata['plateforme'..index] and localdata['plateforme'..index..'dispo'] then | ||
row = { type = 'row', label = localdata['plateforme'..index], value = localdata['plateforme'..index..'dispo'] } | row = { type = 'row', label = localdata['plateforme'..index], value = function(localdata) return localdata['plateforme'..index..'dispo'] end } | ||
end | end | ||
return row | return row |
Version du 29 juillet 2021 à 18:54
Ce module contient le paramétrage de l'infobox {{Infobox contenu téléchargeable}}.
local localdata = require('Module:Infobox/Localdata')
function buildReleaseDateRow(localdata, index)
local row = { type = 'text'}
if localdata['plateforme'..index] and localdata['plateforme'..index..'date'] then
row = { type = 'row', label = localdata['plateforme'..index], value = function(localdata) return localdata['plateforme'..index..'date'] end }
end
return row
end
function buildPlatformLinkRow(localdata, index)
local row = { type = 'text'}
if localdata['plateforme'..index] and localdata['plateforme'..index..'dispo'] then
row = { type = 'row', label = localdata['plateforme'..index], value = function(localdata) return localdata['plateforme'..index..'dispo'] end }
end
return row
end
return {
parts = {
{ type = 'title', value = 'nom', subtitle = 'sous-titre', icon = 'icône', subhead = { games = 'jeux', subject = 'Contenu téléchargeable', link = 'Contenus téléchargeables' }},
{ type = 'images', imageparameters = { 'image', 'image2', 'image3', 'image4', 'image5' }, captionparameter = { 'légende', 'image desc' }},
{ type = 'table', title = 'Général', rows = {
{ type = 'row', label = 'Développeurs', value = 'développeurs' },
{ type = 'row', label = 'Éditeur', value = 'éditeur' }
}},
{ type = 'table', title = 'Dates de sortie', rows = {
buildReleaseDateRow(localdata, '1'),
buildReleaseDateRow(localdata, '2'),
buildReleaseDateRow(localdata, '3'),
buildReleaseDateRow(localdata, '4'),
buildReleaseDateRow(localdata, '5')
}},
{ type = 'table', title = 'Disponibilité', rows = {
buildPlatformLinkRow(localdata, '1'),
buildPlatformLinkRow(localdata, '2'),
buildPlatformLinkRow(localdata, '3'),
buildPlatformLinkRow(localdata, '4'),
buildPlatformLinkRow(localdata, '5')
}},
{ type = 'table', title = 'Technique', rows = {
{ type = 'row', label = 'Taille', value = 'taille' },
{ type = 'row', label = 'Patch', value = 'patch' }
}},
{ type = 'text', value = 'pied' }
}
}