|
|
(49 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) |
Zeile 1: |
Zeile 1: |
| local p = {} --p stands for package | | local p = {} |
| local c = require( "Module:Common" ) | | --local c = require( "Module:Common" ) |
| | local f = require( "Module:Datei" ) |
|
| |
|
| function p.Faktenbox( frame ) | | function p.Faktenbox( frame ) |
| pf = frame:getParent() | | pf = frame:getParent() |
| args = pf.args | | args = pf.args |
| t1 = p.Daten( frame, args ) | | t = f.Daten( frame, args ) |
| t2 = p.NewBox( frame, args )
| | return frame:preprocess(t) |
| return frame:preprocess(t1..'<br/>\n'..t2) | |
| end
| |
| | |
| function p.NewBox( frame, args )
| |
| t = '<table class="wikitable">'..
| |
| '<th colspan="4">'..mw.title.getCurrentTitle().text..'</th>'
| |
| for i=1,6 do
| |
| t=t..'<tr><td>Attribut'..i..'</td></tr>'
| |
| end
| |
| if not isEmpty(args.Genre) then
| |
| t=t..'<tr>'..
| |
| '<td>[[Attribut:Genre|Genre]]</td>' ..
| |
| '<td colspan="3">' ..
| |
| frame:callParserFunction(
| |
| '#arraymap', args.Genre, ';', 'x', '[[:Kategorie:x|x]]') .. '</td>' ..
| |
| '</tr>'
| |
| end
| |
| if not isEmpty(args.Urheber) then
| |
| t=t..'<tr>'..
| |
| '<td>[[Attribut:Urheber|Urheber]]</td>' ..
| |
| '<td colspan="3">' .. args.Urheber ..'</td>'..
| |
| '</tr>'
| |
| end
| |
| if not isEmpty(args.Quellangaben) then
| |
| t=t..'<tr>'..
| |
| '<td>[[Attribut:Quellangaben|Quellangaben]]</td>'..
| |
| '<td colspan="3">'..args.Quellangaben..'</td>'..
| |
| '</tr>'
| |
| end
| |
| if not isEmpty(args.Ort) then
| |
| t = t .. '<tr>'..
| |
| '<td>[[Attribut:Ort|Ort]]</td>'..
| |
| '<td>'..frame:callParserFunction(
| |
| '#arraymap', args.Ort, ';', 'x', '[[x]]') ..'</td>'..
| |
| '<td><b>ausblenden:</b></td>'
| |
| z = '<td></td>'
| |
| if not isEmpty(args.ZeigeNichtInOrt) then
| |
| z = '<td>'..args.ZeigeNichtInOrt..'</td>'
| |
| end
| |
| t=t..z..'</tr>'
| |
| end
| |
| if not isEmpty(args.Strasse) then
| |
| t=t..'<tr>'..
| |
| '<td>[[Attribut:Strasse|Straße]]</td>'..
| |
| '<td>'..frame:callParserFunction(
| |
| '#arraymap', args.Strasse, ';', 'x', '[[x]]') ..'</td>'..
| |
| '<td><b>ausblenden:</b></td>'
| |
| z = '<td></td>'
| |
| if not isEmpty(args.ZeigeNichtInStrasse) then
| |
| z = '<td>'..args.ZeigeNichtInStrasse..'</td>'
| |
| end
| |
| t=t..z..'</tr>'
| |
| end
| |
| t=t..'</table>'
| |
| return t
| |
| end
| |
| | |
| function p.Daten( frame, args )
| |
| t = frame:expandTemplate{title = 'Bild.Daten', args={
| |
| Genre=args.Genre,
| |
| Attribut1=args.Attribut1,
| |
| Wert1=args.Wert1,
| |
| Attribut2=args.Attribut2,
| |
| Wert2=args.Wert2,
| |
| Attribut3=args.Attribut3,
| |
| Wert3=args.Wert3,
| |
| Attribut4=args.Attribut4,
| |
| Wert4=args.Wert4,
| |
| Attribut5=args.Attribut5,
| |
| Wert5=args.Wert5,
| |
| Attribut6=args.Attribut6,
| |
| Wert6=args.Wert6,
| |
| Urheber=args.Urheber,
| |
| Quellangaben=args.Quellangaben,
| |
| Ort=args.Ort,
| |
| ZeigeNichtInOrt=args.ZeigeNichtInOrt,
| |
| Strasse=args.Strasse,
| |
| Hausnummer=args.Hausnummer,
| |
| ZeigeNichtInStrasse=args.ZeigeNichtInStrasse,
| |
| Erstellungsdatum=args.Erstellungsdatum,
| |
| UeberDatum=args.UeberDatum,
| |
| Seitennummer=args.Seitennummer,
| |
| Signatur=args.Signatur,
| |
| Beschreibung=args.Beschreibung,
| |
| Lizenz=args.Lizenz}
| |
| }
| |
| return t
| |
| end | | end |
|
| |
|
| return p | | return p |