Modulo:Infobox/sandbox: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
test
m versione attuale
Riga 6:
local root -- radice del markup html
local dump = {}
local test
 
local function checkList(valore)
Riga 43 ⟶ 42:
root
:tag('tr')
:addClass("sinottico_" .. test .. "_divisionesinottico_divisione")
:tag('th')
:attr('colspan', 2)
:cssText(rowArgs.stilestilegruppoN or args.StileGruppo or ''nil)
:wikitext(rowArgs.gruppo)
-- Altrimenti se rowArgs.valore non è nullo inserisce una riga dati, verificando
Riga 56 ⟶ 55:
row
:tag('th')
:cssText(rowArgs.stilenomeN or args.StileNome or ''nil)
:addClass('sinottico_' .. test .. '_etichetta')
:cssText(args.StileNome or '')
:wikitext(rowArgs.nome)
dataCell = row:tag('td')
else
dataCell = row:tag('td')
:addClass('sinottico_' .. test .. '_testo_centralesinottico_testo_centrale')
:attr('colspan', 2)
end
dataCell
:addClass(rowArgs.classe or ''nil)
:cssText(rowArgs.stilevaloreN or args.StileValore or ''nil)
:wikitext(checkList(rowArgs.valore))
end
Riga 77 ⟶ 75:
suptitle
:tag('span')
:addClass('sinottico_' .. test .. '_sottotitolosinottico_sottotitolo')
:cssText(args.StileSopraTitolo or ''nil)
:wikitext(args.SopraTitolo)
:done()
Riga 88 ⟶ 86:
:tag('br'):done()
:tag('span')
:addClass('sinottico_' .. test .. '_sottotitolosinottico_sottotitolo')
:cssText(args.StileSottoTitolo or ''nil)
:wikitext(args.SottoTitolo)
end
Riga 95 ⟶ 93:
root
:tag('caption')
:addClass('sinottico_' .. test .. '_testatasinottico_testata')
:cssText(args.StileTitoloEst or ''nil)
:node(suptitle)
:wikitext(args.TitoloEst)
Riga 103 ⟶ 101:
root
:tag('tr')
:addClass('sinottico_' .. test .. '_testatasinottico_testata')
:tag('th')
:attr('colspan', '2')
:node(suptitle)
:cssText(args.StileTitoloInt or ''nil)
:wikitext(args.TitoloInt)
:node(subtitle)
Riga 117 ⟶ 115:
local cell_immagine = mw.html.create('td')
cell_immagine
:addClass('sinottico_' .. test .. '_testo_centralesinottico_testo_centrale ' .. (args.ClasseImmagine or ''))
:attr('colspan', '2')
:cssText(args.StileImmagine or ''nil)
:wikitext(args.Immagine)
if args.Didascalia then
Riga 126 ⟶ 124:
:done()
:tag('span')
:cssText(args.StileDidascalia or ''nil)
:wikitext(args.Didascalia)
end
Riga 153 ⟶ 151:
valore = args['Valore' .. num],
classe = args['Classe' .. num],
stilestilegruppoN = args['GruppoStile' .. num],
stilenomeN = args['NomeStile' .. num],
stilevaloreN = args['ValoreStile' .. num]
})
end
Riga 165:
:tag('td')
:attr('colspan', '2')
:addClass('sinottico_' .. test .. '_piedesinottico_piede')
:cssText(args.StileUltima or ''nil)
:wikitext(args.Ultima)
:newline()
Riga 176:
:tag('tr')
:tag('td')
:addClass('sinottico_' .. test .. '_piede2sinottico_piede2 noprint nomobile metadata')
:attr('colspan', '2')
:wikitext(mw.getCurrentFrame():expandTemplate({
Riga 193:
root = mw.html.create('table')
root
:addClass('sinottico_infobox sinottico' .. test)
:cssText(args.StileTabella or ''nil)
:attr('summary', args.Summary or 'Tabella sinottica che riassume i principali dati del soggetto')
end
Riga 274:
if frame == mw.getCurrentFrame() then
origArgs = frame:getParent().args
test = origArgs.test or 'test'
else
origArgs = frame.args
Riga 310 ⟶ 309:
{prefix = 'Gruppo', depend={'GruppoStile'}},
{prefix = 'GruppoOpzionale', depend={'GruppoStile'}},
{prefix = 'Valore', depend={'Nome', 'Classe', 'NomeStile', 'ValoreStile'}},
}, 50)
preprocessSingleArg('Ultima')