Diferencia entre revisiones de «Módulo:Zona de pruebas/Juan Mayordomo/Ficha de persona»

Contenido eliminado Contenido añadido
Sin resumen de edición
Sin resumen de edición
Línea 291:
nombreEquipo = formatoDato(equipoWikidata.mainsnak, enMayusculas) or ''
periodoEquipo = ModuloWikidataFormatos.formatoPeriodo(equipoWikidata.qualifiers, enMayusculas) or ''
numeroPartidos = formatoDato(elementoTabla(equipoWikidata,'qualifiers','P1350',1), enMayusculas) or '0' --número de partidos jugados
puntosOGoles = formatoDato(elementoTabla(equipoWikidata,'qualifiers','P1351',1), enMayusculas) or '0' --número de puntos/goles marcados
if numeroPartidos == '' then
numeroPartidos = '0'
end
if puntosOGoles == '' then
puntosOGoles = '0'
end
if nombreEquipo:find('[Ss]elección') then
Línea 316 ⟶ 308:
if clubes[1] then
-- FALTA ORDENAR LOS CLUBES. Meter todo en una función
--if true then return ModuloTablas.tostring(clubes) end
tablaClubes = '<table><tr><th>Periodo</th><th>Club</th><th>Partidos (Goles / Puntos)</th></tr>'
Línea 324 ⟶ 316:
'<td>'..club.periodo..'</td>'..
'<td>'..club.nombre..'</td>'..
'<td>'..club.numeroPartidos.. (club.puntosOGoles ~='' and ' (' .. club.puntosOGoles .. ')' or '') .. '</td></tr>'
end
tablaClubes = tablaClubes .. '</table>'
Línea 330 ⟶ 322:
if selecciones[1] then
tablaSelecciones='FALTA2<table><tr><th>Periodo</th><th>Selección</th><th>Partidos (Goles / Puntos)</th></tr>'
for k,seleccion in ipairs(selecciones) do
tablaSelecciones=tablaSelecciones..'<tr>'..
'<td>'..seleccion.periodo..'</td>'..
'<td>'..seleccion.nombre..'</td>'..
'<td>'..seleccion.numeroPartidos.. (seleccion.puntosOGoles ~='' and ' (' .. seleccion.puntosOGoles .. ')' or '') .. '</td></tr>'
end
tablaSelecciones = tablaSelecciones .. '</table>'
end