|
|
Zeile 2: |
Zeile 2: |
|
| |
|
| function serie.render(args) | | function serie.render(args) |
| local output = '<table class="publikation serie">' | | local output = "" |
|
| |
|
| -- Titel | | -- Debug: Zeige die übergebenen Parameter |
| local title = args["Titel"] or "Unbekannt"
| | for k, v in pairs(args) do |
| output = output .. '<tr><td><strong>Titel</strong></td><td>[[Hat Titel::' .. title .. ']]</td></tr>'
| | output = output .. k .. ": " .. tostring(v) .. "\n" |
| | |
| -- Autor(en) | |
| if args["Autor"] then
| |
| output = output .. '<tr><td><strong>Autor(en)</strong></td><td>'
| |
| for author in mw.text.gsplit(args["Autor"], ",") do
| |
| output = output .. '[[Hat Autor::' .. author .. ']], '
| |
| end
| |
| output = output:sub(1, -3) .. '</td></tr>' -- Entfernt das letzte Komma
| |
| end
| |
| | |
| -- Complete volumes (ehemals Gesamtbände)
| |
| if args["Complete volumes"] then
| |
| output = output .. '<tr><td><strong>Complete volumes</strong></td><td>[[Complete volumes::' .. args["Complete volumes"] .. ']]</td></tr>'
| |
| end
| |
| | |
| -- Serienbeschreibung
| |
| if args["Hat SerienBeschreibung"] then
| |
| output = output .. '<tr><td><strong>Beschreibung</strong></td><td>' .. args["Hat SerienBeschreibung"] .. '</td></tr>'
| |
| end
| |
| | |
| -- Datensatz-IDs
| |
| if args["Hat Datensatz ID"] then
| |
| output = output .. '<tr><td><strong>Datensatz ID(s)</strong></td><td>'
| |
| for id in mw.text.gsplit(args["Hat Datensatz ID"], ",") do
| |
| output = output .. '[[Hat Datensatz ID::' .. id .. ']], '
| |
| end
| |
| output = output:sub(1, -3) .. '</td></tr>'
| |
| end | | end |
|
| |
|
| output = output .. '</table>'
| |
| return output | | return output |
| end | | end |
|
| |
|
| return serie | | return serie |