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') | ||
.tag('th') | .tag('th') | ||
.attr('colspan', 2) | .attr('colspan', 2) | ||
.addClass(rowArgs. | .addClass(rowArgs.clase) | ||
.css('text-align', 'center') | .css('text-align', 'center') | ||
.cssText(args. | .cssText(args.estiloseccion) | ||
.wikitext(rowArgs. | .wikitext(rowArgs.seccion) | ||
elseif rowArgs.data then | elseif rowArgs.data then | ||
local row = root.tag('tr') | local row = root.tag('tr') | ||
row.addClass(rowArgs. | row.addClass(rowArgs.clasefila) | ||
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 92: | Línea 92: | ||
.addClass(args.aboveclass) | .addClass(args.aboveclass) | ||
.css('text-align', 'center') | .css('text-align', 'center') | ||
.css('font-size', ' | .css('font-size', '125%') | ||
.css('font-weight', 'bold') | .css('font-weight', 'bold') | ||
.cssText(args.abovestyle) | .cssText(args.abovestyle) | ||
| Línea 114: | Línea 114: | ||
local function renderSubheaders() | local function renderSubheaders() | ||
if args. | if args.subtitulo then | ||
args. | args.subtitulo1 = args.subtitulo | ||
end | end | ||
if args. | if args.clasesubtitulo then | ||
args. | args.clasesubtitulo1 = args.clasesubtitulo | ||
end | end | ||
local subheadernums = getArgNums('subtitulo') | local subheadernums = getArgNums('subtitulo') | ||
| Línea 124: | Línea 124: | ||
addRow({ | addRow({ | ||
data = args['subtitulo' .. num], | data = args['subtitulo' .. num], | ||
datastyle = args. | datastyle = args.estilosubtitulo or args['estilosubtitulo' .. num], | ||
class = args.subheaderclass, | class = args.subheaderclass, | ||
rowclass = args['clasesubtitulo' .. num] | rowclass = args['clasesubtitulo' .. num] | ||
| Línea 132: | Línea 132: | ||
local function renderImages() | local function renderImages() | ||
if args | if args.imagen then | ||
args | args.imagen1 = args.imagen | ||
end | end | ||
if args.caption then | if args.caption then | ||
args. | args.pie1 = args.pie | ||
end | end | ||
local imagenums = getArgNums('imagen') | local imagenums = getArgNums('imagen') | ||
| Línea 152: | Línea 152: | ||
addRow({ | addRow({ | ||
data = tostring(data), | data = tostring(data), | ||
datastyle = args. | datastyle = args.estiloimagen, | ||
class = args. | class = args.claseimagen, | ||
rowclass = args['claseimagen' .. num] | rowclass = args['claseimagen' .. num] | ||
}) | }) | ||
| Línea 165: | Línea 165: | ||
addRow({ | addRow({ | ||
header = args['seccion' .. num], | header = args['seccion' .. num], | ||
etiqueta = args['etiqueta' .. num], | |||
datos = args['datos' .. num], | |||
estilodatos = args['estilodatos' .. num], | |||
clase = args['clase' .. num], | |||
clasefila = args['clasefila' .. num] | |||
}) | }) | ||
end | end | ||