Usuario anónimo
Cambio valor anchoImagen a 320px (solicitud en el TAB)
Sin resumen de edición |
wikitves>Ruy (Cambio valor anchoImagen a 320px (solicitud en el TAB)) |
||
Línea 10: | Línea 10: | ||
local args | local args | ||
local root | local root | ||
local anchoImagen = ' | local anchoImagen = '320px' | ||
function union(t1, t2) | function union(t1, t2) | ||
-- devuelve la unión de los valores de dos tablas, como una secuencia | -- devuelve la unión de los valores de dos tablas, como una secuencia | ||
Línea 163: | Línea 163: | ||
.tag('td') | .tag('td') | ||
.attr('colspan', '3') | .attr('colspan', '3') | ||
.addClass(args.claseimageninferior) | .addClass('imagen ' .. (args.claseimageninferior or '') ) | ||
.css('text-align', 'center') | .css('text-align', 'center') | ||
.cssText(args.estiloimageninferior) | .cssText(args.estiloimageninferior) | ||
Línea 194: | Línea 194: | ||
.tag('td') | .tag('td') | ||
.attr('colspan', '3') | .attr('colspan', '3') | ||
.addClass(args.claseimagensuperior) | .addClass('imagen ' .. (args.claseimagensuperior or '') ) | ||
.css('text-align', 'center') | .css('text-align', 'center') | ||
.cssText(args.estiloimagensuperior) | .cssText(args.estiloimagensuperior) | ||
Línea 377: | Línea 377: | ||
datos = tostring(datos), | datos = tostring(datos), | ||
estilodatos = args.estiloimagen, | estilodatos = args.estiloimagen, | ||
clase = args.claseimagen, | clase = 'imagen ' .. (args.claseimagen or ''), | ||
clasefila = args['claseimagen' .. num] | clasefila = args['claseimagen' .. num] | ||
}) | }) | ||
Línea 560: | Línea 560: | ||
})) | })) | ||
end | end | ||
local function hacerBarraWikidata()-- Crea en la parte inferior un enlace al ítem de Wikidata | |||
local enlacePagina = mw.title.getCurrentTitle().prefixedText | |||
local etiquetaPagina = mw.ustring.gsub(enlacePagina,'%s%(.*%)','') | |||
local entidad = args.entidad or mw.wikibase.getEntityIdForCurrentPage() | |||
local textoPie = "" | |||
if (args.child == 'si' or args.integrada == 'sí' or args.wikidata == 'no') or (mw.title.getCurrentTitle().namespace ~= 0 and mw.title.getCurrentTitle().namespace ~= 104 and not args.entidad) then | |||
textoPie = '' | |||
elseif entidad ~= "" and entidad ~= nil then | |||
textoPie = '<div class="plainlinks wikidata-link" style="font-size: 0.85em">[[[d:' .. tostring(entidad) .. '|editar datos en Wikidata]]]</div>' | |||
if (entidad ~= mw.wikibase.getEntityIdForCurrentPage()) and (mw.title.getCurrentTitle().namespace == 0 or mw.title.getCurrentTitle().namespace == 104) then | |||
textoPie = textoPie .. '[[Categoría:Wikipedia:Artículos con fichas que utilizan acceso arbitrario]]' | |||
end | |||
else | |||
textoPie = "<small>'''Página no enlazada a [[Wikidata]]'''\n".. | |||
"* Si no existe en otras Wikipedias: [<span class=plainlinks>[//www.wikidata.org/w/index.php?title=Special:NewItem&site=eswiki&page="..mw.uri.encode(enlacePagina,WIKI) .."&label="..mw.uri.encode(etiquetaPagina,WIKI) .." crea nuevo ítem]]</span>\n".. | |||
"* Si existe en otras Wikipedias: [<span class=plainlinks>[[:d:Special:ItemByTitle|busca ítem para enlazar]]</span>]\n".. | |||
"y añade el enlace en español: ".. enlacePagina ..".</small>" | |||
end | |||
if textoPie ~= '' then | |||
root | |||
.tag('tr') | |||
.tag('td') | |||
.addClass('noprint') | |||
.attr('colspan', '3') | |||
.css('text-align', 'left') | |||
.wikitext(textoPie) | |||
end | |||
end | |||
local function hacerCategoriasSeguimiento() | |||
if args.decat ~= 'si' and #(getArgNums('datos')) == 0 and not args[1] and mw.title.getCurrentTitle().namespace == 0 then | |||
root.wikitext('[[Categoría:Wikipedia:Artículos que usan ficha sin datos en filas]]') | |||
end | |||
if CategorizacionAByAD.hasAnyBadge() == '1' then | |||
root.wikitext(CategorizacionAByAD.badgesCategories()) | |||
end | |||
end | |||
function _infobox() | function _infobox() | ||
if args.child ~= 'si' and args.integrada ~= 'sí' then | if args.child ~= 'si' and args.integrada ~= 'sí' then | ||
Línea 596: | Línea 636: | ||
hacerPieDeTabla() | hacerPieDeTabla() | ||
hacerBarraDeNavegacion() | hacerBarraDeNavegacion() | ||
hacerBarraWikidata() | |||
hacerCategoriasSeguimiento() | |||
return tostring(root) | return mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = 'Plantilla:Ficha/imagelimit.css' } } .. tostring(root) | ||
end | end | ||
local function touchParameters(prefixTable, origArgs, step) | local function touchParameters(prefixTable, origArgs, step) |