« Module:Infobox/Monument » : différence entre les versions

De Lagny-sur-Marne Wiki
Aller à la navigation Aller à la recherche
0x010D (discussion | contributions)
mAucun résumé des modifications
0x010D (discussion | contributions)
ajoute de 4 paramètre de Modèle:Infobox Édifice religieux
Ligne 2 : Ligne 2 :
local general = require "Module:Infobox/Fonctions"
local general = require "Module:Infobox/Fonctions"
local wikidata = require "Module:Wikidata"
local wikidata = require "Module:Wikidata"
local function getDate(event)
return wikidata.getTheDate{property = 'P793', targetvalue = 'Q331483', addcat = true, entity = item}
end


return  
return  
Ligne 12 : Ligne 16 :
building.mainimage(),
building.mainimage(),
{type = 'table', title = 'Présentation', rows = {
{type = 'table', title = 'Présentation', rows = {
{type = 'mixed', label = 'Noms précédents', value = 'noms précédents'},
{type = 'row', label = 'Noms précédents', value = 'noms précédents'},
{type = 'mixed', label = 'Surnom(s)', value = 'surnom'},
{type = 'row', label = 'Surnom(s)', value = 'surnom'},
{type = 'mixed', label = 'Nom complet', value = 'nom complet'},
{type = 'row', label = 'Nom complet', value = 'nom complet'},
{type = 'mixed', label = 'Type', value = 'type'}, --property = 'P31'},
{type = 'row', label = 'Type', value = 'type'}, --property = 'P31'},
{type = 'row', label = 'Culte', value = 'culte'},
{type = 'row', label = 'Rattachement', value = 'rattachement'},
building.archistyle(),
building.archistyle(),
building.creator(),
building.creator(),
building.material(),
building.material(),
building.construction(),
building.construction(),
{type = 'mixed', label = 'Date de démolition', value = 'date de démolition',
{type = 'row', label = 'Autre campagnes de travaux', value = 'autres travaux'},
wikidata = function(item) return wikidata.getTheDate{property = 'P793', targetvalue = 'Q331483', addcat = true, entity = item} end
{type = 'row', label = 'Date de désacralisation', value = 'date de désacralisation',
wikidata = function(item) return getDate('Q19688839') end
},
},
{type = 'mixed', label = 'Commanditaire', value = 'commanditaire', property = 'P88'},
{type = 'row', label = 'Date de démolition', value = 'date de démolition',
{type = 'mixed', label = 'Hauteur', value = 'hauteur'},
wikidata = function(item) return getDate('Q331483') end
{type = 'mixed', label = 'Destination initiale', value = 'destination initiale'},
},
{type = 'mixed', label = 'Destination actuelle', value = 'destination actuelle'},
{type = 'row', label = 'Commanditaire', value = 'commanditaire', property = 'P88'},
{type = 'row', label = 'Hauteur', value = 'hauteur'},
{type = 'row', label = 'Destination initiale', value = 'destination initiale'},
{type = 'row', label = 'Destination actuelle', value = 'destination actuelle'},
building.owner(),
building.owner(),
building.operator(),
building.operator(),
Ligne 40 : Ligne 50 :
},
},
{type = 'table', title = 'Accès et transport', rows = {
{type = 'table', title = 'Accès et transport', rows = {
{type = 'mixed', label = 'Stationnement', value = 'stationnement'},
{type = 'row', label = 'Stationnement', value = 'stationnement'},
{type = 'mixed', label = 'Gare', value = 'gare'},
{type = 'row', label = 'Gare', value = 'gare'},
{type = 'mixed', label = 'Métro', value = 'métro'},
{type = 'row', label = 'Métro', value = 'métro'},
{type = 'mixed', label = 'Tramway', value = 'tramway'},
{type = 'row', label = 'Tramway', value = 'tramway'},
{type = 'mixed', label = 'Autobus', value = 'bus'},
{type = 'row', label = 'Autobus', value = 'bus'},
},
},
},
},

Version du 27 mars 2015 à 14:59

local building = require "Module:Infobox/Fonctions/Bâtiment" local general = require "Module:Infobox/Fonctions" local wikidata = require "Module:Wikidata"

local function getDate(event) return wikidata.getTheDate{property = 'P793', targetvalue = 'Q331483', addcat = true, entity = item} end

return { maincolor = '#E6E3CF', parts =

   	{

general.title(), general.logo(), building.mainimage(), {type = 'table', title = 'Présentation', rows = { {type = 'row', label = 'Noms précédents', value = 'noms précédents'}, {type = 'row', label = 'Surnom(s)', value = 'surnom'}, {type = 'row', label = 'Nom complet', value = 'nom complet'}, {type = 'row', label = 'Type', value = 'type'}, --property = 'P31'}, {type = 'row', label = 'Culte', value = 'culte'}, {type = 'row', label = 'Rattachement', value = 'rattachement'}, building.archistyle(), building.creator(), building.material(), building.construction(), {type = 'row', label = 'Autre campagnes de travaux', value = 'autres travaux'}, {type = 'row', label = 'Date de désacralisation', value = 'date de désacralisation', wikidata = function(item) return getDate('Q19688839') end }, {type = 'row', label = 'Date de démolition', value = 'date de démolition', wikidata = function(item) return getDate('Q331483') end }, {type = 'row', label = 'Commanditaire', value = 'commanditaire', property = 'P88'}, {type = 'row', label = 'Hauteur', value = 'hauteur'}, {type = 'row', label = 'Destination initiale', value = 'destination initiale'}, {type = 'row', label = 'Destination actuelle', value = 'destination actuelle'}, building.owner(), building.operator(), building.protection(), building.website(), } }, {type = 'table', title = 'Géographie', rows = { building.country(), building.historicalregion(), building.adminlocation(), } }, {type = 'table', title = 'Accès et transport', rows = { {type = 'row', label = 'Stationnement', value = 'stationnement'}, {type = 'row', label = 'Gare', value = 'gare'}, {type = 'row', label = 'Métro', value = 'métro'}, {type = 'row', label = 'Tramway', value = 'tramway'}, {type = 'row', label = 'Autobus', value = 'bus'}, }, }, {type = 'table', title = 'Localisation', rows = { building.coordinates(), } }, building.geoloc(), } }