Module:Numlinks 2-num: Difference between revisions
mNo edit summary |
mNo edit summary |
||
| Line 73: | Line 73: | ||
local row = {} | local row = {} | ||
for i = 1, num_cols do | for i = 1, num_cols do | ||
local num_2 = format_number( | local num_2 = format_number(j - row_offset, is_ordinal_2) | ||
local num_1 = format_number( | local num_1 = format_number(i - col_offset, is_ordinal_1) | ||
if i == | if i == col_offset and j == row_offset then | ||
table.insert(row, make_current(num_1, num_2)) -- Text is for the current page | table.insert(row, make_current(num_1, num_2)) -- Text is for the current page | ||
else | else | ||
| Line 94: | Line 94: | ||
table.insert(lines, '|-') | table.insert(lines, '|-') | ||
for i = 1, num_cols do | for i = 1, num_cols do | ||
if i == | if i == col_offset then | ||
if j == | if j == row_offset then | ||
-- Insert text for current-page cell | -- Insert text for current-page cell | ||
table.insert(lines, string.format('| style="width: %d%%;" | %s', middle_cell_width, links[i][j])) | table.insert(lines, string.format('| style="width: %d%%;" | %s', middle_cell_width, links[i][j])) | ||