15.189
Bearbeitungen
(Vorlage:CommonTabs/Karte in kartenTab() integriert) |
(bessere Code-Lesbarkeit) |
||
| Zeile 101: | Zeile 101: | ||
-- =p.bildTab{pargs={Bild="Erloeserkirche.jpg"}} | -- =p.bildTab{pargs={Bild="Erloeserkirche.jpg"}} | ||
local t = "" | local t = "" | ||
local beschreibung = que.getValues("Datei:" .. (fbdata.pargs | local beschreibung = que.getValues("Datei:" .. (fbdata.pargs["Bild"] or ""), "Beschreibung") | ||
local beschreibung = beschreibung[1] or "" | local beschreibung = beschreibung[1] or "" | ||
if not com.isEmpty(fbdata.pargs | if not com.isEmpty(fbdata.pargs["Bild"]) and wik.pageexists("Bild:" .. fbdata.pargs["Bild"]) then | ||
t = t .. '{| class = "factbox_imagetable" border = "0" cellpadding = "0" cellspacing = "0" width = "100%"\n' | t = t .. '{| class = "factbox_imagetable" border = "0" cellpadding = "0" cellspacing = "0" width = "100%"\n' | ||
t = t .. '|-\n' | t = t .. '|-\n' | ||
t = t .. '|[[Bild::Datei:' .. fbdata.pargs | t = t .. '|[[Bild::Datei:' .. fbdata.pargs["Bild"] .. '|768px|link=' .. (seite or '') .. ']]\n' | ||
if beschreibung ~= "" then | if beschreibung ~= "" then | ||
t = t .. '|-\n' | t = t .. '|-\n' | ||
| Zeile 130: | Zeile 130: | ||
else | else | ||
local args = { | local args = { | ||
lat = fbdata.pargs | lat = fbdata.pargs["lat"], location = fbdata.pargs["location"], | ||
lon = fbdata.pargs | lon = fbdata.pargs["lon"], locationlist = fbdata.pargs["locationlist"], | ||
geojson = fbdata.pargs | geojson = fbdata.pargs["geojson"], zoom = fbdata.pargs["zoom"] or "18", -- 18 ist default-zoom | ||
Debug = fbdata.pargs | Debug = fbdata.pargs["Debug"], | ||
width = "", height = "", -- passt sich beides automatisch an die Box an | width = "", height = "", -- passt sich beides automatisch an die Box an | ||
box = "nein", form = "ja" -- keine eigene Box; Seite hat Formular | box = "nein", form = "ja" -- keine eigene Box; Seite hat Formular | ||
| Zeile 141: | Zeile 141: | ||
-- über Formular-Wert GeoJsonKarte eine Karte aktiviert ist | -- über Formular-Wert GeoJsonKarte eine Karte aktiviert ist | ||
if com.isEmpty(args.geojson) then | if com.isEmpty(args.geojson) then | ||
if wik.pageexists("GeoJson:" .. fbdata.pagename) or com.isTrue(fbdata.pargs | if wik.pageexists("GeoJson:" .. fbdata.pagename) or com.isTrue(fbdata.pargs["GeoJsonKarte"]) then | ||
args.geojson = fbdata.pagename | args.geojson = fbdata.pagename | ||
end | end | ||
| Zeile 290: | Zeile 290: | ||
-- =p.zeileAktenNr{pargs={AktenNr="D-5-63-000-1464"}} | -- =p.zeileAktenNr{pargs={AktenNr="D-5-63-000-1464"}} | ||
local t = "" | local t = "" | ||
local aktennr = str.splitAndStrip(fbdata.pargs | local aktennr = str.splitAndStrip(fbdata.pargs["AktenNr"] or "", ";") | ||
if #aktennr > 0 then | if #aktennr > 0 then | ||
t = t .. "<dt>" .. "[[Attribut:AktenNr|Akten-Nr.]]</dt><dd>" | t = t .. "<dt>" .. "[[Attribut:AktenNr|Akten-Nr.]]</dt><dd>" | ||
| Zeile 431: | Zeile 431: | ||
-- Kategorien | -- Kategorien | ||
local ehemals_text = "" | local ehemals_text = "" | ||
if com.isTrue(fbdata.pargs | if com.isTrue(fbdata.pargs["Ehemals"]) then | ||
ehemals_text = " (ehemals)" | ehemals_text = " (ehemals)" | ||
end | end | ||
| Zeile 439: | Zeile 439: | ||
end | end | ||
end | end | ||
if com.isTrue(fbdata.pargs | if com.isTrue(fbdata.pargs["DenkmalstatusBesteht"]) then | ||
t = t .. "[[Kategorie:Denkmalliste]]" | t = t .. "[[Kategorie:Denkmalliste]]" | ||
end | end | ||
local stadtteil = str.splitAndStrip(fbdata.pargs | local stadtteil = str.splitAndStrip(fbdata.pargs["Stadtteil"] or "", ";") | ||
for _, s in ipairs(stadtteil) do | for _, s in ipairs(stadtteil) do | ||
s = str.strip(tostring(s or "")) | s = str.strip(tostring(s or "")) | ||
| Zeile 448: | Zeile 448: | ||
end | end | ||
-- Wartungs-Kategorien | -- Wartungs-Kategorien | ||
if com.isEmpty(fbdata.pargs | if com.isEmpty(fbdata.pargs["Bild"]) then | ||
if fbdata.kategorie ~= nil then | if fbdata.kategorie ~= nil then | ||
t = t .. "[[Kategorie:" .. fbdata.kategorie[1] .. " ohne Bild]]" | t = t .. "[[Kategorie:" .. fbdata.kategorie[1] .. " ohne Bild]]" | ||
| Zeile 454: | Zeile 454: | ||
t = t .. "[[Kategorie:Ohne Bild]]" | t = t .. "[[Kategorie:Ohne Bild]]" | ||
end | end | ||
elseif not wik.pageexists("Bild:" .. fbdata.pargs | elseif not wik.pageexists("Bild:" .. fbdata.pargs["Bild"]) then | ||
t = t .. "[[Kategorie:Bild nicht gefunden]]" | t = t .. "[[Kategorie:Bild nicht gefunden]]" | ||
end | end | ||
| Zeile 468: | Zeile 468: | ||
end | end | ||
end | end | ||
if fbdata.positionscheck and (fbdata.pargs | if fbdata.positionscheck and (fbdata.pargs["lat"] or "") == "" and (fbdata.pargs["lon"] or "") == "" and | ||
(fbdata.pargs | (fbdata.pargs["location"] or "") == "" and not wik.pageexists("GeoJson:" .. (fbdata.pargs["geojson"] or fbdata.pagename)) and | ||
fbdata.kategorie ~= nil then | fbdata.kategorie ~= nil then | ||
t = t .. "[[Kategorie:" .. fbdata.kategorie[1] .. ehemals_text .. " ohne Position]]" | t = t .. "[[Kategorie:" .. fbdata.kategorie[1] .. ehemals_text .. " ohne Position]]" | ||