Module:Sandbox/B2project/NHL Standings: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
 
(45 intermediate revisions by the same user not shown)
Line 63:
return ret
end
end
 
local function firstnonblank(s1,s2)
if ( s1 and s1:match( '^%s*(.-)%s*$' ) ~= '' ) then
return s1
elseif ( s2 and s2:match( '^%s*(.-)%s*$' ) ~= '' ) then
return s2
end
return nil
end
 
Line 231 ⟶ 222:
return
'{| class="wikitable sortable" width="" style="text-align:center;"\
|+ [[' .. tableHeaderInfo.divisionLink.. '|' .. tableHeaderInfo.division .. ']]' ..tableHeaderInfo.source.. '\
! width=32 | <abbr title="Position">Pos</abbr>\
! width=190 | Team ' .. tableHeaderInfo.navbarText .. '\
Line 500 ⟶ 491:
standingsPage,
mini = 1,
style = 'float:leftright;',
})
Line 561 ⟶ 552:
local matches_text = mw.text.trim(frame.args.matches_text or 'games')
if string.lower(update)=='complete' then
table.insert(t_footer,'Final standings.'..tableHeaderInfo.source..'')
elseif update=='' then
-- Empty
Line 571 ⟶ 562:
table.insert(t_footer,'Updated to '..matches_text..' played on '..update..'.'..tableHeaderInfo.source..'')
end
local stack_footer_val = firstnonblank(mw.text.trim(frame:getParent().args.stack_footer), mw.text.trim(frame.args.stack_footer) or 'no')
local footer_break = false
if yesno(stack_footer_val) then footer_break = true end
return table.concat(outputBuffer), table.concat(t_footer)