Module:Infobox/Gare
Apparence
[voir] [modifier] [historique] [purger]
Cette page définit un module d'infobox. Pour les conseils sur l'usage de ce module, voyez Modèle:Infobox Gare.
La documentation de ce module est générée par le modèle {{Documentation module}}.
Elle est incluse depuis la page Modèle:Documentation module d'infobox. Veuillez placer les catégories sur cette page-là.
Les éditeurs peuvent travailler dans le bac à sable (modifier).
Voir les statistiques d'appel depuis le wikicode sur l'outil wstat et les appels depuis d'autres modules.
local building = require "Module:Infobox/Fonctions/Bâtiment"
local general = require "Module:Infobox/Fonctions"
local wikidata = require "Module:Wikidata"
return
{
maincolor = '#E0E0E0',
parts = {
general.title(),
building.mainimage('Article à illustrer Gare'),
{type = 'table', title = 'Localisation', rows = {
building.country(),
building.adminlocation(),
building.coordinates(),
}
},
{type = 'table', title = ' Gestion et exploitation', rows = {
building.owner(),
{type = mixed, label = 'Exploitant', value = 'exploitant', property = 'P137'},
{type = mixed, label = function(localdata, item) return localdata['titre services'] or 'Services' end, value = 'services'},
}
},
{type = 'table', title = 'Caractéristiques', rows = {
{type = 'mixed', label = 'Ligne(s)', value = 'lignes', property = 'P81'},
{type = 'mixed', label = 'Voie', value = 'voies', property = 'P1103'}, -- P1103: nombre de quais
{type = 'mixed', label = 'Hauteur', value = 'hauteur'},
{type = 'mixed', label = 'Transit annuel', value = 'transit'},
{type = 'mixed', label = 'Zone', value = function(localdata, item)
local rawstring = localdata[zone]
-- format du paramètre : "nom de la région/numméro de zone"
local splitted = mw.text.split( rawstring, '/', true )
if not splitted or #splitted < 1 then
return rawstring
end
--Île de-France
if split[1] == 'IDF' then
local zone = tonumber(split[2] or '')
if not zone or (zone > 8) then
return '[[Tarification des transports en commun d’Île-de-France|Tarification Île-de-France]] non applicable[[Catégorie:Hors zone des transports en commun d\'Île-de-France]]'
end
return tostring(zone) .. ' ([[tarification des transports en commun d\'Île-de-France|tarification Île-de-France]])'
end
return rawstring
end
},
{type = 'mixed', label = 'Altitude', value = 'altitude'},
}
},
{type = 'table', title = 'Historique', rows = {
{type = 'mixed', label = 'Mise en service', value = 'mise en service'},
building.opening(),
{type = 'mixed', label = 'Fermeture', value = 'fermeture'},
building.architect(),
building.protection(),
}
},
{type = 'table', title = 'Correspondances', rows = {
{type = 'mixed', label = function(localdata, item) return localdata['titre corresp1'] or 'corresp1' end, value = 'corresp 1'},
{type = 'mixed', label = function(localdata, item) return localdata['titre corresp2'] or 'corresp1' end, value = 'corresp 2'},
{type = 'mixed', label = function(localdata, item) return localdata['titre corresp3'] or 'corresp1' end, value = 'corresp 3'},
{type = 'mixed', label = function(localdata, item) return localdata['titre corresp4'] or 'corresp1' end, value = 'corresp 4'},
{type = 'mixed', label = function(localdata, item) return localdata['titre corresp5'] or 'corresp1' end, value = 'corresp 5'},
{type = 'mixed', label = function(localdata, item) return localdata['titre corresp6'] or 'corresp1' end, value = 'corresp 6'},
{type = 'mixed', label = function(localdata, item) return localdata['titre corresp7'] or 'corresp1' end, value = 'corresp 7'},
{type = 'mixed', label = 'Métro', value = 'métro'},
{type = 'mixed', label = 'Tramway', value = 'tramway'},
{type = 'mixed', label = 'Bus', value = 'bus'},
{type = 'mixed', value = 'Schéma'},
}
},
building.geoloc(),
}
}