20 398
modifications
Aucun résumé des modifications |
Aucun résumé des modifications |
||
(9 versions intermédiaires par un autre 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 111 : | Ligne 112 : | ||
text = function(args) | text = function(args) | ||
local link = args[1] | local link = args[1] | ||
if not link then return "Lien ?" end | |||
if | local text | ||
if args[2] then | |||
text = "Articles principaux : " | |||
else | |||
text = "Article principal : " | |||
end | |||
text = | local linkText = args["t1"] or link | ||
text = text .. "[[:" .. link .. "|" .. linkText .. "]]" | |||
for i = 2, 5 do | for i = 2, 5 do | ||
link = args[i] | |||
if link then | if link then | ||
linkText = args["t" .. i] or link | |||
text = text .. | text = text .. ", [[:" .. link .. "|" .. linkText .. "]]" | ||
else | else | ||
break | break | ||
end | end | ||
end | end | ||
Ligne 140 : | Ligne 139 : | ||
["vide"] = { | ["vide"] = { | ||
warning = true, | warning = true, | ||
category = ' | 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 172 : | ||
local banner = data[args.nom:lower()] | local banner = data[args.nom:lower()] | ||
local image = banner.image | 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 189 : | ||
end | end | ||
if image | if image then | ||
image = mw.html.create( ' | image = mw.html.create( 'div' ) | ||
:wikitext( '[[Fichier:' .. image .. '|x30px|link=|alt=]]' ) | :wikitext( '[[Fichier:' .. image .. '|x30px|link=|alt=]]' ) | ||
:done() | :done() | ||
Ligne 202 : | Ligne 201 : | ||
local res = mw.html.create( 'div' ) | local res = mw.html.create( 'div' ) | ||
:addClass( 'avt-section-banner noexcerpt' ) | :addClass( 'avt-section-banner noexcerpt' ) | ||
: | :node(image) | ||
:tag( 'div' ) | |||
:wikitext(text) | |||
:done() | |||
:done() | :done() | ||
modifications