Zeile 1: |
Zeile 1: |
| local p = {} --p stands for package | | local p = {} --p stands for package |
| + | local common = require( "Module:Common" ) |
| | | |
| function p.Faktenbox( frame ) | | function p.Faktenbox( frame ) |
Zeile 30: |
Zeile 31: |
| tpl_gebaeude .. '</tab>' | | tpl_gebaeude .. '</tab>' |
| | | |
− | --tpl_attribute = p.Attribute( frame, args ) | + | tpl_attribute = c.AttributeTable( frame, args ) |
− | --tab_attribute='<tab name=Attribute>' .. | + | tab_attribute='<tab name=Attribute>' .. |
− | --tpl_attribute .. '</tab>' | + | tpl_attribute .. '</tab>' |
| | | |
| t ='<div class=factbox><tabs>' .. | | t ='<div class=factbox><tabs>' .. |
Zeile 39: |
Zeile 40: |
| tab_daten .. | | tab_daten .. |
| tab_gebaeude .. | | tab_gebaeude .. |
− | --tab_attribute .. | + | tab_attribute .. |
| '</tabs></div>' | | '</tabs></div>' |
| | | |
| -- Use preprocess to render the factbox and all contens at once | | -- Use preprocess to render the factbox and all contens at once |
| return frame:preprocess(t) | | return frame:preprocess(t) |
− | end
| |
− |
| |
− | function p.Attribute( frame, args )
| |
− | t='<table class="wikitable">'
| |
− | for i,v in pairs(args) do
| |
− | t = t .. '<tr><td>' .. i .. '</td><td>' .. v .. '</td></tr>'
| |
− | end
| |
− | t = t .. '</table>'
| |
− | return t
| |
| end | | end |
| | | |