82.367
Bearbeitungen
Keine Bearbeitungszusammenfassung |
Keine Bearbeitungszusammenfassung |
||
| Zeile 3: | Zeile 3: | ||
function p.daten(frame, args) | function p.daten(frame, args) | ||
local title = mw.title.getCurrentTitle().text | |||
local extension = p.getExtension(title) | |||
local a, w, z | local a, w, z | ||
local t = '<table class="wikitable">'.. | |||
'<th colspan="4">' . | local t = '<table class="wikitable">' .. | ||
'<th colspan="4">' .. title .. '</th>' | |||
if not c.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>' .. | ||
'<td colspan="3">'..frame:callParserFunction( | '<td colspan="3">'..frame:callParserFunction( | ||
| Zeile 107: | Zeile 110: | ||
'</tr>' | '</tr>' | ||
end | end | ||
if not c.isEmpty(extension) then | |||
t=t..'<tr>'.. | |||
'<td>[[Attribut:Dateityp|Dateityp]]</td>'.. | |||
'<td colspan="3">[[Dateityp::'..extension..']]</td>'.. | |||
'</tr>' | |||
end | |||
if not c.isEmpty(args['Länge']) then | if not c.isEmpty(args['Länge']) then | ||
| Zeile 143: | Zeile 153: | ||
return t | return t | ||
end | end | ||
function p.getExtension(filename) | |||
return filename:match("^.+%.([^%.]+)$") | |||
end | |||
return p | return p | ||