Module:RFX report: Difference between revisions

Content deleted Content added
remove debugging stuff and update the submodule name
get rid of the antiquarian html, plus a couple of small fixes
Line 136:
local daysLeft
if secondsLeft <= 0 then
daysLeft = 'expiredPending closure...'
else
daysLeft = mw.ustring.gsub( lang:formatDuration(secondsLeft, {'days', 'hours'}), ' and', ',')
Line 162:
 
local function makeReportRows(rfxType)
local ret = ''
for i, rfx in ipairs(r[rfxType]) do
local dups
Line 171:
end
local style = ''
iflocal r[rfxType][i].timeLeftstyleInline == 'expired' then
if r[rfxType][i].timeLeft == 'Pending closure...' then
style = ' style="background: #f8cdc6;" |'
styleInline = ' background: #f8cdc6;'
end
local page = r[rfxType][i].page
Line 179 ⟶ 181:
 
|-
|%s | [[%s|%s]]
| alignstyle="text-align: right";%s" | [[%s#Support|%d]]
| alignstyle="text-align: right";%s" | [[%s#Oppose|%d]]
| alignstyle="text-align: right";%s" | [[%s#Neutral|%d]]
| alignstyle="text-align: right"; style="background: #%s;" | %d
|%s | %s
|%s | %s
| style="text-align: right;%s" | %s
|%s | <center>%s</center>
|%s | %s]==],
style, page, r[rfxType][i].user,
stylestyleInline, page, r[rfxType][i].support,
stylestyleInline, page, r[rfxType][i].oppose,
stylestyleInline, page, r[rfxType][i].neutral,
colour, r[rfxType][i].percent,
style, r[rfxType][i].endTime,
style, r[rfxType][i].timeLeft,
stylestyleInline, dups,
style, r[rfxType][i].report
)
Line 207 ⟶ 209:
makeRfxTables('rfb')
local alignfloat = args.float or args.align or 'right'
local clear = args.clear or 'left'
Line 214 ⟶ 216:
ret = ret .. args.style
else
ret = ret .. 'align="' .. align .. '" cellspacing="0" cellpadding="0" style="white-space:wrap; clear: ' .. clear .. '; '
.. 'margin-top: 0em; margin-bottom: .5em; float: ' .. alignfloat .. '; '
.. 'padding: .5em 0em 0em 1.4em; background: none#ffffff;" '
.. 'border-collapse: collapse; border-spacing: 0;"'
end
if #r.rfa > 0 then