« Module:Infobox/Entreprise » : différence entre les versions
mAucun résumé des modifications |
Ajout du champ PDG |
||
(4 versions intermédiaires par le même utilisateur non affichées) | |||
Ligne 1 : | Ligne 1 : | ||
local localdata = require('Module:Infobox/Localdata') | |||
function buildSubject(localdata) | |||
local subject = 'Entreprise' | |||
if localdata['type'] then | |||
local types = { | |||
['pre'] = 'd\'avant-guerre', | |||
['avant-guerre'] = 'd\'avant-guerre', | |||
['post'] = 'd\'après-guerre', | |||
['après-guerre'] = 'd\'après-guerre', | |||
} | |||
local type = types[localdata['type']:lower()] | |||
if type then | |||
subject = subject .. ' ' .. type | |||
end | |||
end | |||
return subject | |||
end | |||
return { | return { | ||
parts = { | parts = { | ||
{ type = 'title', value = 'nom', subtitle = 'sous-titre', icon = 'icône', subhead = { subject = | { type = 'title', value = 'nom', subtitle = 'sous-titre', icon = 'icône', subhead = { subject = buildSubject(localdata), link = 'Entreprises' }}, | ||
{ type = 'images', imageparameters = { 'image', 'image2', 'image3', 'image4', 'image5' }, captionparameter = { 'légende', 'image desc' }}, | { type = 'images', imageparameters = { 'image', 'image2', 'image3', 'image4', 'image5' }, captionparameter = { 'légende', 'image desc' }}, | ||
{ type = 'table', separator = true, rows = { | { type = 'table', separator = true, rows = { | ||
Ligne 8 : | Ligne 30 : | ||
}}, | }}, | ||
{ type = 'table', title = 'Personnalité', rows = { | { type = 'table', title = 'Personnalité', rows = { | ||
{ type = 'row', label = 'PDG', value = 'pdg' }, | |||
{ type = 'row', label = 'Fondateur', value = 'fondateur' }, | { type = 'row', label = 'Fondateur', value = 'fondateur' }, | ||
{ type = 'row', label = 'Employés', value = 'employés' } | { type = 'row', label = 'Employés', value = 'employés' } | ||
Ligne 13 : | Ligne 36 : | ||
{ type = 'table', title = 'Localisation', rows = { | { type = 'table', title = 'Localisation', rows = { | ||
{ type = 'row', label = 'Pays', value = 'pays' }, | { type = 'row', label = 'Pays', value = 'pays' }, | ||
{ type = 'row', label = 'Siège social', value = 'siège social' } | { type = 'row', label = 'Siège social', value = { 'siège', 'siège social' }}, | ||
{ type = 'row', label = 'Propriétés', value = { 'propriétés', 'localisations' }} | |||
}}, | }}, | ||
{ type = 'table', title = 'Relation', rows = { | { type = 'table', title = 'Relation', rows = { | ||
{ type = 'row', label = 'Société mère', value = { 'société mère', ' | { type = 'row', label = 'Société mère', value = { 'société mère', 'parent' }}, | ||
{ type = 'row', label = 'Filiale', value = { 'filiale', 'divisions' }}, | { type = 'row', label = 'Filiale', value = { 'filiale', 'divisions' }}, | ||
{ type = 'row', label = 'Associé', value = { 'associé', 'relative' }} | { type = 'row', label = 'Associé', value = { 'associé', 'relative' }} |
Dernière version du 1 août 2022 à 12:07
Ce module contient le paramétrage de l'infobox {{Infobox compagnie}}.
local localdata = require('Module:Infobox/Localdata')
function buildSubject(localdata)
local subject = 'Entreprise'
if localdata['type'] then
local types = {
['pre'] = 'd\'avant-guerre',
['avant-guerre'] = 'd\'avant-guerre',
['post'] = 'd\'après-guerre',
['après-guerre'] = 'd\'après-guerre',
}
local type = types[localdata['type']:lower()]
if type then
subject = subject .. ' ' .. type
end
end
return subject
end
return {
parts = {
{ type = 'title', value = 'nom', subtitle = 'sous-titre', icon = 'icône', subhead = { subject = buildSubject(localdata), link = 'Entreprises' }},
{ type = 'images', imageparameters = { 'image', 'image2', 'image3', 'image4', 'image5' }, captionparameter = { 'légende', 'image desc' }},
{ type = 'table', separator = true, rows = {
{ type = 'row', label = 'Activité', value = 'activité' },
{ type = 'row', label = 'Produits', value = 'produits' }
}},
{ type = 'table', title = 'Personnalité', rows = {
{ type = 'row', label = 'PDG', value = 'pdg' },
{ type = 'row', label = 'Fondateur', value = 'fondateur' },
{ type = 'row', label = 'Employés', value = 'employés' }
}},
{ type = 'table', title = 'Localisation', rows = {
{ type = 'row', label = 'Pays', value = 'pays' },
{ type = 'row', label = 'Siège social', value = { 'siège', 'siège social' }},
{ type = 'row', label = 'Propriétés', value = { 'propriétés', 'localisations' }}
}},
{ type = 'table', title = 'Relation', rows = {
{ type = 'row', label = 'Société mère', value = { 'société mère', 'parent' }},
{ type = 'row', label = 'Filiale', value = { 'filiale', 'divisions' }},
{ type = 'row', label = 'Associé', value = { 'associé', 'relative' }}
}},
{ type = 'text', value = 'pied' }
}
}