Modul:Citace: Porovnání verzí

Smazaný obsah Přidaný obsah
Jvs (diskuse | příspěvky)
opravy v p.citYearNumberPage() a refactoring v p.citChapterPage()
Jvs (diskuse | příspěvky)
opravy v p.citYearNumberPage()
Řádek 839:
end
 
-- refact/fix 1.6.2018
function p.citYearNumberPage(c)
if c.trace then p.trace(c, debug.getinfo(1, "n")) end
local t = {}
t.ar = {}
 
if not p.empty(c.args["ročník"]) then
table.insert(t.rocnik =ar, (not p.empty(c.args["typ ročníku"]) and c.args["typ ročníku"] or "roč.") .. " " .. c.args["ročník"])
end
 
if not p.empty(c.args["číslo"]) then
table.insert(t.cislo =ar, (not p.empty(c.args["typ čísla"]) and c.args["typ čísla"] or "čís.") .. " " .. c.args["číslo"])
end
 
if tnot p.rocnikempty(c.args["strany"]) then
table.insert(t.ar, "s. " .. c.args["strany"])
if t.cislo then
t.result = t.rocnik .. ", " .. t.cislo
else
t.result = t.rocnik
end
else
if t.cislo then
t.result = t.cislo
end
end
 
-- test array length
if t.result then
if #t.isYearNumberar > =0 truethen
if c.state.isDatum then
table.insert(c.r, ", " .. table.concat(t.resultar, ", ") .. ".")
else
table.insert(c.r, " " .. p.upperFirst(table.concat(t.resultar, ", ")) .. ".")
end
if not p.empty(c.args["strany"]) then
table.insert(c.r, ""
.. ", s. "
.. c.args["strany"]
.. "."
)
else
if t.isYearNumber then
table.insert(c.r, ".")
end
end
else
if c.state.isDatum then
table.insert(c.r, ".")
end
ifelseif c.state.isDatum then
table.insert(c.r, ".")
end
end