Module:Infobox/Parlement/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 Parlement/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 location = require "Module:Infobox/Fonctions/Géolocalisation"
local general = require "Module:Infobox/Fonctions"
local person = require "Module:Infobox/Fonctions/Personne"
local datec = require "Module:Date complexe"
local date = require "Module:Date"
local convert = require "Module:Conversion"
local wikidata = require "Module:Wikidata"
local localdata = require "Module:Infobox/Localdata"
local p = {}
local maincolor, secondcolor, thirdcolor = '#DFEDFF', '#DFEDFF', '#000000'
local displayformats = {
A = format1,
B = format2,
C = format3,
}
local function format3(event, period, predecessor, successor, displayformat, details)
local mainrow = {type = 'row1col', color = 'DFEDFF', value = event }
local periodrow = {type = 'row1col', color = '#DFEDFF', value = period }
local successionrow = {
style = {['background-color'] = '#DFEDFF', ['padding-bottom'] = '2%'},
type = 'navbox',
inner = true,
previousval = function() return predecessor end,
nextval = function() return successor end,
}
return {type = 'multi', rows = {mainrow, periodrow, successionrow}}
end
function p.gouv()
local localparam = "type gvt"
local displayformat = "C"
return timeline(localparam, displayformat)
end
function p.liste()
local localparam = "nomliste"
local displayformat = "C"
return timeline(localparam, wdconf, displayformat, title, singtitle)
end
return
{
maincolor = 'defaut',
parts =
{
general.title(),
general.blason(),
general.flag(upright),
{type = 'table',
rows = {
{type = 'row', label = 'Date de début', value = 'start', property = 'P571'},
{type = 'row', label = 'Date de fin', value = 'endpoint', property = 'P576'},
{ type = 'row', label = 'Durée', value = datec.duration(start, ending)},
} -- Paragraphe à revoir entièrement pour afficher : "Date de début" ; "Date de fin" et "Durée" automatique
},
{type = 'table', title='Informations générales',
rows = {
{type = 'row', label = 'Type', value = 'type', property = 'P31'},
{type = 'row', label = function ( localdata )
if localdata['type texte'] then
return localdata['type texte'] else return 'Texte Fondamental'
end
end, value = 'texte fondamental', property = 'P457'},
{type = 'row', label = 'Lieu', value = 'lieu', property = 'P159'},
{type = 'row', label = function ( localdata )
if localdata['type régime'] then
return localdata['type régime'] else return 'Régime'
end
end, value = 'régime', property = 'P122'},
{type = 'row', label = function ( localdata )
if localdata['type chef état'] then
return localdata['type chef état']
end
end, value = "chef de l'état", property = 'P6'},
}
},
{type = 'table', title = 'Composition de la Chambre',
rows = {
{type = 'row', label = 'Cause', value = 'cause'},
{type = 'row', label = 'Président de la Chambre des Députés', value = 'pdéputés'},
{type = 'row', label = 'Nombre de députés', value = 'ndéputés'},
{type = 'row', label = function ( localdata )
if localdata['type lég'] then
return localdata['type mode'] else
return "Mode d'élection"
end
end, value = 'mode élection'},
{type = 'row', label = function ( localdata )
if localdata['type lég'] then
return localdata['type lég'] else
return "Nombre de législatures"
end
end, value = 'nlégislatures'},
general.mainimage(),
}
},
{type = 'table', title = 'Autre Chambre',
rows = {
{type = 'row', label = function ( localdata )
if localdata['type autre chambre'] then
return localdata['type autre chambre'] else
return "Autre Chambre"
end
end, value = 'chambre haute'},
}
},
{type = 'table', title = 'Gouvernement',
rows = {
{type = 'row', label = function ( localdata )
if localdata['type gvt'] then
return localdata['type gvt'] else
return "Liste :"
end
end, value = 'liste gvt'},
}
},
{type = 'table', title = 'Blabla',
rows = {
{type = 'row', label = function ( localdata )
if localdata['date1'] then
return date.modeleDate(localdata['date1']) else
return "Date à préciser"
end
end, value = 'evt1'},
{type = 'row', label = function ( localdata )
if localdata['date2'] then
return date.modeleDate(localdata['date2']) else
return "Date à préciser"
end
end, value = 'evt2'},
{type = 'row', label = function ( localdata )
if localdata['date3'] then
return date.modeleDate(localdata['date3']) else
return "Date à préciser"
end
end, value = 'evt3'},
{type = 'row', label = function ( localdata )
if localdata['date4'] then
return date.modeleDate(localdata['date4']) else
return "Date à préciser"
end
end, value = 'evt4'},
{type = 'row', label = function ( localdata )
if localdata['date5'] then
return date.modeleDate(localdata['date5']) else
return "Date à préciser"
end
end, value = 'evt5'},
{type = 'row', label = function ( localdata )
if localdata['date5'] then
return date.modeleDate(localdata['date5']) else
return "Date à préciser"
end
end, value = 'evt5'},
{type = 'row', label = function ( localdata )
if localdata['date6'] then
return date.modeleDate(localdata['date6']) else
return "Date à préciser"
end
end, value = 'evt6'},
{type = 'row', label = function ( localdata )
if localdata['date7'] then
return date.modeleDate(localdata['date7']) else
return "Date à préciser"
end
end, value = 'evt7'},
{type = 'row', label = function ( localdata )
if localdata['date8'] then
return date.modeleDate(localdata['date8']) else
return "Date à préciser"
end
end, value = 'evt8'},
{type = 'row', label = function ( localdata )
if localdata['date9'] then
return date.modeleDate(localdata['date9']) else
return "Date à préciser"
end
end, value = 'evt9'},
{type = 'row', label = function ( localdata )
if localdata['date10'] then
return date.modeleDate(localdata['date10']) else
return "Date à préciser"
end
end, value = 'evt10'},
{type = 'row', label = function ( localdata )
if localdata['date11'] then
return date.modeleDate(localdata['date11']) else
return "Date à préciser"
end
end, value = 'evt11'},
{type = 'row', label = function ( localdata )
if localdata['date12'] then
return date.modeleDate(localdata['date12']) else
return "Date à préciser"
end
end, value = 'evt12'},
{type = 'row', label = function ( localdata )
if localdata['date13'] then
return date.modeleDate(localdata['date13']) else
return "Date à préciser"
end
end, value = 'evt13'},
{type = 'row', label = function ( localdata )
if localdata['date14'] then
return date.modeleDate(localdata['date14']) else
return "Date à préciser"
end
end, value = 'evt14'},
{type = 'row', label = function ( localdata )
if localdata['date15'] then
return date.modeleDate(localdata['date15']) else
return "Date à préciser"
end
end, value = 'evt15'},
{type = 'row', label = function ( localdata )
if localdata['date16'] then
return date.modeleDate(localdata['date16']) else
return "Date à préciser"
end
end, value = 'evt16'},
{type = 'row', label = function ( localdata )
if localdata['date17'] then
return date.modeleDate(localdata['date17']) else
return "Date à préciser"
end
end, value = 'evt17'},
{type = 'row', label = function ( localdata )
if localdata['date18'] then
return date.modeleDate(localdata['date18']) else
return "Date à préciser"
end
end, value = 'evt18'},
{type = 'row', label = function ( localdata )
if localdata['date19'] then
return date.modeleDate(localdata['date19']) else
return "Date à préciser"
end
end, value = 'evt19'},
{type = 'row', label = function ( localdata )
if localdata['date20'] then
return date.modeleDate(localdata['date20']) else
return "Date à préciser"
end
end, value = 'evt20'},
}
},
p.liste(),
}
}