Aller au contenu

« Module:Bandeau de rubrique » : différence entre les versions

aucun résumé des modifications
Kharmitch (discussion | contributions)
Aucun résumé des modifications
Kharmitch (discussion | contributions)
Aucun résumé des modifications
 
(8 versions intermédiaires par le même utilisateur non affichées)
Ligne 61 : Ligne 61 :
["jeu"] = {
["jeu"] = {
warning  = false,
warning  = false,
image    = 'Portail jeux.png',
text    = function(args)
text    = function(args)
local abbModule = require( "Module:Abréviation" )
local abbModule = require( "Module:Abréviation" )
Ligne 140 : Ligne 141 :
["vide"] = {
["vide"] = {
warning  = true,
warning  = true,
category = 'Sections vides ou incomplètes',
image    = 'Portail participation.png',
category = 'Rubrique vide ou incomplète',
text    = function(args)
text    = function(args)
local text = 'Cette rubrique est vide, insuffisamment détaillée ou incomplète. ['
local text = 'Cette rubrique est vide, insuffisamment détaillée ou incomplète. ['
Ligne 172 : Ligne 174 :
local banner = data[args.nom:lower()]
local banner = data[args.nom:lower()]
local image = banner.image or ''
local image = banner.image
local text = banner.text
local text = banner.text
local category = banner.category
local category = banner.category
if category and mw.title.getCurrentTitle().namespace == 0 then
if category and mw.title.getCurrentTitle().namespace == 0 then
local game = args['jeu']
local game = args['jeu'] or args[1]  -- FIXME: args[1] conflit
if game ~= '' then
if game ~= '' then
game = require( 'Module:Abréviation' ).name(game) or ''
game = require( 'Module:Abréviation' ).name(game) or ''
Ligne 189 : Ligne 191 :
end
end
if image ~= '' then
if image then
image = mw.html.create( 'span' )
image = mw.html.create( 'div' )
:addClass( 'avt-section-banner-img' )
:wikitext( '[[Fichier:' .. image .. '|x30px|link=|alt=]]' )
:wikitext( '[[Fichier:' .. image .. '|x30px|link=|alt=]]' )
:done()
:done()
Ligne 202 : Ligne 203 :
local res = mw.html.create( 'div' )
local res = mw.html.create( 'div' )
:addClass( 'avt-section-banner noexcerpt' )
:addClass( 'avt-section-banner noexcerpt' )
:wikitext(tostring(image) .. text)
:node(image)
:tag( 'div' )
:wikitext(text)
:done()
:done()
:done()
Bureaucrate, commentadmin, emailconfirmed, Administrateurs d’interface, staff, Administrateur
62 734

modifications