Aller au contenu

Module:Infobox/Musique classique (ensemble)2

Une page de Wikipédia, l'encyclopédie libre.
Ceci est une version archivée de cette page, en date du 19 juillet 2018 à 17:25 et modifiée en dernier par AvatarFR (discuter | contributions) (Création). 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.


local localdata = require 'Module:Infobox/Localdata'
local general = require "Module:Infobox/Fonctions"
local person = require "Module:Infobox/Fonctions/Personne"
local wikidata = require "Module:Wikidata"
local linguistic = require "Module:Linguistique"
local convert = require "Module:Conversion"

local function italics(query)
	local val = wikidata.formatAndCat(query)
	if val then
		return '<i>' .. val .. '</i>'
	end
end

return 
	{
	maincolor = "09C8BD",
	secondcolor = "5CF8F0",
	parts =
    	{
			general.title( "entete musique classique"), --trouver le moyen de mettre en italique
			general.mainimage{ 
				cat = "Article à illustrer Arts et culture",
				defaultimage = "Defaut 2.svg", 
				wikidata = {property = {"P3383", "P2716", "P18", "P10"}, numval = 1}
				},
		{type = "table", title = "Informations générales", rows = {
	--		{type = "row", label = "Titre original", value = "titre original", plurallabel = "Titres originaux" , wikidata = function ( item )
	--				return italics({entity = item, property = 'P1476', conjtype = 'new line' , showlang = true })--trouver un moyen de retirer lorsque le titre original est en français
	--			end
	--		},
			{type = "row", label = "Pays de résidence", value = "pays_residence", plurallabel = "Pays de résidence" , property = 'P495'},
			{type = "row", label = "Ville de résidence", value = "ville_résidence", plurallabel = "Villes de résidence" , wikidata = {property = 'P131' , showunit = 'long' }},
			{type = "row", label = "Lieux activité", value = "lieux_activité" , plurallabel = "Lieux activité", property = 'P276'},
			{type = "row", label = "Année de fondation", value = "annee_fondation" , plurallabel = "Années de fondation", property = 'P571'},
			{type = "row", label = "Année de dissoulution", value = "annee_dissoulution" , plurallabel = "Années de dissoulution", property = 'P576'},
			{type = "row", label = "Type formation", value = "type_formation" , plurallabel = "Types formation", property = 'P31'},
			{type = "row", label = "Genre", value = "genre" , plurallabel = "Genres", property = 'P136'},
			{type = "row", label = "Direction", value = "direction" , plurallabel = "Direction", property = 'P3300'},
			{type = "row", label = "Fondateur", value = "fondateur" , plurallabel = "Fondateurs", property = 'P112'},
			{type = "row", label = "Statut", value = "statut" , plurallabel = "statuts", property = 'P3716'},
			{type = "row", label = "Effectif", value = "effectif" , plurallabel = "Effectifs", property = 'P2124'},
			{type = "row", label = "Collaboration", value = "collaboration" , plurallabel = "Collaborations", property = 'P1327'},
			{type = "row", label = "Éditeur", value = "Éditeur" , plurallabel = "Éditeurs", property = 'P'},
			{type = "row", label = "Maitre", value = "maitre" , plurallabel = "Maitres", property = 'P'},
			{type = "row", label = "Élève", value = "Élève" , plurallabel = "Élèves", property = 'P802'},
			{type = "row", label = "Récompense", value = "Récompenses" , plurallabel = "Récompenses", property = 'P166'},
			{type = "row", label = "Web", value = "Web" , plurallabel = "Web", property = 'P856'},
			
			
			{type = "row", label = "Basé sur", value = "basé sur" , wikidata = function ( item )
					return italics({entity = item, property = 'P144'})
				end
			},
			{type = "row", label = "Sujet", value = "sujet" , plurallabel = 'Sujets', property = 'P921'},
			{type = "row", label = "Pays", value = "pays d\'origine" , property = 'P495'}, -- ça serait bien d'afficher le drapeau avant le pays. Peut-être en pouvant mettre en forme la propriété ainsi : {{propriété}}.
			{type = "row", label = "Tournage", value = "lieu de tournage" , property = 'P915'},
			--{type = "row", label = "Format", value = "format", plurallabel = "Formats" , property = 'P3803'}, plus détaillé que nécessaire pour l'infobox
			general.website
			}
		}
	}
}