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 Chanson.


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 = "F4DCB6",
	secondcolor = "F4DCB6",
	parts =
    	{
			general.title("musique", nil, nil, nil, true),
			general.mainimage{ 
				cat = "Article à illustrer Musique",
				wikidata = {property = {"P3383", "P2716", "P18", "P10"}, numval = 1}
				},
		{type = "table", title = "Informations générales", rows = {
			{type = "row", label = "Forme", value = "forme", plurallabel = "Formes", wikidata = {property = {"P31" , "P7937"} , conjtype = "new line" , excludevalues = {"Q7366" ,"Q105543609"}}},
			{type = "row", label = "Tonalité", value = "tonalité", plurallabel = "tonalités", property ='P826'},
			{type = "row", label = "Auteur", value = "auteur", plurallabel = "auteurs", property ='P50'},
			{type = "row", label = "Compositeur", value = "compositeur", plurallabel = "Compositeurs", property ='P86'},
			{type = "row", label = "Parolier", value = "parolier", plurallabel = "Paroliers", property ='P676'},
			{type = "row", label = "Interprète", value = "interprète", plurallabel = "Interprètes", property ='P175'},
			{type = "row", label = "Pays", value = "pays d\'origine" , property = 'P495'},
			{type = "row", label = "Date de création", value = "date de création", plurallabel = "Dates de création" , wikidata = {property = 'P571' , conjtype = 'new line' , sorttype = 'chronological' , showqualifiers = 'P291,P276' }},
			{type = "row", label = "Date de sortie", value = "date de sortie", plurallabel = "Dates de sortie" , wikidata = {property = 'P577' , conjtype = 'new line' , sorttype = 'chronological' , showqualifiers = 'P291,P276' }},
			{type = "row", label = "Album", value = "album", plurallabel = "Albums", wikidata = function ( item )
					return italics({entity = item, property = 'P361,P1433', conjtype = 'new line'}) -- trouver un moyen pour que le plurallabel s'affiche
			end},
			{type = "row", label = "Genre", value = "genre", plurallabel = "Genres", property = 'P136'},
			{type = "row", label = "Basé sur", value = "basé sur", wikidata= function ( item )
					return italics({entity = item, property = 'P144' , conjtype = 'new line' , showlang = true})
			end},
			{type = "row", label = "Inspiré de", value = "inspiré de", wikidata= function ( item )
					return italics({entity = item, property = 'P941' , conjtype = 'new line' , showlang = true})
				end},
			{type = "row", label = "Sujet", value = "sujet", plurallabel = "Sujets" , wikidata = {property = 'P921'}},
			{type = "row", label = "Durée", value = "durée", plurallabel = "Durées" , wikidata = {property = 'P2047' , showunit = 'long' }},
			{type = "row", label = "[[Label discographique|Label]]", value = "label", plurallabel = "[[Label discographique|Labels]]" , property = 'P264'},
			{type = "row", label = "Producteur", value = "producteur" , plurallabel = "Producteurs", property = 'P162'},
	    	{type = "row", label = "Précédé par", value = "précédé par", wikidata = function ( item )
					return italics({entity = item, property = 'P155'})
				end},
			{type = "row", label = "Suivi par", value = "suivi par", wikidata = function ( item )
					return italics({entity = item, property = 'P156'})
				end},
			{type = "row", label = "Œuvre  dérivée", value = "oeuvre", plurallabel = "Œuvres dérivées" , wikidata = function ( item )
					return italics({entity = item, property = 'P4969' , showlang = true})
			end},
		},
	}
}
}