Module:Article history: Difference between revisions

Content deleted Content added
Undid revision 642591985 by Mr. Stradivarius (talk) let's keep things the same as the current template until we roll this out
rename noCollapsibleRows to nCollapsibleRows; use a nActionRows variable instead of calculating the number every time; and output the current status row if there is more than one action
Line 1,189:
)
end
local noCollapsibleRowsnActionRows = #actionHtmlObjects + #collapsibleNoticeHtmlObjects
local nCollapsibleRows = nActionRows + #collapsibleNoticeHtmlObjects
-- Find out if we are collapsed or not.
Line 1,195 ⟶ 1,196:
if self.cfg.uncollapsedRows == 'all' then
isCollapsed = false
elseif noCollapsibleRowsnCollapsibleRows == 1 then
isCollapsed = false
else
isCollapsed = noCollapsibleRowsnCollapsibleRows > (tonumber(self.cfg.uncollapsedRows) or 3)
end
 
Line 1,216 ⟶ 1,217:
-- notices are only included in the table if it is collapsed. Action rows
-- are always included.
if isCollapsed or #actionHtmlObjectsnActionRows > 0 then
-- Collapsible table base
local collapsibleTable = tableRoot
Line 1,230 ⟶ 1,231:
:css('font-size', '90%')
 
if noCollapsibleRowsnCollapsibleRows > 1 then
-- Header row
local ctHeader = collapsibleTable
Line 1,261 ⟶ 1,262:
-- Subheadings
if #actionHtmlObjectsnActionRows > 0 then
collapsibleTable
:tag('tr')
Line 1,292 ⟶ 1,293:
-- Current status.
if isCollapsed and noCollapsibleRowsnActionRows > 1 then
local statusText
if statusObj then