Modulo:Tabs: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
aggiorno nome del bottone
Aggiungo controllo e messaggio d'errore se uno o più parametri vengono lasciati vuoti, categorizza e invita a correggere
Riga 44:
-- Usa la funzione "differenze" del [[Modulo:FormeFlesse]]
 
-- IF per controllare che tutti i parametri minimi siano stati scritti
 
if masc == nil or mascPl == nil or fem == nil or femPl == nil then
 
modifica = ' ['..mw.title.getCurrentTitle():fullUrl{action = 'edit'}..' correggi il template]'
local differenze = FFLink.Differenze(arg)
ErrVuoti ='<strong class="error plainlinks">Uno o più parametri del {{[[Template:Tabs|Tabs]]}} sono stati lasciati vuoti, '..modifica..'</strong>'
 
return ErrVuoti..''..categorizza('Template per le forme flesse senza informazioni')
local function categorizzazione (frame)
else
local differenze = FFLink.Differenze(arg)
local function categorizzazione (frame)
 
--[=[###########################################################################
Line 104 ⟶ 108:
categoriaFemPl2 = ''
end
return ''..categoriaMasc..''..categoriaMasc2..''..categoriaMascPl..''..categoriaMascPl2..''..categoriaFem..''..categoriaFem2..''..categoriaFemPl..''..categoriaFemPl2
end
 
--[=[###########################################################################
Line 111 ⟶ 115:
#############################################################################]=]
 
tabs = '{| style="float:right; margin-left:0.5em; margin-bottom:0.5em;'
tabs = tabs .. 'border: 1px solid #AAAAAA; border-collapse:collapse;" cellpadding="3" rules="all"\n'
tabs = tabs .. '|- align="center"\n'
tabs = tabs .. '!'..titolo..'<div class="sost" id="ButtonFF" >'.. differenze .. '</div>\n'
tabs = tabs .. '! bgcolor="#FFFFE0" |&nbsp;\'\'[[singolare]]\'\'&nbsp;\n'
tabs = tabs .. '! bgcolor="#FFFFE0" |&nbsp;\'\'[[plurale]]\'\'&nbsp;\n'
tabs = tabs .. '|- align="center"\n'
tabs = tabs .. '! bgcolor="#FFFFE0" |&nbsp;\'\'[[maschile]]\'\'&nbsp;\n'
tabs = tabs .. '| &nbsp; [['..masc..']]&nbsp;'..masc2Insert..'\n'
tabs = tabs .. '| &nbsp; [['..mascPl..']]&nbsp;'..mascPl2Insert..'\n'
tabs = tabs .. '|- align="center"\n'
tabs = tabs .. '! bgcolor="#FFFFE0" |&nbsp;\'\'[[femminile]]\'\'&nbsp;\n'
tabs = tabs .. '| &nbsp; [['..fem..']]&nbsp;'..fem2Insert..'\n'
tabs = tabs .. '| &nbsp; [['..femPl..']]&nbsp;'..femPl2Insert..'\n'
tabs = tabs .. '|}\n' ..categorizzazione(frame)
return tabs
end
end