Modul:Datei/Work: Unterschied zwischen den Versionen

Aus FürthWiki

keine Bearbeitungszusammenfassung
Keine Bearbeitungszusammenfassung
Keine Bearbeitungszusammenfassung
Zeile 112: Zeile 112:
-- Erstellungsdatum/ÜberDatum
-- Erstellungsdatum/ÜberDatum
for _, d in ipairs{
local date = pargs["Erstellungsdatum"] or ""
{"Erstellungsdatum", "Erstellungstag", "Erstellungsjahr"},
if date ~= "" then
{"ÜberDatum", "ÜberTag", "ÜberJahr"}} do
t = t .. p.attrZeile("Erstellungsdatum", lfd.linkFormDate(date, "Erstellungsdatum", "Erstellungstag", "Erstellungsjahr"),"englische Notation<br>für Medienbetrachter", date, nil, "fileinfotpl_date")
local date = pargs[d[1]] or ""
end
if date ~= "" then
date = pargs["ÜberDatum"] or ""
t = t .. p.attrZeile(d[1], lfd.linkFormDate(date, d[1], d[2], d[3]))
if date ~= "" then
end
t = t .. p.attrZeile("ÜberDatum", lfd.linkFormDate(date, "ÜberDatum", "ÜberTag", "ÜberJahr"))
end
end
Zeile 249: Zeile 249:
end
end
function p.attrZeile(a1, v1, a2, v2, id1) -- Tabellenzeile mit max. 2 Attributen
function p.attrZeile(a1, v1, a2, v2, id1, id2) -- Tabellenzeile mit max. 2 Attributen
local t = ""
local t = ""
if v1 ~= "" then
if v1 ~= "" then
Zeile 256: Zeile 256:
a2 = "[[Attribut:" .. a2 .. "|" .. wob.attr_text(a2) .. "]]"
a2 = "[[Attribut:" .. a2 .. "|" .. wob.attr_text(a2) .. "]]"
end
end
t = t .. p.zeile(a1, v1, a2, v2, id1)
t = t .. p.zeile(a1, v1, a2, v2, id1, id2)
end
end
return t
return t
end
end


function p.zeile(a1, v1, a2, v2, id1) -- Tabellenzeile mit max. 2x2 Einträgen
function p.zeile(a1, v1, a2, v2, id1, id2) -- Tabellenzeile mit max. 2x2 Einträgen
local t = ""
local t = ""
if v1 ~= "" then
if v1 ~= "" then
Zeile 274: Zeile 274:
else
else
t = t .. "<td>" .. v1 .. "</td>"
t = t .. "<td>" .. v1 .. "</td>"
t = t .. "<td>'''" .. a2 .. "'''</td>"
if id2 == nil then
t = t .. "<td>'''" .. a2 .. "'''</td>"
else
t = t .. "<td id=\"" .. id2 .. "\" class=\"fileinfo-paramfield\">'''" .. a2 .. "'''</td>"
end
t = t .. "<td>" .. v2 .. "</td>"
t = t .. "<td>" .. v2 .. "</td>"
end
end