Module:RFX report and Module:RFX report/sandbox: Difference between pages
Appearance
(Difference between pages)
Content deleted Content added
update from /sandbox. Implements support for RRfAs |
oh it's twice |
||
Line 42: | Line 42: | ||
end |
end |
||
return t |
return t |
||
⚫ | |||
⚫ | |||
⚫ | |||
return '{{tooltip|RfA|Requests for adminship}}' |
|||
⚫ | |||
return '{{tooltip|RfB|Requests for bureaucratship}}' |
|||
⚫ | |||
return '{{tooltip|RRfA|Reconfirmation requests for adminship}}' |
|||
⚫ | |||
⚫ | |||
⚫ | |||
end |
end |
||
Line 110: | Line 122: | ||
dupes = '--' |
dupes = '--' |
||
end |
end |
||
local rfxtype = mw.ustring.format( '\n| %s', rfxCapsTooltip(rfxObject.type)) |
|||
local report = rfxObject:getReport() |
local report = rfxObject:getReport() |
||
if report then |
if report then |
||
Line 121: | Line 134: | ||
end |
end |
||
return mw.ustring.format( |
return mw.ustring.format( |
||
'\n|-%s\n| |
'\n|-%s%s\n|[[%s|%s]]%s%s%s\n| class="rfx-report-dupes" | %s%s', |
||
pending_class, page, user, votes, status, time, dupes, report |
pending_class, rfxtype, page, user, votes, status, time, dupes, report |
||
) |
|||
⚫ | |||
⚫ | |||
local frame = mw.getCurrentFrame() |
|||
local rfxCaps |
|||
⚫ | |||
rfxCaps = 'RfA' |
|||
⚫ | |||
rfxCaps = 'RfB' |
|||
⚫ | |||
rfxCaps = 'RRfA' |
|||
⚫ | |||
⚫ | |||
⚫ | |||
return mw.ustring.format( |
|||
⚫ | '\n|-\n! scope="col" | |
||
rfxCaps |
|||
) |
) |
||
end |
end |
||
Line 173: | Line 168: | ||
local ret = {} |
local ret = {} |
||
if #rfas + #rrfas > 0 then |
if #rfas + #rrfas + #rfbs > 0 then |
||
⚫ | table.insert( ret, '\n|-\n! scope="col" | type !! scope="col" | Candidate !! scope="col" | <abbr title="Support">S</abbr> !! scope="col" | <abbr title="Oppose">O</abbr> !! scope="col" | <abbr title="Neutral">N</abbr> !! scope="col" | <abbr title="Support percentage (%%)">S %%</abbr> !! scope="col" | Status !! scope="col" | Ending (UTC) !! scope="col" | Time left !! scope="col" | <abbr title="Has duplicate votes?">Dups?</abbr> !! scope="col" | Report' ) |
||
table.insert( ret, makeHeading( 'rfa' ) ) |
|||
for i, rfaObject in ipairs( rfas ) do |
for i, rfaObject in ipairs( rfas ) do |
||
table.insert( ret, makeRow( rfaObject ) ) |
table.insert( ret, makeRow( rfaObject ) ) |
||
Line 181: | Line 176: | ||
table.insert( ret, makeRow( rrfaObject ) ) |
table.insert( ret, makeRow( rrfaObject ) ) |
||
end |
end |
||
end |
|||
if #rfbs > 0 then |
|||
table.insert( ret, makeHeading( 'rfb' ) ) |
|||
for i, rfbObject in ipairs( rfbs ) do |
for i, rfbObject in ipairs( rfbs ) do |
||
table.insert( ret, makeRow( rfbObject ) ) |
table.insert( ret, makeRow( rfbObject ) ) |