Aller au contenu

Module:Infobox/Plan d'eau

Une page de Wikipédia, l'encyclopédie libre.
Ceci est une version archivée de cette page, en date du 29 juillet 2016 à 18:01 et modifiée en dernier par Thierry Caro (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 Plan d'eau.


local building = require "Module:Infobox/Fonctions/Bâtiment"
local general = require "Module:Infobox/Fonctions"
local wikidata = require "Module:Wikidata"
local wd = require "Module:Interface Wikidata".fromLua
local l = require "Module:Infobox/Fonctions/Localité"
local function getDate(event) 
	return wikidata.getTheDate{targetvalue = event, property = 'P793', addcat = true, entity = item}
end

return 
	{
	maincolor = 'D0E0F0',
	parts =
    	{
			general.title( "entete map"),
			l.mainimage(),
			{type = 'table', rows = {
				{type = 'row', label = 'Nom dans la langue originale', value = 'nom dans la langue originale', wikidata = {property = 'P1705', showlang = true} },
				{type = 'row', label = 'Nom officiel', plurallabel = 'Noms officiels', value = 'nom officiel', property = 'P1448'},
				}
			},
			{type = 'table', title = 'Géographie', rows = {
				{type = 'row', label = 'Continent', plurallabel = 'Continents', value = 'continent', property = 'P30'},
				building.country(),
				{type = 'row', label = 'Région', plurallabel = 'Régions', value = 'région', property = 'P131'},
				building.historicalregion(),
				{type = 'row', label = 'Localisation géographique', value = 'localisation géographique', property = 'P706'},
				{type = 'row', label = 'Type', value = 'type', property = 'P31'},
				{type = 'row', label = 'Partie de', value = 'partie de', property = 'P361'},
				{type = "row", label = "Aire protégée", plurallabel = "Aires protégées", value = "aire protégée", property = "P3018"},
				{type = 'row', label = 'Climat', plurallabel = 'Climats', value = 'climat', property = 'P2564'},
				{type = 'row', label = 'Altitude', value = 'altitude', wikidata = {property = 'P2044', targetunit = 'metre', conjtype = ' ou '} },
				{type = 'row', label = 'Longueur', value = 'longueur', property = 'P2043'},
				{type = 'row', label = 'Largeur', value = 'largeur', property = 'P2049'},
				{type = 'row', label = 'Périmètre', value = 'périmètre', property = 'P2547'},
				{type = 'row', label = 'Superficie', value = 'superficie', wikidata = {property = 'P2046', targetunit = 'sqkm'} },
				{type = 'row', label = 'Profondeur', value = 'profondeur', wikidata = {property = 'P2610', targetunit = 'm'} },
				{type = 'row', label = 'Volume', value = 'volume', property = 'P2234'},
				{type = 'row', label = 'Subdivision', plurallabel = 'Subdivisions', value = 'subdivision', property = 'P150'},
				{type = "row", label = "Îles", value = "nombre d'îles", wikidata = function()
					return wd.formatQualifiers{entity = item, property = 'P527', targetvalue = 'Q23442', qualifiers = 'P1114', addcat = true, linkback = true}
					end
				},
				}
			},
			{type = 'table', title = 'Hydrographie', rows = {
				{type = 'row', label = 'Bassin versant', value = 'bassin versant', wikidata = {property = 'P2053', targetunit = 'sqkm'} },
				{type = 'row', label = 'Alimentation', value = 'alimentation', property = 'P200'},
				{type = 'row', label = 'Émissaire', plurallabel='Émissaires', value = 'émissaire', property = 'P201'},
				{type = 'row', label = 'Débit', value = 'débit', property = 'P2225'},
				building.coordinates(),
				}
			},
			{type = 'table', title = 'Histoire', rows = {
				{type = 'row', label = 'Origine du nom', value = 'origine du nom', property = 'P138'},
				{type = 'row', label = 'Événement clé', plurallabel = 'Événements clés', value = 'événement clé', property = 'P793'},
				{type = 'row', label = 'Histoire', value = 'histoire', property = 'P2184'},
				building.owner(),
				{type = 'row', label = 'Statut patrimonial', value = 'statut patrimonial', property = 'P1435'},
				{type = 'row', label = 'Distinction', plurallabel = 'Distinctions', value = 'distinction', property = 'P166'},
				}
			},
			building.geoloc({pointtype = 'lac', maptype = 'relief'}),
	}
}