Aller au contenu

Module:Infobox/Subdivision administrative

Une page de Wikipédia, l'encyclopédie libre.
Ceci est une version archivée de cette page, en date du 3 juin 2016 à 22:05 et modifiée en dernier par J. N. Squire (discuter | contributions) (Code en cours d'élaboration (statut: en travaux)). Elle peut contenir des erreurs, des inexactitudes ou des contenus vandalisés non présents dans la version actuelle.
(diff) ← Version précédente | Voir la version actuelle (diff) | Version suivante → (diff)

 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 Subdivision administrative.


local general = require "Module:Infobox/Fonctions"
local wd = require "Module:Interface Wikidata".fromLua
local linguistic = require "Module:Linguistique"

local function age()
	local s = wd.formatAndCat{entity = item, property = "P571", conjtype= "or"}
	if s then
		return "il y a " .. s
	end
end

return 
{
	maincolor = '#FFDEAD',
	parts = {
		general.title(),
		general.mainimage(), --rajouter upright
		{type = 'table', title = 'Symboles', rows = {
			{type = 'row', label = 'Blason', value = 'blason', property = 'P237'},
			{type = 'row', label = 'Type', plurallabel = 'Types',value = 'type', property = 'P31'},
			{type = 'row', label = 'Logo', value = 'logo'},
			}
},
		{type = 'table', title = 'Histoire', rows = {
			{type = 'row', label = 'Fondation', value = 'fondation', property = 'P571'},
			{type = 'row', label = 'Fondateur', value = 'fondateur', property = 'P112'},
			{type = 'row', label = 'Éponyme', value = 'éponyme', property = 'P138'},
			{type = 'row', label = 'Constitution', value = 'constitution'},
			}
},
		{type = 'table', title = 'Administration', rows = {
			{type = 'row', label = 'Type', plurallabel = 'Types',value = 'type', property = 'P31'},
			{type = 'row', label = 'Nature', value = 'nature'}, -- obsolète car maintenant inclu dans la propriété type
			{type = 'row', label = 'Activité', value = 'activité'},
			}
},
		{type = 'table', title = 'Démographie', rows = {
			{type = 'row', label = 'Gentilé', value = 'gentilé', property = 'P1549'},
			{type = 'row', label = 'Type', plurallabel = 'Types', value = 'type', property = 'P31'},
			{type = 'row', label = 'Population', value = 'population', property = 'P1082'},
			}
},
		{type = 'table', title = 'Géographie', rows = {
			{type = 'row', label = 'Nom international', value = 'nom international', property = 'P1448'}, -- nom donné par l'UAI
			{type = 'row', label = 'Astre', value = 'astre', property = 'P376'}, -- corps astronomique où se trouve le lieu dont il est question
			{type = 'row', label = 'Continent', value = 'continent', property = 'P30'}, -- dans le cas d'une planète de type terrestre uniquement
			{type = 'row', label = 'Région', value = 'région', property = 'P706'}, -- régions géographiques sans quadrangle
			general.coordinates(),
			{type = 'row', label = 'Altitude', value = 'altitude', property = 'P044'},
			{type = 'row', label = 'Superficie', value = 'surface', wikidata = {property = 'P2046', targetunit = 'square kilometer'}},
			}
				},
		{type = 'table', title = 'Identifiants', rows = {
			{type = 'row', label = 'Code postal', value = 'cp', property = 'P281'},
			{type = 'row', label = 'Site web', value = 'url', property = 'P856'},
			{type = 'row', label = 'INSEE', value = 'insee', property = 'P374'}
			}
		},
		general.geoloc(),
	}
}