Content deleted Content added
No edit summary |
|||
Line 1:
local yesno = require("Module:Yesno")
local _style = {
['3'] = 'style="width: 30%;',
Line 79 ⟶ 75:
function p.top()
return table.concat({'{| class="wikitable" ', style['table']})
end▼
return table.concat({'\n|-',▼
'\n!', style['header leftcell'], 'Preceding station',▼
'\n!', style['header midcell'], data['system title'],▼
'\n!', style['header rightcell'], 'Following station'▼
end
Line 101 ⟶ 89:
for i = 1, #args.line do
local _line = data[i][args.line[i]]
lineTitle[i] = _line['line title']
Line 147 ⟶ 135:
end
end
table.insert(t, table.concat({'\n|-',▼
if args.system[i] then
▲ '\n!', style['header leftcell'], 'Preceding station',
▲ '\n!', style['header midcell'], data[i]['system title'],
▲ '\n!', style['header rightcell'], 'Following station'})
else
header = ''
end
'\n|-',
'\n|', style['body leftcell'], left[i], leftTerminus[i],
'\n|', style['body banner'], colour[i], '"| ',
Line 165 ⟶ 164:
function p.main(frame)
local args = {
['system'] =
['line'] = {},
['left'] = {},
Line 178 ⟶ 177:
['circularR'] = {}
}
for k, v in pairs(frame:getParent().args) do
Line 190 ⟶ 188:
end
if a == '
args.system[b] = v
elseif a == 'line' then
args.line[b] = v
elseif a == 'left' then
Line 219:
end
local _rows = frame:getParent().args.rows or 'all'▼
for i = 1, #args.line do
▲ local rows = {
if args.system[i] then
['all'] = table.concat({p.top(), p.rail(data), p.line(data, args), p.bottom()}),▼
data[
else
['mid'] = table.concat({p.rail(data), p.line(data, args)}),▼
data[i] = data[i-1]
['bottom'] = table.concat({p.rail(data), p.line(data, args), p.bottom()})▼
end
▲ end
local rows = { -- To be removed. Included for backwards compatibility.
['mid'] = table.concat({p.line(data, args)}),
}
return rows[_rows]▼
return rows[frame:getParent().args.rows]
else
end
end
|