-- Style for football tableslocal pp = function pp.header(t,Args,p_sub,pos_label,group_col,VTE_text,full_table,results_header_txt) -- Load relevant modules local yesno = require('Module:Yesno') -- Create table header -- Pre stuff local team_width = Args['teamwidth'] or '190' local sort_text = local sort_table_val = Args['sortable_table'] or 'no' if yesno(sort_table_val) then sort_text = 'sortable' end table.insert(t,'
'..matches..'\n') -- Played if full_table then table.insert(t,' | '..wins..'\n') -- Won table.insert(t,' | '..losses..'\n') -- Lost if do_ties then table.insert(t,' | '..ties..'\n') -- Ties end table.insert(t,' | '..OTlosses..'\n') -- Lost in OT if do_tiebr then table.insert(t,' | '..tiebr_val..'\n') -- Tiebreaker value end table.insert(t,' | '..gfor..'\n') -- GF table.insert(t,' | '..gaig..'\n') -- GA table.insert(t,' | '..gcomp..'\n') -- Goal comparison end -- Add - for negative point totals table.insert(t,' | ') if points<0 then table.insert(t,'-'..-points..hth_string) else table.insert(t,points..hth_string) end table.insert(t,'\n') return end function pp.status(Args) -- Declare status options -- ------------------------------------------------------------ -- NOTE: If you add to status_code, also add to status_called and status_letters | -- Or functionality will be compromised -- ------------------------------------------------------------ local status_code, status_called = status_code = status_called = local status_letters = 'EPXYZ' -- Status position (before or after read and default) local stat_pos_val = Args['status_pos'] or local status_position = 'before' -- Default location stat_pos_val = string.lower(stat_pos_val) if stat_pos_val'before' then status_position = 'before' elseif stat_pos_val'after' then status_position = 'after' end return end return pp |
---|