Modul:Person: Unterschied zwischen den Versionen
Aus FürthWiki
Keine Bearbeitungszusammenfassung |
Keine Bearbeitungszusammenfassung |
||
| Zeile 1: | Zeile 1: | ||
local p = {} --p stands for package | local p = {} --p stands for package | ||
function p.Faktenbox( frame ) | function p.Faktenbox(frame) | ||
local args = frame:getParent().args | |||
local tpl_bild = p.Bild(frame, args) | |||
local tab_bild='' | |||
tab_bild='' | |||
if tpl_bild:gsub("%s+", "") ~= '' then | if tpl_bild:gsub("%s+", "") ~= '' then | ||
tab_bild='<tab name=Bild>' .. | tab_bild='<tab name=Bild>' .. | ||
| Zeile 14: | Zeile 12: | ||
-- The tab "Daten" is visible everytime | -- The tab "Daten" is visible everytime | ||
tpl_daten = p. | local tpl_daten = p.daten(frame, args) | ||
tab_daten='<tab name=Daten>' .. | local tab_daten='<tab name=Daten>' .. | ||
tpl_daten .. '</tab>' | tpl_daten .. '</tab>' | ||
tpl_funktionen = p. | local tpl_funktionen = p.funktionen(frame, args) | ||
tab_funktionen='' | local tab_funktionen='' | ||
if tpl_funktionen:gsub("%s+", "") ~= '' then | if tpl_funktionen:gsub("%s+", "") ~= '' then | ||
tab_funktionen='<tab name=Funktionen>' .. | tab_funktionen='<tab name=Funktionen>' .. | ||
| Zeile 25: | Zeile 23: | ||
end | end | ||
tpl_auszeichnungen = p. | local tpl_auszeichnungen = p.auszeichnungen(frame, args) | ||
tab_auszeichnungen='' | local tab_auszeichnungen='' | ||
if tpl_auszeichnungen:gsub("%s+", "") ~= '' then | if tpl_auszeichnungen:gsub("%s+", "") ~= '' then | ||
tab_auszeichnungen='<tab name=Auszeichnungen>' .. | tab_auszeichnungen='<tab name=Auszeichnungen>' .. | ||
| Zeile 32: | Zeile 30: | ||
end | end | ||
tpl_adressen = p. | local tpl_adressen = p.adressen(frame, args) | ||
tab_adressen = '' | local tab_adressen = '' | ||
if tpl_adressen:gsub("%s+", "") ~= '' then | if tpl_adressen:gsub("%s+", "") ~= '' then | ||
tab_adressen = '<tab name=Adressen>' .. | tab_adressen = '<tab name=Adressen>' .. | ||
| Zeile 39: | Zeile 37: | ||
end | end | ||
tpl_familie = p. | local tpl_familie = p.familie(frame, args) | ||
tab_familie='' | local tab_familie='' | ||
if tpl_familie:gsub("%s+", "") ~= '' then | if tpl_familie:gsub("%s+", "") ~= '' then | ||
tab_familie='<tab name=Familie>' .. | tab_familie='<tab name=Familie>' .. | ||
| Zeile 46: | Zeile 44: | ||
end | end | ||
tpl_beziehungen = p. | local tpl_beziehungen = p.beziehungen(frame, args) | ||
tab_beziehungen='' | local tab_beziehungen='' | ||
if tpl_beziehungen:gsub("%s+", "") ~= '' then | if tpl_beziehungen:gsub("%s+", "") ~= '' then | ||
tab_beziehungen='<tab name=Beziehungen>' .. | tab_beziehungen='<tab name=Beziehungen>' .. | ||
| Zeile 53: | Zeile 51: | ||
end | end | ||
t ='<div class=factbox><tabs>' .. | local t ='<div class=factbox><tabs>' .. | ||
tab_bild .. | tab_bild .. | ||
tab_daten .. | tab_daten .. | ||
| Zeile 67: | Zeile 65: | ||
end | end | ||
function p. | function p.bild(frame, args) | ||
return frame:expandTemplate{title = 'Bildertab', args=args} | |||
end | end | ||
function p. | function p.daten(frame, args) | ||
return frame:expandTemplate{title = 'Person/Daten', args=args} | |||
end | end | ||
function p. | function p.funktionen (frame, args) | ||
return frame:expandTemplate{title = 'Person/Funktionen'} | |||
end | end | ||
function p. | function p.auszeichnungen (frame, args) | ||
return frame:expandTemplate{title = 'Person/Auszeichnungen'} | |||
end | end | ||
function p. | function p.adressen (frame, args) | ||
t = frame:expandTemplate{title = 'Adressen'} | t = frame:expandTemplate{title = 'Adressen'} | ||
return t | return t | ||
end | end | ||
function p. | function p.familie (frame, args) | ||
t = frame:expandTemplate{title = 'Person/Familie'} | t = frame:expandTemplate{title = 'Person/Familie'} | ||
return t | return t | ||
end | end | ||
function p. | function p.beziehungen (frame, args) | ||
return frame:expandTemplate{title = 'Person/Beziehungen'} | |||
end | end | ||
return p | return p | ||
Version vom 24. August 2025, 13:11 Uhr
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 = 'Bildertab', 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)
t = frame:expandTemplate{title = 'Adressen'}
return t
end
function p.familie (frame, args)
t = frame:expandTemplate{title = 'Person/Familie'}
return t
end
function p.beziehungen (frame, args)
return frame:expandTemplate{title = 'Person/Beziehungen'}
end
return p