Modulo:Bozza: differenze tra le versioni
Contenuto cancellato Contenuto aggiunto
riorganizzo codice |
semplifico |
||
Riga 97:
function p.main(frame)
local current_title = mw.title.getCurrentTitle()
local ns = current_title.namespace
local text = current_title:getContent()
if
return '[[Categoria:Rimuovere template Bozza]]'
elseif not text then
Line 109 ⟶ 110:
local args = getArgs(frame, { parentOnly = true })
local lang = mw.language.getContentLanguage()
local state = lang:ucfirst(args[1] or '')▼
local submissions = getSubmissions({ current = {}, old = {} }, text)
if
if next(submissions.current) then
elseif next(submissions.old) and
end
end
if next(submissions.old) then
Line 128 ⟶ 127:
args = { src = 'Modulo:Bozza/styles.css' }
}
local collapsed_submissions
local header = createRow('Data richiesta', 'Esito revisione')
:addClass('nomobile bozza-history-header')
local
:addClass('nomobile mw-collapsible mw-collapsed')▼
:attr('data-expandtext', 'mostra richieste precedenti')▼
:attr('data-collapsetext', 'nascondi richieste precedenti')▼
history_table = mw.html.create('div')▼
:addClass('bozza-history')
:node(header)
Line 143 ⟶ 138:
if success then
i = i +
if i
▲ :addClass('nomobile mw-collapsible mw-collapsed')
▲ :attr('data-expandtext', 'mostra richieste precedenti')
▲ :attr('data-collapsetext', 'nascondi richieste precedenti')
history_table:node(collapsed_submissions)
end
Line 151 ⟶ 150:
for _, submission in ipairs(a) do
submission = submission:gsub('%}%}$', '|mostra esito=x}}')
local root =
end
end
end
end
return frame:expandTemplate{
title = 'Template:Bozza/avviso', args = ▲ } } .. (current_title.namespace == 118 and checkForCategories(text) or '')
end
|