Module:Infobox/Variété de houblon

 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 Variété de houblon.


local general   = require 'Module:Infobox/Fonctions'
local localdata = require 'Module:Infobox/Localdata'
local wikidata  = require 'Module:Wikidata'

local p =
{
	maincolor = '#FECD2B',
	parts =
	{
		general.title(),
		{
			type = 'table',
			title = "Provenance",
			rows =
			{
				{type = 'row', label = "Pays",  value = "pays d'origine",  property = 'P495'},
				{type = 'row', label = "Année", value = "année d'origine", property = 'P571'},
			},
		},
		{
			type = 'table',
			title = "Protection",
			rows =
			{
				{type = 'row', label = "Créateur", value = "créateur", property = 'P178'},
				{type = 'row', label = "Nom protégé", value = function (item)
						if localdata["protection"] then
							return localdata["protection"]
						else -- non capitalisation de "oui" et "non", car cela ne fait pas sens
							if wikidata.isInstance('Q1632297', item.id, 0) then
								return "oui"
							else
								return "non"
							end
						end
					end},
			},
		},
		{
			type = 'table',
			title = "Caractéristiques",
			rows =
			{
				{type = 'row', label = "Usage", value = "usage"},
				{type = 'row', label = "Arôme", value = "arôme"},
			},
		},
	},
}

return p