Content deleted Content added
Lets use words when using abbreviation tags |
use TemplateStyles (supports mobile now better and generally customizing stuff); remove style= as it was almost exclusively setting float and clear (and removing the style on the background, which should probably just be the default wikitable rather than white); moved some table paddings to be margins |
||
Line 48:
return nil
end
local style = ''▼
local styleInline = ''▼
local status = rfxObject:getStatus()
if status == 'pending closure' then▼
end▼
local page = rfxObject:getTitleObject().prefixedText
local user = rfxObject.user or rfxObject:getTitleObject().subpageText
Line 70 ⟶ 64:
votes = mw.ustring.format( [==[
|
|
|
|
colour, percent
)
else
votes = '\n| colspan="4"
end
if status then
Line 87 ⟶ 81:
status = 'Pending closure...'
end
status =
else
status = '\n|
end
local endTime = rfxObject.endTime
Line 96 ⟶ 90:
local time
if endTime and timeLeft then
time = mw.ustring.format( '\n|
else
time = '\n| colspan="2"
end
local dupes = rfxObject:dupesExist()
if dupes then
dupes = '<span class="
elseif dupes == false then
dupes = 'no'
Line 110 ⟶ 104:
local report = rfxObject:getReport()
if report then
report = mw.ustring.format( '\n|
else
report = '\n|
▲ end
▲ if status == 'pending closure' then
pending_class = 'class="rfx-report-pending"'
end
return mw.ustring.format(
'\n|-%s\n|
)
end
Line 131 ⟶ 129:
end
return mw.ustring.format(
'\n|-\n! scope="col" | %s 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',
rfxCaps
)
Line 180 ⟶ 178:
local purgeLink = mw.title.getCurrentTitle():fullUrl( 'action=purge' )
local header = mw.ustring.format(
'\n|+ Requests for [[Wikipedia:Requests for adminship|adminship]] and [[Wikipedia:Requests for bureaucratship|bureaucratship]] <span class="rfx-report-purge plainlinks
purgeLink
)
local rows = makeReportRows() or ''
if rows == '' then
rows = '\n|-\n| colspan="10" | No current discussions. <
end
local style = args.style▼
if not style then▼
if
float = nil
▲ local clear = args.clear or 'left'
style = mw.ustring.format(▼
▲ )
end
return mw.ustring.format( '\n{| class="wikitable" %s%s%s\n|-\n|}', style, header, rows )▼
if not clear or mw.text.trim(clear) == '' then
clear = nil
end
▲ local style = ''
'style="%s%s"',
clear and ('clear: ' .. clear .. ';') or '',
float and ('float: ' .. float .. ';') or ''
)
end
return mw.getCurrentFrame():extensionTag{
name = 'templatestyles', args = { src = 'Module:RFX report/styles.css' }
} .. mw.ustring.format(
▲
style,
header,
rows
)
end
|