Module:Infobox/Catch (spectacle)/Bac à sable
Apparence
[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 Catch (spectacle)/Bac à sable.
La documentation de ce module est générée par le modèle {{Documentation module}}.
Elle est incluse depuis la page Modèle:Documentation module d'infobox. Veuillez placer les catégories sur cette page-là.
Les éditeurs peuvent travailler dans le bac à sable (modifier).
Voir les statistiques d'appel depuis le wikicode sur l'outil wstat et les appels depuis d'autres modules.
local general = require 'Module:Infobox/Fonctions'
local localdata = require 'Module:Infobox/Localdata'
local wikidata = require 'Module:Wikidata'
local function attendance()
local function value()
if localdata['spectateurs'] then
return localdata['spectateurs'] .. ' personnes'
end
end
local wd = {
property = 'P1110',
displayformat =
function(snak)
return wikidata.formatSnak(snak) .. ' personnes'
end
}
return {type = 'row', label = 'Spectateurs', value = value(), wikidata = wd}
end
local function city()
local function wd()
local city = wikidata.formatAndCat{entity = localdata.item, property = 'P131', showqualifiers = 'P131', conjtype = 'new line'}
if city then
city = city .. (wikidata.formatAndCat{entity = localdata.item, property = 'P17', displayformat =
function(snak)
local country, success = require 'Module:Country data'.standarddisplay(wikidata.getId(snak))
if success then
return '<br>' .. country
end
end
} or '')
end
return city
end
return {type = 'row', label = 'Ville(s)', singularlabel = 'Ville', plurallabel = 'Villes', value = 'ville', wikidata = wd()}
end
local function eventSeries()
local value = localdata['évènement'] or wikidata.formatAndCat{entity = localdata.item, property = 'P179'}
if value then
return 'Chronologie des ' .. value
end
end
return {
maincolor = '#eaf3ff',
parts = {
general.title('catch'),
{type = 'images', imageparameters = 'image', captionparameter = {'légende', 'légende_image'}, sizeparameter = 'taille image'},
{type = 'table', rows = {
{type = 'row', label = '[[Liste des termes de catch#M|Main event]]', value = 'main_event'},
{type = 'row', label = '[[Slogan]]', value = 'slogan', property = 'P1451'},
{type = 'row', label = '[[Indicatif musical|Thème musical]]', value = 'thème_musical'},
}},
{type = 'table', title = 'Informations', rows = {
{type = 'row', label = 'Fédération(s)', singularlabel = 'Fédération', plurallabel = 'Fédérations', value = 'fédération', wikidata = {property = 'P664', conjtype = 'new line'}},
{type = 'row', label = 'Division(s)', singularlabel = 'Division', plurallabel = 'Divisions', value = 'division', wikidata = {property = 'P199', conjtype = 'new line'}},
{type = 'row', label = '[[Sponsor|Sponsor(s)]]', singularlabel = '[[Sponsor]]', plurallabel = '[[Sponsor|Sponsors]]', value = 'sponsor', wikidata = {property = 'P859', conjtype = 'new line'}},
{type = 'row', label = 'Date', value = 'date', property = 'P585'},
{type = 'row', label = 'Date de début', value = 'date début', property = 'P580'},
{type = 'row', label = 'Date de fin', value = 'date fin', property = 'P582'},
attendance(),
{type = 'row', label = 'Lieu(x)', singularlabel = 'Lieu', plurallabel = 'Lieux', value = 'lieu', wikidata = {property = 'P276', conjtype = 'new line'}},
city();
}},
{type = 'table', title = 'Chronologie des événements', rows = {
{type = 'navigator',
previousval = 'ppv_précédent1',
previouswikidata = {property = 'P155', novaluelabel = 'Premier'},
nextval = 'ppv_suivant1',
nextwikidata = {property = 'P156', novaluelabel = 'Dernier', unknownlabel = 'À confirmer'},
inner = true
}
}},
{type = 'navigator',
previousval = 'ppv_précédent1bis',
nextval = 'ppv_suivant1bis',
},
{type = 'table', title = eventSeries(), rows = {
{type = 'navigator',
previousval = 'ppv_précédent2',
previouswikidata = {property = 'P179', showonlyqualifier = 'P155', novaluelabel = 'Premier'},
nextval = 'ppv_suivant2',
nextwikidata = {property = 'P179', showonlyqualifier = 'P156', novaluelabel = 'Dernier', unknownlabel = 'À confirmer'},
inner = true
}
}},
}
}