Module:Infobox: Difference between revisions
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
local p = {} | local p = {} | ||
local function put_adjacent_x_links(s, prev_x, next_x) | local function put_adjacent_x_links(title, s, prev_x, next_x) | ||
return s .. '<table style="width: 100%; margin: 0"><tr>' | return s .. '<table style="width: 100%; margin: 0"><tr>' | ||
.. '<td style="width: 15%; text-align: left; white-space: nowrap; font-size: smaller">' | .. '<td style="width: 15%; text-align: left; white-space: nowrap; font-size: smaller">' | ||
| Line 32: | Line 32: | ||
local has_adjacent = (prev_link and #prev_link > 0) or (next_link and #next_link > 0) | local has_adjacent = (prev_link and #prev_link > 0) or (next_link and #next_link > 0) | ||
if has_adjacent then | if has_adjacent then | ||
put_adjacent_x_links(title, s, prev_x, next_x) | |||
else | else | ||
s = s .. title | s = s .. title | ||
| Line 87: | Line 77: | ||
end | end | ||
if has_adjacent_x then | if has_adjacent_x then | ||
put_adjacent_x_links(s, prev_x, next_x) | put_adjacent_x_links(title, s, prev_x, next_x) | ||
else | else | ||
s = s .. title | s = s .. title | ||