Modification de Module:Infobox/Lieu
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 1 : | Ligne 1 : | ||
localdata = require( "Module:Infobox/Localdata" ) | |||
-- sujet | |||
function buildSubject(localdata) | |||
local subject = 'Lieu' | |||
if localdata['type'] then | |||
local types = { | |||
['ville'] = 'Ville', | |||
} | |||
subject = types[localdata['type']:lower()] or subject | |||
end | |||
return subject | |||
end | |||
function buildIcon(localdata) | |||
local icon = 'Icon landmark.png' | |||
if localdata['icône'] then | |||
icon = localdata['icône'] | |||
elseif localdata['type'] then | |||
local types = { | |||
['ville'] = 'Icon ville.png', | |||
} | |||
icon = types[localdata['type']:lower()] or icon | |||
end | |||
return icon | |||
end | |||
return { | return { | ||
parts = { | |||
{ type = 'title', value = 'nom', subtitle = 'sous-titre', icon = function(localdata) return buildIcon(localdata) end, subhead = { games = 'jeu', subject = buildSubject(localdata), link = 'Lieu' }}, | |||
{ type = "images", imageparameters = { "image", "image2", "image3", "image4", "image5" }, captionparameter = { "légende", "image desc" }}, | |||
{ type = "table", separator = true, rows = { | |||
{ type = "row", label = "Faction", value = "faction" }, | |||
{ type = "row", label = "Planète", value = "planète" }, | |||
}}, | |||
{ type = "text", value = "pied" } | |||
} | |||
} | } |