27.167
Bearbeitungen
(+ AttrInfo(), attrInfotextDelimiter(), AttrField()) |
(anfangsbuchstabeGross() von Tabellenkopf) |
||
| (4 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
| Zeile 2: | Zeile 2: | ||
local dev = require("Modul:Development") | local dev = require("Modul:Development") | ||
local str = require("Modul:String") | |||
function p.getAttrAttributes(attr, klasse) | function p.getAttrAttributes(attr, klasse) | ||
| Zeile 8: | Zeile 9: | ||
-- mw.logObject(p.getAttrAttributes("BietetKartenzahlung")) | -- mw.logObject(p.getAttrAttributes("BietetKartenzahlung")) | ||
local query = {"[[Attribut:" .. attr .. "]]", | local query = {"[[Attribut:" .. attr .. "]]", | ||
"?Datentyp#-", mainlabel = "-", limit = 1} | "?Datentyp#-", "?EhemalsAttribut", "?Anzeigegenauigkeit", | ||
mainlabel = "-", limit = 1} | |||
query = mw.smw.ask(query) | query = mw.smw.ask(query) | ||
if query ~= nil then | if query ~= nil then | ||
| Zeile 55: | Zeile 57: | ||
if query["Einzahl"] ~= attr then | if query["Einzahl"] ~= attr then | ||
query["ValueQuery"] = | query["ValueQuery"] = | ||
query["ValueQuery"] .. "=" .. query["Einzahl"] | query["ValueQuery"] .. "=" .. | ||
str.anfangsbuchstabeGross(query["Einzahl"]) | |||
end | |||
-- Sonderbehandlung Delimiter | |||
if query["Delimiter"] == "Semikolon" then | |||
query["Delimiter"] = ";" | |||
elseif query["Delimiter"] == "keine Liste" or | |||
(query["Delimiter"] == "Default/leer" and klasse == nil) then | |||
query["Delimiter"] = nil | |||
end | end | ||
end | end | ||