Modulo:RichiestaCU: differenze tra le versioni
Contenuto cancellato Contenuto aggiunto
m fix mw.uri.encode() |
test |
||
(6 versioni intermedie di 4 utenti non mostrate) | |||
Riga 1:
local p = {}
▲ local colori = {
▲ positivo = 'F0B090',
incerto = 'Symbol possible vote',
▲ probabile = 'F0D050',
negativo = 'Symbol unrelated',
altro = 'Symbol unsupport vote',
in_attesa = 'Time2wait',
riservato = 'Symbol unlikely'
if colori[arg1] ~= nil then▼
local function listUsers(group, sign)
local pattern = '[[File:%s.svg|20px|link=]] %s'
end▼
local label = sign:gsub('^.', string.upper):gsub('_', ' ')
elseif colori[arg2] ~= nil then▼
local div = mw.html.create('div')
div
:addClass('cu-request-block')
:tag('div')
end▼
:addClass('cu-request-symbol')
:wikitext(string.format(pattern, icons[sign], label))
:done()
:tag('div')
:addClass('cu-request-list')
:done()
:done()
return tostring(div)
end
local function
local links = {
'[[luxo:$1|(CW)]]',
'[' .. tostring(mw.uri.fullUrl('Speciale:Log', {
'[[Speciale:CU/$1|CU]]'
}
return
end
function p.
local args = frame:getParent().args
local
local
local
while true do
if
▲ table.insert(res, riga(utente, args['RISULTATO_UTENTE'..numero], sign))
return '<small><span class="error">ERRORE#1: Richiesta non valida: non è stata indicata alcuna utenza.</span></small>'▼
end
local group = icons[result] and result or 'in_attesa'
if not users[group] then users[group] = {} end
table.insert(users[group], getLinks(user))
i = i + 1
▲
else
break
end
end
if users[args.RISULTATOSIGN] then
▲ return table.concat(res, '\n')
table.insert(ret, listUsers(users[args.RISULTATOSIGN], args.RISULTATOSIGN))
▲ end
for k in pairs(icons) do
if users[k] and k ~= args.RISULTATOSIGN then
table.insert(ret, listUsers(users[k], k))
▲ end
end
return table.concat(ret, '\n')
end
|