Module:Infobox/Gratte-ciel
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 Gratte-ciel.
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 (créer).
Voir les statistiques d'appel depuis le wikicode sur l'outil wstat et les appels depuis d'autres modules.
local building = require "Module:Infobox/Fonctions/Bâtiment"
local general = require "Module:Infobox/Fonctions"
local wikidata = require "Module:Wikidata"
local function keydate(event, item)
return wikidata.getTheDate{property = 'P793', targetvalue = event, addcat = true, item = item}
end
return
{
maincolor = '#E6E3CF',
parts =
{
general.title(),
general.logo(),
building.mainimage(),
{type = 'table', title = 'Histoire', rows = {
{type = 'mixed', label = 'Ancien(s) nom(s)', value = 'anciens noms'},
building.creator(),
{type = 'mixed', label = 'Développeur', value = 'développeur'},
{type = 'mixed', label = 'Conception', value = 'conception'},
building.complex(),
building.construction(),
building.opening(),
{type = 'mixed', label = 'Coût', value = 'coût'},
{type = 'mixed', label = 'Rénovation', value = 'rénovation', wikidata = function() return keydate('Q2144402', item) end},
{type = 'mixed', label = 'Restructuration', value = 'restructuration', }, -- 'Q1376796'?
{type = 'mixed', label = 'Fermeture', value = 'fermeture', wikidata = function() return keydate('Q14954904', item) end},
building.demolition(),
{type = 'mixed', label = 'Statut', value = 'statut'}, --= en construction / construit
building.usage(),
}
},
{type = 'table', title = 'Architecture', rows = {
{type = 'mixed', label = 'Type', value = 'type'}, --property = 'P31'},
building.archistyle(),
building.material(),
building.protection(),
{type = 'mixed', label = 'Hauteur de lʼantenne' , value = 'antenne flèche'},
{type = 'mixed', label = 'Hauteur du toit', value = 'toit'},
{type = 'mixed', label = 'Hauteur du dernier étage', value = 'dernier étage' },
{type = 'mixed', label = 'Étages', value = 'étages', wikidata =
{
property = 'P1101',
showqualifiers = {'P518'}, --= partie concernée
qualifdisplayformat = function(snak) return wikidata.formatSnak(snak) end, --pour éviter d'être formaté comme le mainsnak
displayformat =
function(snak)
if (snak.snaktype == 'value') then
local v = snak.datavalue.value.amount - 1 -- on ne compte pas le rez-de-chaussée
if v == 0 then
return 'aucun'
else
return tostring(v)
end
end
return wikidata.formatSnak(snak)
end
}
},
{type = 'mixed', label = 'Sous-sols', value = 'sous-sol', property = 'P1139'},
{type = 'mixed', label = 'Chambres/Appartements', value = 'chambres'},
{type = 'mixed', label = 'Superficie', value = 'superficie'},
{type = 'mixed', label = 'Volume', value = 'volume'},
{type = 'mixed', label = 'Nombre dʼascenseurs', value = 'ascenseurs', property = 'P1301'},
}
},
{type = 'table', title = 'Administration', rows = {
{type = 'mixed', label = 'Contracteur' , value = 'contracteur'},
{type = 'mixed', label = 'Occupant', value = 'occupant', property = 'P466' },
{type = 'mixed', label = 'Propriétaire', value = 'propriétaire', property = 'P127'},
building.website()
}
},
{type = 'table', title = 'Géographie', rows = {
building.country(),
building.historicalregion(),
building.adminlocation(),
building.coordinates(),
}
},
building.geoloc(),
}
}