Aller au contenu

Module:Infobox/Film

Une page de Wikipédia, l'encyclopédie libre.
Ceci est une version archivée de cette page, en date du 17 septembre 2017 à 04:13 et modifiée en dernier par Simon Villeneuve (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 Film.


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 cinema"), --trouver le moyen de mettre en italique
			general.mainimage{ 
				defaultimage = "Defaut 2.svg", 
				wikidata = {property = {"P2716", "P18"}, 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 = "Date de sortie", value = "date de sortie", plurallabel = "Dates de sortie" , wikidata = {property = 'P577' , conjtype = 'new line' , showqualifiers = 'P291' }},
			{type = "row", label = "Durée", value = "durée", plurallabel = "Durées" , wikidata = {property = 'P2047' , showunit = 'long' }},
			{type = "row", label = "Langue originale", value = "langue originale" , plurallabel = "Langues originales", property = 'P364'},
			{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'})
				end
			},
			{type = "row", label = "Sujet", value = "sujet" , plurallabel = 'Sujets', property = 'P921'},
			{type = "row", label = "Pays", value = "pays d\'origine" , property = 'P495'},
			general.website
			}
		},
		{type = "table", title = "Artisans", rows = {
			{type = "row", label = "Société de production", value = "production" , plurallabel = "Sociétés de production", property = 'P272'},
			{type = "row", label = "Réalisateur", value = "réalisateur" , plurallabel = "Réalisateurs", property = 'P57'},
			{type = "row", label = "Scénariste", value = "scénariste" , plurallabel = "Scénaristes", property = 'P58'},
			{type = "row", label = "Acteur principal", value = "acteurs principaux" , plurallabel = "Acteurs principaux", wikidata = {property = 'P161' , conjtype = 'new line' , numval = 5}},
			{type = "row", label = "Compositeur", value = "compositeur" , plurallabel = "Compositeurs", property = 'P86'},
			
		}
		},
		{type = "table", title = "Autres informations", rows = {
			person.awards(),
			}
		},
	}
}