Aller au contenu

Module:Infobox/Tunnel

Une page de Wikipédia, l'encyclopédie libre.
Ceci est une version archivée de cette page, en date du 14 août 2017 à 19:50 et modifiée en dernier par Vascer (discuter | contributions). Elle peut contenir des erreurs, des inexactitudes ou des contenus vandalisés non présents dans la version actuelle.

 Documentation[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 Tunnel.


local building = require "Module:Infobox/Fonctions/Bâtiment"
local general = require "Module:Infobox/Fonctions"
local localdata = require "Module:Infobox/Localdata"
local wd = require "Module:Interface Wikidata".fromLua

return 
	{
		parts =
		{
			general.title("entete map"),
			general.mainimage(),
			{type = "table", rows = {
				{type = 'mixed', label = 'Nom officiel', plurallabel = 'Noms officiels', value = 'nom officiel', wikidata = {property = 'P1448', showlang = true, conjtype = 'new line'}},
				{type = 'mixed', label = 'Type', value = 'type', wikidata = {property = 'P31', link = '-'}},
				{type = 'mixed', label = 'Véhicule admis', plurallabel = 'Véhicules admis', value = 'véhicule'},
				}
			},
			{type = "table", title = "Géographie", rows = {
				general.country(),
				{type = 'mixed', label = 'Itinéraire', value = 'itinéraire', wikidata = {property = {'P2505'}, conjtype = 'new line', showqualifiers = {'P17'}, excludespecial = true, labelformat = function(id) return wd.formatStatements{entity = id, property = 'P1824', numval = 1} or wd.getLabel(id) end} },
				{type = 'mixed', label = 'Traversée', value = 'traversée', wikidata = {property = 'P177', conjtype = 'new line'} },
				{type = 'mixed', label = 'Altitude', value = 'altitude', wikidata = {property = {'P559'}, conjtype = 'new line', showqualifiers = {'P2044'} } },
				general.coordinates({numval = '2'}),
				}
			},
			{type = "table", title = "Caractéristiques", rows = {
				{type = 'mixed', label = 'Gabarit', value = 'gabarit'},
				{type = 'mixed', label = 'Diamètre', value = 'diamètre', wikidata = {property = 'P2386', targetunit = 'metre', conjtype = ' ou ', rounding = '1', numval = '2'}},
				{type = 'mixed', label = 'Section', value = 'section'},
				{type = 'mixed', label = 'Écartement', value = 'écartement'},
				{type = 'mixed', label = 'Longueur', value = 'longueur', wikidata = {property = 'P2043', targetunit = 'metre', conjtype = ' ou ', rounding = '1', numval = '2'}},
				{type = 'mixed', label = 'Nombre de tubes', value = 'nombre tube', wikidata = {property = 'P2670', showonlyqualifier = 'P1114'}},
				{type = 'mixed', label = 'Nombre de voies par tube', value = 'nombre de voie', wikidata = {property = 'P2670', showonlyqualifier = 'P1114'}},
				}
			},
			{type = "table", title = "Historique", rows = {
				building.construction(),
				building.opening(),
				building.closure(),
				}
			},
			{type = "table", title = "Exploitation", rows = {
				{type = 'mixed', label = 'Exploitant', value = 'exploitant', wikidata = {property = 'P137', conjtype = 'new line', form = 'short', atdate = 'today'}},
				{type = 'mixed', label = 'Péage', value = 'péage', wikidata = {property = 'P2555', showqualifiers = {'P3005', 'P518'}, conjtype = 'new line', rounding = '2', atdate = 'today'}},
				{type = 'mixed', label = 'Fréquentation', value = 'trafic'},
				}
			},
			general.geoloc(),
		}
	}