Module:Infobox/Cours d'eau

 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 Cours d'eau.


local general = require "Module:Infobox/Fonctions"
local geoloc = require 'Module:Infobox/Fonctions/Géolocalisation'

return {
	maincolor = '#80B0E0',
	parts = {
		{
			type = 'title',  -- n'utilise pas general.title à cause des paramètre "nom2" et "code langue", à harmoniser
			icon = 'map',
			value = 'nom',
			subtitle = function ( localdata )
				if localdata['autres noms'] then
					return  '<i>' .. localdata['autres noms'] .. '</i>'
				end
			end,
		},
		general.mainimage('Article à illustrer Cours d\'eau'),
		{type = 'table', title = 'Caractéristiques', rows = {
			{type = 'mixed', label = 'Longueur', value = 'longueur', property = 'P2043'},
			{type = 'mixed', label = '[[Bassin versant|Bassin]]', value = 'bassin', property = 'P2053'},
			{type = 'row', label = '[[Bassin versant|Bassin collecteur]]', value = 'bassin collecteur'},--, property = ''},
			{type = 'row', label = '[[Module (hydrologie)|Débit moyen]]', value = 'débit'},--, property = ''},
			{type = 'row', label = '[[Nombre de Strahler]]', value = 'nombre de Strahler'},--, property = ''},
			{type = 'row', label = 'Organisme gestionnaire', value = 'organisme gestionnaire'},--, property = ''},
			{type = 'row', label = '[[Régime hydrologique|Régime]]', value = 'régime'},--, property = ''},
			}
		},
	    {type = 'table', title = 'Cours', rows = {
			{type = 'row', label = '[[Source (hydrologie)|Source]]', value = 'source', property = 'P885'},
			{type = 'row', label = ' · Localisation', value = 'source localisation'},--, property = ''},
			{type = 'row', label = ' · Altitude', value = 'source altitude'},--, property = ''},
--				{type = 'row', label = ' · Coordonnées', value = 'source latitude'},--, property = ''},

			{type = 'row', label = '[[Source (hydrologie)|Source]] principale', value = 'source principale'},--, property = ''},
			{type = 'row', label = ' · Localisation', value = 'source principale localisation'},--, property = ''},
			{type = 'row', label = ' · Altitude', value = 'source principale altitude'},--, property = ''},
--				{type = 'row', label = ' · Coordonnées', value = 'source principale latitude'},--, property = ''},

			{type = 'row', label = '[[Source (hydrologie)|Source]] secondaire', value = 'source secondaire'},--, property = ''},
			{type = 'row', label = ' · Localisation', value = 'source secondaire localisation'},--, property = ''},
			{type = 'row', label = ' · Altitude', value = 'source secondaire altitude'},--, property = ''},
--				{type = 'row', label = ' · Coordonnées', value = 'source secondaire latitude'},--, property = ''},

			{type = 'row', label = '[[Confluent|Confluence]] des [[Source (hydrologie)|sources]]', value = 'source confluence'},--, property = ''},
			{type = 'row', label = ' · Localisation', value = 'source confluence localisation'},--, property = ''},
			{type = 'row', label = '{{espace}}{{nobr|· Altitude}}', value = 'source confluence altitude'},--, property = ''},
--				{type = 'row', label = ' · Coordonnées', value = 'source confluence latitude'},--, property = ''},

			{type = 'row', label = 'Origine', value = 'origine'},--, property = ''},
			{type = 'row', label = ' · Localisation', value = 'origine localisation'},--, property = ''},
			{type = 'row', label = ' · Altitude', value = 'origine altitude'},--, property = ''},
--				{type = 'row', label = ' · Coordonnées', value = 'origine latitude'},--, property = ''},

			{type = 'row', label = '[[Embouchure (hydrologie)|Embouchure]]', value = 'embouchure'},--, property = ''},
			{type = 'row', label = ' · Localisation', value = 'embouchure localisation'},--, property = ''},
			{type = 'row', label = ' · Altitude', value = 'embouchure altitude'},--, property = ''},
--				{type = 'row', label = ' · Coordonnées', value = 'embouchure latitude'},--, property = ''},

			{type = 'row', label = '[[Confluent|Confluence]]', value = 'confluence'},--, property = ''},
			{type = 'row', label = ' · Localisation', value = 'confluence localisation'},--, property = ''},
			{type = 'row', label = ' · Altitude', value = 'confluence altitude'},--, property = ''},
--				{type = 'row', label = ' · Coordonnées', value = 'confluence latitude'},--, property = ''},

			{type = 'row', label = '[[Perte (hydrologie)|Perte]]', value = 'perte'},--, property = ''},
			{type = 'row', label = ' · Localisation', value = 'perte localisation'},--, property = ''},
			{type = 'row', label = ' · Altitude', value = 'perte altitude'},--, property = ''},
--				{type = 'row', label = ' · Coordonnées', value = 'perte latitude'},--, property = ''},

			{type = 'row', label = '[[Exsurgence|Résurgence]]', value = 'résurgence'},--, property = ''},
			{type = 'row', label = ' · Localisation', value = 'résurgence localisation'},--, property = ''},
			{type = 'row', label = ' · Altitude', value = 'résurgence altitude'},--, property = ''},
--				{type = 'row', label = ' · Coordonnées', value = 'résurgence latitude'},--, property = ''},

			{type = 'row', label = 'Se jette dans', value = 'se jette dans', property = 'P403'},
            }
		},
		{type = 'table', title = 'Géographie', rows = {
			{type = 'table', title = '\'\'\'Principaux affluents\'\'\'', rows = {
				{type = 'row', label = ' · Rive gauche', value = 'affluents rive gauche'},--, property = ''},
				{type = 'row', label = ' · Rive droite', value = 'affluents rive droite'},--, property = ''},
				}
			},
			{type = 'row', label = 'Pays traversés', value = 'pays', property = 'P17'},
			{type = 'row', label = '{{{lien subdivision1|Subdivision 1}}}', value = 'subdivision1'},--, property = ''},
			{type = 'row', label = '{{{lien subdivision2|Subdivision 2}}}', value = 'subdivision2'},--, property = ''},
			{type = 'row', label = '{{{lien subdivision3|Subdivision 3}}}', value = 'subdivision3'},--, property = ''},
			{type = 'row', label = 'Régions traversés', value = 'régions'},--, property = ''},
			{type = 'row', label = 'Principales localités', value = 'villes'},--, property = ''},
			}
		},
		{type = 'table', title = 'Sources', rows = {
			{type = 'images', value = 'sources'},
			}
		},
	}
}


-- WORK IN PROGRESS
-- TODO
-- trouver des prpopriétés pour la plutpart des champs
-- coordonnées sources, ...
-- nom subdivision
--
-- Si quelqu'un passe par là et a un conseil, je suis preneur ! ([[Discussion utilisateur:AGhostDog]])