Aller au contenu

Module:Infobox/Etablissement enseignement recherche

Une page de Wikipédia, l'encyclopédie libre.
Ceci est une version archivée de cette page, en date du 17 janvier 2018 à 21:01 et modifiée en dernier par Tiraden (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 Université.


local wikidata  = require "Module:Wikidata"
local generic   = require "Module:Infobox/Fonctions"
local geo       = require "Module:Infobox/Fonctions/Géolocalisation"
local localdata = require "Module:Infobox/Localdata"
	
return 
{
maincolor = '#B4464B',
thirdcolor = 'white',
parts = {
	generic.title("entete universite"),
	{
	type = 'images',
	imageparameters =  'image',   -- l'image est définie ici par le paramètre "image",
	captionparameter = 'légende', -- la légende est définie par le paramètre "légende",
	defaultimage = 'foo.jpg',     -- quand il n'y a pas d'image, monter "foo.jpg",
	defaultcaption = 'image du sujet',
	wikidata = function ( localdata )  -- Wikidata uniquement pour les images, pas la légende
		return wikidata.formatStatements{ entity = localdata.item, property = 'p18', returntype = 'table' }
	end,
	numval = 1,                   -- 1 image au maximum (utile essentiellement pour les requêtes Wikidata)
	},
	{type = 'table', title = 'Histoire et statut', rows = {
		{type = 'row', label = 'Fondation', value = 'fondation', property = 'P571'},
		{type = 'row', label = 'Dates-clés', value = 'dates-clés'},  		
		{type = 'row', label = 'Dissolution', value = 'dissolution', property = 'P576'},
		{type = 'row', label = 'Type', value = 'type', wikidata = { property = 'P31', numval = 1 },},
		{type = 'row', label = 'Forme juridique', value = 'forme juridique', property = 'P1454'},
		{type = 'mixed', label = 'Disciplines', value = 'disciplines'},
		{type = 'mixed', label = 'Nom officiel', value = 'nom_original', property = 'P1448'},
		{type = 'mixed', label = 'Régime linguistique', value = 'langue', property = 'P2936'},
		{type = 'row', label = function() return localdata['intitulé fondateur'] or 'Fondateur' end, value = 'fondateur', property = 'P112'},
		{type = 'mixed', label = 'Président', value = 'président', wikidata = { property = 'P488', showdate = true, precision = 'year', numval = 1 },},
		{type = 'mixed', label = 'Recteur', value = 'recteur', wikidata = { property = 'P1075', showdate = true, precision = 'year', numval = 1 },},		
		{type = 'mixed', label = 'Directeur', value = 'directeur', wikidata = { property = 'P1037', showdate = true, precision = 'year', numval = 1 },},		
		{type = 'row', label = function() return localdata['intitulé dirigeant1'] or 'Dirigeant1' end, value = 'dirigeant1'},
		{type = 'row', label = function() return localdata['intitulé dirigeant2'] or 'Dirigeant2' end, value = 'dirigeant2'},  },  },
	{type = 'table', title = 'Localisation', rows = {
		{type = 'row', label = 'Campus', value = 'campus'},
		{type = 'mixed', label = 'Localisation', value = 'localisation', property = 'P131'},
		{type = 'mixed', label = 'Pays' , value = 'pays', property = 'P17'}, }, },
	geo.geoloc(), 
	{type = 'table', title = 'Chiffres-clés', rows = {
		{type = 'row', label = function() return localdata['intitulé étudiants'] or 'Etudiants' end, value = 'étudiants',  wikidata = { property = 'P2196', showdate = true, precision = 'year', numval = 1 }},
		{type = 'mixed', label = 'Effectif', wikidata = { property = 'P1128', showunit =  'long', showdate = true, precision = 'year', numval = 5 },},
		{type = 'row', label = function() return localdata['intitulé enseignants'] or 'Enseignants' end, value = 'enseignants'},
		{type = 'row', label = function() return localdata['intitulé enseignants-chercheurs'] or 'Enseignants-chercheurs' end, value = 'enseignants-chercheurs'},
		{type = 'row', label = function() return localdata['intitulé chercheurs'] or 'Chercheurs' end, value = 'chercheurs'}, 
		{type = 'mixed', label = 'Budget', value = 'budget', wikidata = { property = 'P2769', showdate = true, precision = 'year', numval = 1 }, }, }, },
	{ type = 'table', title = 'Divers', rows = 	{
		{type = 'mixed', label = 'Devise', value = 'devise', property = 'P1451'}, 
		{type = 'mixed', label = 'Membre de', value = 'affiliation',  wikidata = { property = 'P463', numval = 3 },},
		{type = 'mixed', label = 'Site web', value = 'web', property = 'P856'}, }, }, }, }