« Module:Infobox/Configs/Personnage » : différence entre les versions
De Nefald
Autres actions
Aucun résumé des modifications |
Aucun résumé des modifications |
||
| Ligne 16 : | Ligne 16 : | ||
return nil | return nil | ||
end, | end, | ||
-- STATUT DU PERSONNAGE | -- STATUT DU PERSONNAGE | ||
| Ligne 33 : | Ligne 21 : | ||
required = false, | required = false, | ||
allowedValues = { | allowedValues = { | ||
['vivant'] = { display = 'Vivant', category = ' | ['vivant'] = { display = 'Vivant', category = 'Personnage vivant' }, | ||
['décédé'] = { display = 'Décédé', category = ' | ['décédé'] = { display = 'Décédé', category = 'Personnage décédé' }, | ||
['disparu'] = { display = 'Disparu', category = ' | ['disparu'] = { display = 'Disparu', category = 'Personnage disparu' }, | ||
['immortel'] = { display = 'Immortel', category = ' | ['immortel'] = { display = 'Immortel', category = 'Personnage immortel' } | ||
} | } | ||
}, | }, | ||
-- CATÉGORIES AUTOMATIQUES | -- CATÉGORIES AUTOMATIQUES (STATUT UNIQUEMENT) | ||
categories = function(args, config, frame) | categories = function(args, config, frame) | ||
| Ligne 46 : | Ligne 34 : | ||
local title = mw.title.getCurrentTitle() | local title = mw.title.getCurrentTitle() | ||
-- uniquement namespace principal | -- catégories uniquement namespace principal | ||
if title.namespace ~= 0 then | if title.namespace ~= 0 then | ||
return cats | return cats | ||
end | end | ||
-- | -- catégorie selon statut | ||
if args.statut and config.statutField and config.statutField.allowedValues then | if args.statut and config.statutField and config.statutField.allowedValues then | ||
local cleanStatut = mw.text.trim(mw.ustring.lower(args.statut)) | local cleanStatut = mw.text.trim(mw.ustring.lower(args.statut)) | ||
| Ligne 85 : | Ligne 63 : | ||
{ cle = 'lieu_residence', label = 'Lieu de résidence' }, | { cle = 'lieu_residence', label = 'Lieu de résidence' }, | ||
{ cle = 'statut', label = 'Statut' } | { cle = 'statut', label = 'Statut' } | ||
} | |||
}, | |||
{ | |||
titre = 'Rôles et activités', | |||
champs = { | |||
{ cle = 'activite', label = 'Activité' }, | |||
{ cle = 'organisation', label = 'Organisation' }, | |||
{ cle = 'role', label = 'Rôle' }, | |||
{ cle = 'croyances', label = 'Croyances' } | |||
} | |||
}, | |||
{ | |||
titre = 'Affiliations', | |||
champs = { | |||
{ cle = 'famille', label = 'Famille' }, | |||
{ cle = 'conjoint', label = 'Conjoint' }, | |||
{ cle = 'parents', label = 'Parents' }, | |||
{ cle = 'enfants', label = 'Enfants' } | |||
} | |||
}, | |||
{ | |||
titre = 'Apparence', | |||
champs = { | |||
{ cle = 'sexe', label = 'Sexe' }, | |||
{ cle = 'taille', label = 'Taille' }, | |||
{ cle = 'poids', label = 'Poids' }, | |||
{ cle = 'traits', label = 'Traits' } | |||
} | } | ||
} | } | ||