Aller au contenu

Module:Infobox/Collection de livre-jeu

Une page de Wikipédia, l'encyclopédie libre.
Ceci est une version archivée de cette page, en date du 18 juillet 2018 à 11:09 et modifiée en dernier par PhiJai (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 Collection de livre-jeu.


local objet = require "Module:Infobox/Fonctions"
local wd = require "Module:Wikidata"

return {
	maincolor = "##BFD7FF",
	parts = {
		objet.title(),
		objet.mainimage("Article à illustrer Collection de livre-jeu", "Defaut 2.svg"),
		{type = "table", rows = {
			{type = "mixed", label = "Type", value = "type", property = "P2561"},
			},
		},
		{type = "table", title = "Caractéristiques", rows = {
			{type = "mixed", label = "Image", plurallabel = "Images", value = "image", property = "P18"},
			{type = "mixed", label = "Légende", value = "legende", property	= "P2096"},
			{type = "mixed", label = "Support de publication", plurallabel = "Support", value = "support", property = "P31"},
			{type = "mixed", label = "Langue originale", value = "langueVO", property	= "P364"},
			{type = "mixed", label = "Pays d'origine", value = "paysVO", property	= "P495"},
			{type = "mixed", label = "Titre en VO", value = "titreVO", property = "P1476"},
	 		{type = "mixed", label = "Traducteur", value = "traducteur", property = "P655"},
			{type = 'mixed', label = 'Séries composant la collection', value = 'serie', wikidata = {property = {'P527'}, conjtype = 'new line', showqualifiers = {'P1114'}}},
			{type = "mixed", label = "Nombre de titres", value = "nbtitres", property = "P2635"},
			{type = "mixed", label = "Directeur(s) de collection", value = "dirigeant",  wikidata = {property = "P1037", conjtype = 'new line', showdate = true}},
			{type = 'row', label = 'Date de parution', value = 'parution', wikidata = function ( item ) return wd.mainDate(item) end},
			{type = "mixed", label = "Éditeur(s)", value = "editeur", wikidata = {property = "P123", conjtype = 'new line', showdate = true}},
			{type = "mixed", label = "Genre littéraire", value = "genre", property = "P136"},
			{type = "mixed", label = "ISSN", value = "ISSN", property = "P236"},
			{type = "mixed", label = "Distinction(s) reçue(s)", value = "distinction", 
				wikidata = {
					property = 'P166', --P1813
					conjtype = 'new line',
					rank = 'valid',
					statementformat = function(statement)
						local operator = wd.formatSnak(statement.mainsnak)
						local annee = wd.getFormattedQualifiers(statement, 'P585') -- année de réception du prix
						local pour = wd.getFormattedQualifiers(statement, 'P1686') -- reçu pour
						local str = operator
						if annee and not pour then
							str = str .. " " .. tostring(annee) 
							end
						if pour and not annee then
							str = str .. " <small>(" .. pour  .. ")</small>"
							end
						if annee and pour then
							str = str .. " " .. tostring(annee) .. "  <small>(pour " .. pour .. ")</small>"
							end
						return "&bull; " .. str
						end,
				},
			},
			{type = "mixed", label = "Système de règles", value = "regles", property = "P4151"},
			{type = 'mixed', label = 'Auteurs', value = 'Auteurs', wikidata = {property = {'P50'}, conjtype = 'new line', showqualifiers = {'P3740'}}},
			{type = 'mixed', label = 'Illustrateur des couvertures', value = 'Illustrateur des couvertures', wikidata = {property = {'P736'}, conjtype = 'new line', showqualifiers = {'P3740'}}},
			{type = 'mixed', label = 'Illustrateurs intérieur', value = 'Illustrateurs intérieur', wikidata = {property = {'P110'}, conjtype = 'new line', showqualifiers = {'P3740'}}},
			{type = "mixed", label = "Fiche planete-ldvelh", value = "planete", property = "P2720"},
			},
		}
	}
}