Diferencia entre revisiones de «Módulo:Ficha»
Sin resumen de edición |
Sin resumen de edición |
||
| Línea 37: | Línea 37: | ||
local function addRow(rowArgs) | local function addRow(rowArgs) | ||
if rowArgs. | if rowArgs.seccion then | ||
root | root | ||
.tag('tr') | .tag('tr') | ||
| Línea 46: | Línea 46: | ||
.cssText(args.headerstyle) | .cssText(args.headerstyle) | ||
.wikitext(rowArgs.header) | .wikitext(rowArgs.header) | ||
elseif rowArgs. | elseif rowArgs.datos then | ||
local row = root.tag('tr') | local row = root.tag('tr') | ||
row.addClass(rowArgs.rowclass) | row.addClass(rowArgs.rowclass) | ||
if rowArgs. | if rowArgs.etiqueta then | ||
row | row | ||
.tag('th') | .tag('th') | ||
.attr('scope', 'row') | .attr('scope', 'row') | ||
.css('text-align', 'left') | .css('text-align', 'left') | ||
.cssText(args. | .cssText(args.estiloetiqueta) | ||
.wikitext(rowArgs. | .wikitext(rowArgs.etiqueta) | ||
.done() | .done() | ||
end | end | ||
local dataCell = row.tag('td') | local dataCell = row.tag('td') | ||
if not rowArgs. | if not rowArgs.etiqueta then | ||
dataCell | dataCell | ||
.attr('colspan', 2) | .attr('colspan', 2) | ||
| Línea 66: | Línea 66: | ||
end | end | ||
dataCell | dataCell | ||
.addClass(rowArgs. | .addClass(rowArgs.clase) | ||
.cssText(rowArgs. | .cssText(rowArgs.estilodatos) | ||
.wikitext(rowArgs. | .wikitext(rowArgs.datos) | ||
end | end | ||
end | end | ||
| Línea 116: | Línea 116: | ||
args.subheader1 = args.subtitulo | args.subheader1 = args.subtitulo | ||
end | end | ||
if args. | if args.clasesubtitulo then | ||
args.clasesubtitulo1 = args.clasesubtitulo | args.clasesubtitulo1 = args.clasesubtitulo | ||
end | end | ||
| Línea 139: | Línea 139: | ||
local imagenums = getArgNums('imagen') | local imagenums = getArgNums('imagen') | ||
for k, num in ipairs(imagenums) do | for k, num in ipairs(imagenums) do | ||
local | local pie = args['pie' .. num] | ||
local | local datos = HtmlBuilder.create().wikitext(args['imagen' .. num]) | ||
if pie then | if pie then | ||
datos | |||
.tag('br', {selfClosing = true}) | .tag('br', {selfClosing = true}) | ||
.done() | .done() | ||
| Línea 222: | Línea 222: | ||
if args.titulo then | if args.titulo then | ||
root.wikitext("'''" .. args. | root.wikitext("'''" .. args.titulo .. "'''") | ||
end | end | ||
end | end | ||