« Module:Infobox/Addiction » : différence entre les versions
Page créée avec « local localdata = require('Module:Infobox/Localdata') local gamesTool = require('Module:Jeux') function buildGamesTable(localdata, index) local row = { type = 'text' } -… » |
mAucun résumé des modifications |
||
Ligne 1 : | Ligne 1 : | ||
local localdata = require('Module:Infobox/Localdata') | local localdata = require('Module:Infobox/Localdata') | ||
local | local abb = require('Module:Abréviation') | ||
function buildGamesTable(localdata, index) | function buildGamesTable(localdata, index) | ||
Ligne 7 : | Ligne 7 : | ||
if localdata['jeux'..index] then | if localdata['jeux'..index] then | ||
if games.buildLinksList({ localdata['jeux'..index] }) then | if games.buildLinksList({ localdata['jeux'..index] }) then | ||
row = { type = 'table', title = | row = { type = 'table', title = abb.links({ localdata['jeux'..index], 'Addictions' }), rows = { | ||
{ type = 'row', label = 'Cause', value = 'cause'..index }, | { type = 'row', label = 'Cause', value = 'cause'..index }, | ||
{ type = 'row', label = 'Risque', value = 'risque'..index }, | { type = 'row', label = 'Risque', value = 'risque'..index }, |
Version du 20 juin 2021 à 23:34
Ce module contient le paramétrage de l'infobox {{Infobox addiction}}.
local localdata = require('Module:Infobox/Localdata')
local abb = require('Module:Abréviation')
function buildGamesTable(localdata, index)
local row = { type = 'text' } --fake
if localdata['jeux'..index] then
if games.buildLinksList({ localdata['jeux'..index] }) then
row = { type = 'table', title = abb.links({ localdata['jeux'..index], 'Addictions' }), rows = {
{ type = 'row', label = 'Cause', value = 'cause'..index },
{ type = 'row', label = 'Risque', value = 'risque'..index },
{ type = 'row', label = 'Durée avant apparition', value = 'durée avant apparition'..index },
{ type = 'row', label = 'Durée', value = 'durée'..index },
{ type = 'row', label = 'Effet', value = 'effets'..index }
}}
end
end
return row
end
return {
parts = {
{ type = 'title', value = 'nom', subtitle = 'sous-titre', icon = 'icône', subhead = { subject = 'Addiction', link = 'Addiction' }},
{ type = 'images', imageparameters = { 'image', 'image2', 'image3', 'image4', 'image5' }, captionparameter = { 'légende', 'image desc' }},
buildGamesTable(localdata, '1'),
buildGamesTable(localdata, '2'),
buildGamesTable(localdata, '3'),
buildGamesTable(localdata, '4'),
buildGamesTable(localdata, '5'),
buildGamesTable(localdata, '6')
{ type = 'text', value = 'pied' }
}
}