Modul:Datei: Unterschied zwischen den Versionen
Aus FürthWiki
Keine Bearbeitungszusammenfassung |
Keine Bearbeitungszusammenfassung |
||
| Zeile 1: | Zeile 1: | ||
local p = {} | local p = {} | ||
local c = require( "Module:Common" ) | local c = require("Module:Common") | ||
function p. | function p.daten(frame, args) | ||
t = '<table class="wikitable">'.. | local a, w, z | ||
'<th colspan="4">'..mw.title.getCurrentTitle().text..'</th>' | local t = '<table class="wikitable">'.. | ||
'<th colspan="4">' .. mw.title.getCurrentTitle().text .. '</th>' | |||
if not isEmpty(args.Genre) then | if not c.isEmpty(args.Genre) then | ||
t=t..'<tr>'.. | t=t..'<tr>'.. | ||
'<td>[[Attribut:Genre|Genre]]</td>' .. | '<td>[[Attribut:Genre|Genre]]</td>' .. | ||
| Zeile 15: | Zeile 16: | ||
-- Liste Freiattribute und Werte auf | -- Liste Freiattribute und Werte auf | ||
for i=1,6 do | for i = 1, 6 do | ||
a='Attribut'..i | a = 'Attribut'..i | ||
w='Wert'..i | w = 'Wert'..i | ||
if not isEmpty(args[a]) then | if not c.isEmpty(args[a]) then | ||
t=t..'<tr>'.. | t=t..'<tr>'.. | ||
'<td>[[Attribut:'..args[a]..'|'..args[a]..']]</td>'.. | '<td>[[Attribut:'..args[a]..'|'..args[a]..']]</td>'.. | ||
| Zeile 27: | Zeile 28: | ||
end | end | ||
if not isEmpty(args.Urheber) then | if not c.isEmpty(args.Urheber) then | ||
t=t..'<tr>'.. | t = t .. '<tr>'.. | ||
'<td>[[Attribut:Urheber|Urheber]]</td>' .. | '<td>[[Attribut:Urheber|Urheber]]</td>' .. | ||
'<td colspan="3">'..frame:callParserFunction( | '<td colspan="3">'..frame:callParserFunction( | ||
| Zeile 36: | Zeile 37: | ||
end | end | ||
if not isEmpty(args.Quellangaben) then | if not c.isEmpty(args.Quellangaben) then | ||
t=t..'<tr>'.. | t = t .. '<tr>'.. | ||
'<td>[[Attribut:Quellangaben|Quellangaben]]</td>'.. | '<td>[[Attribut:Quellangaben|Quellangaben]]</td>'.. | ||
'<td colspan="3">[[Quellangaben::'..args.Quellangaben..']]</td>'.. | '<td colspan="3">[[Quellangaben::'..args.Quellangaben..']]</td>'.. | ||
| Zeile 43: | Zeile 44: | ||
end | end | ||
if not isEmpty(args.Ort) then | if not c.isEmpty(args.Ort) then | ||
t = t .. '<tr>'.. | t = t .. '<tr>'.. | ||
'<td>[[Attribut:Ort|Ort]]</td>'.. | '<td>[[Attribut:Ort|Ort]]</td>'.. | ||
'<td>'..frame:callParserFunction( | '<td>' .. frame:callParserFunction( | ||
'#arraymap', args.Ort, ';', 'x', '[[Ort::x]]') ..'</td>'.. | '#arraymap', args.Ort, ';', 'x', '[[Ort::x]]') ..'</td>'.. | ||
'<td><b>ausblenden:</b></td>' | '<td><b>ausblenden:</b></td>' | ||
| Zeile 53: | Zeile 54: | ||
z = '<td>[[ZeigeNichtInOrt::'..args.ZeigeNichtInOrt..']]</td>' | z = '<td>[[ZeigeNichtInOrt::'..args.ZeigeNichtInOrt..']]</td>' | ||
end | end | ||
t=t..z..'</tr>' | t = t .. z ..'</tr>' | ||
end | end | ||
if not isEmpty(args['Straße']) then | if not c.isEmpty(args['Straße']) then | ||
t=t..'<tr>'.. | t=t..'<tr>'.. | ||
'<td>[[Attribut:Straße|Straße]]</td>'.. | '<td>[[Attribut:Straße|Straße]]</td>'.. | ||
| Zeile 70: | Zeile 71: | ||
end | end | ||
if not isEmpty(args.Erstellungsdatum) then | if not c.isEmpty(args.Erstellungsdatum) then | ||
t=t..'<tr>'.. | t=t..'<tr>'.. | ||
'<td>[[Attribut:Erstellungsdatum|Erstellungsdatum]]</td>'.. | '<td>[[Attribut:Erstellungsdatum|Erstellungsdatum]]</td>'.. | ||
| Zeile 81: | Zeile 82: | ||
end | end | ||
if not isEmpty(args['ÜberDatum']) then | if not c.isEmpty(args['ÜberDatum']) then | ||
t=t..'<tr>'.. | t=t..'<tr>'.. | ||
'<td>[[Attribut:ÜberDatum|Über Datum]]</td>'.. | '<td>[[Attribut:ÜberDatum|Über Datum]]</td>'.. | ||
| Zeile 92: | Zeile 93: | ||
end | end | ||
if not isEmpty(args.Seitennummer) then | if not c.isEmpty(args.Seitennummer) then | ||
t=t..'<tr>'.. | t=t..'<tr>'.. | ||
'<td>[[Attribut:Seitennummer|Seitennummer]]</td>'.. | '<td>[[Attribut:Seitennummer|Seitennummer]]</td>'.. | ||
| Zeile 100: | Zeile 101: | ||
end | end | ||
if not isEmpty(args.Signatur) then | if not c.isEmpty(args.Signatur) then | ||
t=t..'<tr>'.. | t=t..'<tr>'.. | ||
'<td>[[Attribut:Signatur|Signatur]]</td>'.. | '<td>[[Attribut:Signatur|Signatur]]</td>'.. | ||
| Zeile 107: | Zeile 108: | ||
end | end | ||
if not isEmpty(args['Länge']) then | if not c.isEmpty(args['Länge']) then | ||
t=t..'<tr>'.. | t=t..'<tr>'.. | ||
'<td>[[Attribut:Länge|Länge]]</td>'.. | '<td>[[Attribut:Länge|Länge]]</td>'.. | ||
| Zeile 114: | Zeile 115: | ||
end | end | ||
if not isEmpty(args.Lizenz) then | if not c.isEmpty(args.Lizenz) then | ||
t=t..'<tr>'.. | t=t..'<tr>'.. | ||
'<td>[[Attribut:Lizenz|Lizenz]]</td>'.. | '<td>[[Attribut:Lizenz|Lizenz]]</td>'.. | ||
| Zeile 121: | Zeile 122: | ||
end | end | ||
if not isEmpty(args.Beschreibung) then | if not c.isEmpty(args.Beschreibung) then | ||
t=t..'<tr>'.. | t=t..'<tr>'.. | ||
'<td>[[Attribut:Beschreibung|Beschreibung]]</td>'.. | '<td>[[Attribut:Beschreibung|Beschreibung]]</td>'.. | ||
| Zeile 128: | Zeile 129: | ||
end | end | ||
if not isEmpty(args.UploadCommons) then | if not c.isEmpty(args.UploadCommons) then | ||
t=t..'<tr>'.. | t=t..'<tr>'.. | ||
'<td>[[Attribut:UploadCommons|Upload zu Wikimedia Commons]]</td>'.. | '<td>[[Attribut:UploadCommons|Upload zu Wikimedia Commons]]</td>'.. | ||
Version vom 24. August 2025, 12:22 Uhr
Seiten-Übersicht
| Hauptseite | Unterseiten | ||
|---|---|---|---|
| Allgemein | |||
| Faktenbox | Vorlagen | ||
| Formulare |
|
||
| Module | |||
| Abfrage | Vorlagen |
| |
| Formulare |
| ||
| Sonstige | |||
Siehe auch
local p = {}
local c = require("Module:Common")
function p.daten(frame, args)
local a, w, z
local t = '<table class="wikitable">'..
'<th colspan="4">' .. mw.title.getCurrentTitle().text .. '</th>'
if not c.isEmpty(args.Genre) then
t=t..'<tr>'..
'<td>[[Attribut:Genre|Genre]]</td>' ..
'<td colspan="3">'..frame:callParserFunction(
'#arraymap', args.Genre, ';', 'x', '[[:Kategorie:x|x]] [[Kategorie:x]]') .. '</td>' ..
'</tr>'
end
-- Liste Freiattribute und Werte auf
for i = 1, 6 do
a = 'Attribut'..i
w = 'Wert'..i
if not c.isEmpty(args[a]) then
t=t..'<tr>'..
'<td>[[Attribut:'..args[a]..'|'..args[a]..']]</td>'..
'<td colspan="3">'..frame:callParserFunction(
'#arraymap', args[w], ';', 'x', '[['..args[a]..'::x]]')..'</td>'..
'</tr>'
end
end
if not c.isEmpty(args.Urheber) then
t = t .. '<tr>'..
'<td>[[Attribut:Urheber|Urheber]]</td>' ..
'<td colspan="3">'..frame:callParserFunction(
'#arraymap', args['Urheber'], ';', 'x', '[[Urheber::x]]')..
'</td>'..
'</tr>'
end
if not c.isEmpty(args.Quellangaben) then
t = t .. '<tr>'..
'<td>[[Attribut:Quellangaben|Quellangaben]]</td>'..
'<td colspan="3">[[Quellangaben::'..args.Quellangaben..']]</td>'..
'</tr>'
end
if not c.isEmpty(args.Ort) then
t = t .. '<tr>'..
'<td>[[Attribut:Ort|Ort]]</td>'..
'<td>' .. frame:callParserFunction(
'#arraymap', args.Ort, ';', 'x', '[[Ort::x]]') ..'</td>'..
'<td><b>ausblenden:</b></td>'
z = '<td>[[ZeigeNichtInOrt::Nein]]</td>'
if not isEmpty(args.ZeigeNichtInOrt) then
z = '<td>[[ZeigeNichtInOrt::'..args.ZeigeNichtInOrt..']]</td>'
end
t = t .. z ..'</tr>'
end
if not c.isEmpty(args['Straße']) then
t=t..'<tr>'..
'<td>[[Attribut:Straße|Straße]]</td>'..
'<td>'..frame:callParserFunction(
'#arraymap', args['Straße'], ';', 'x', '[[Straße::x]]')
t=t..'</td>'..
'<td><b>ausblenden:</b></td>'
z = '<td>[[ZeigeNichtInStraße::Nein]]</td>'
if not isEmpty(args['ZeigeNichtInStraße']) then
z = '<td>[[ZeigeNichtInStraße::'..args['ZeigeNichtInStraße']..']]</td>'
end
t=t..z..'</tr>'
end
if not c.isEmpty(args.Erstellungsdatum) then
t=t..'<tr>'..
'<td>[[Attribut:Erstellungsdatum|Erstellungsdatum]]</td>'..
'<td colspan="3">'..frame:expandTemplate{title='LinkFormDatum', args={
args.Erstellungsdatum,
'Erstellungsdatum',
'Erstellungstag',
'Erstellungsjahr'}}..'</td>'..
'</tr>'
end
if not c.isEmpty(args['ÜberDatum']) then
t=t..'<tr>'..
'<td>[[Attribut:ÜberDatum|Über Datum]]</td>'..
'<td colspan="3">'..frame:expandTemplate{title='LinkFormDatum', args={
args['ÜberDatum'],
'ÜberDatum',
'ÜberTag',
'ÜberJahr'}}..'</td>'..
'</tr>'
end
if not c.isEmpty(args.Seitennummer) then
t=t..'<tr>'..
'<td>[[Attribut:Seitennummer|Seitennummer]]</td>'..
'<td colspan="3">'..frame:callParserFunction(
'#arraymap', args.Seitennummer, ';', 'x', '[[Seitennummer::x]]') ..'</td>'..
'</tr>'
end
if not c.isEmpty(args.Signatur) then
t=t..'<tr>'..
'<td>[[Attribut:Signatur|Signatur]]</td>'..
'<td colspan="3">[[Signatur::'..args.Signatur..']]</td>'..
'</tr>'
end
if not c.isEmpty(args['Länge']) then
t=t..'<tr>'..
'<td>[[Attribut:Länge|Länge]]</td>'..
'<td colspan="3">'..'[[Länge::'..args['Länge']..']]</td>'..
'</tr>'
end
if not c.isEmpty(args.Lizenz) then
t=t..'<tr>'..
'<td>[[Attribut:Lizenz|Lizenz]]</td>'..
'<td colspan="3">[[Lizenz::'..args.Lizenz..']]</td>'..
'</tr>'
end
if not c.isEmpty(args.Beschreibung) then
t=t..'<tr>'..
'<td>[[Attribut:Beschreibung|Beschreibung]]</td>'..
'<td colspan="3">[[Beschreibung::'..args.Beschreibung..']]</td>'..
'</tr>'
end
if not c.isEmpty(args.UploadCommons) then
t=t..'<tr>'..
'<td>[[Attribut:UploadCommons|Upload zu Wikimedia Commons]]</td>'..
'<td colspan="3">[[UploadCommons::'..args.UploadCommons..']]</td>'..
'</tr>'
end
t=t..'<tr>'..
'<td>[[Bild:IconSearch.svg|16px|semantisches Browsen|link=Spezial:Durchsuchen/{{NAMESPACE}}:{{PAGENAME}}]]</td>'..
'<td colspan="3">[[Spezial:Durchsuchen/{{NAMESPACE}}:{{PAGENAME}}|semantisches Browsen]]</td>'..
'</tr>'
t=t..'</table>'
return t
end
return p