Modul:Person
Aus FürthWiki
Seiten-Übersicht
| Hauptseite | Unterseiten | ||
|---|---|---|---|
| Allgemein | |||
| Faktenbox | Vorlagen | ||
| Formulare |
|
||
| Module | |||
| Abfrage | Vorlagen |
| |
| Formulare |
| ||
| Sonstige | |||
Siehe auch
local p = {} --p stands for package
function p.Faktenbox(frame)
local args = frame:getParent().args
local tpl_bild = p.bild(frame, args)
local tab_bild=''
if tpl_bild:gsub("%s+", "") ~= '' then
tab_bild='<tab name=Bild>' ..
tpl_bild .. '</tab>'
end
-- The tab "Daten" is visible everytime
local tpl_daten = p.daten(frame, args)
local tab_daten='<tab name=Daten>' ..
tpl_daten .. '</tab>'
local tpl_funktionen = p.funktionen(frame, args)
local tab_funktionen=''
if tpl_funktionen:gsub("%s+", "") ~= '' then
tab_funktionen='<tab name=Funktionen>' ..
tpl_funktionen .. '</tab>'
end
local tpl_auszeichnungen = p.auszeichnungen(frame, args)
local tab_auszeichnungen=''
if tpl_auszeichnungen:gsub("%s+", "") ~= '' then
tab_auszeichnungen='<tab name=Auszeichnungen>' ..
tpl_auszeichnungen .. '</tab>'
end
local tpl_adressen = p.adressen(frame, args)
local tab_adressen = ''
if tpl_adressen:gsub("%s+", "") ~= '' then
tab_adressen = '<tab name=Adressen>' ..
tpl_adressen .. '</tab>'
end
local tpl_familie = p.familie(frame, args)
local tab_familie=''
if tpl_familie:gsub("%s+", "") ~= '' then
tab_familie='<tab name=Familie>' ..
tpl_familie .. '</tab>'
end
local tpl_beziehungen = p.beziehungen(frame, args)
local tab_beziehungen=''
if tpl_beziehungen:gsub("%s+", "") ~= '' then
tab_beziehungen='<tab name=Beziehungen>' ..
tpl_beziehungen .. '</tab>'
end
local t ='<div class=factbox><tabs>' ..
tab_bild ..
tab_daten ..
tab_funktionen ..
tab_auszeichnungen ..
tab_adressen..
tab_familie ..
tab_beziehungen ..
'</tabs></div>'
-- Use preprocess to render the factbox and all contens at once
return frame:preprocess(t)
end
function p.bild(frame, args)
return frame:expandTemplate{title = 'CommonTabs/Bild', args=args}
end
function p.daten(frame, args)
return frame:expandTemplate{title = 'Person/Daten', args=args}
end
function p.funktionen (frame, args)
return frame:expandTemplate{title = 'Person/Funktionen'}
end
function p.auszeichnungen (frame, args)
return frame:expandTemplate{title = 'Person/Auszeichnungen'}
end
function p.adressen (frame, args)
return frame:expandTemplate{title = 'CommonTabs/Adressen'}
end
function p.familie (frame, args)
return frame:expandTemplate{title = 'Person/Familie'}
end
function p.beziehungen (frame, args)
return frame:expandTemplate{title = 'Person/Beziehungen'}
end
return p