Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Documentation for this module may be created at Module:Requests dashboard/doc

local p = {}

local function mark(link, count)
	local div = mw.html.create( 'span' )
	if tonumber(count) ~= 0 then
		div:css('background', 'rgba(85, 85, 255, 0.25)'):css('font-weight', 'bold')
	end
	div:wikitext(link)
	div:done()
	local sb = mw.html.create( 'sub' )
	if tonumber(count) ~= 0 then
		sb:css('font-weight', 'bold')
	end
	sb:wikitext(tonumber(count))
	sb:done()
	return tostring(div)..tostring(sb).."‌"
end

function p.dashboard(frame)
	local checkuser = frame.args[1]
	local global = frame.args[2]
	local deletions = frame.args[3]
	local restricted = frame.args[4]
	local permissions = frame.args[5]
	local reports = frame.args[6]
	local closure = frame.args[7]
	local misc = frame.args[8]
	local reopen = frame.args[9]
	local an = frame.args[10]
    local iswc = frame:preprocess('{{#ifgroup:wiki-creator|・[[mh:wikicreators:Flagged wikis|Flag Review]]}}')


    local total = checkuser + global + deletions + restricted + permissions + reports + closure + misc + reopen
    
    local congrats = ''
    if total == 0 then
    	congrats = ' 🎉 Resolved all requests!'
    end
    
    local totaltext = frame:expandTemplate{ title = 'small', args = { 'Total: '..total..congrats } }
    
    local purge = frame:expandTemplate{ title = 'purge', args = {} }
    local navbox = frame:expandTemplate{ title = 'navbox', args = {
    	title = 'Requests dashboard ['..purge..']',
    	name = 'Requests dashboard',
    	group1 = '[[Steward requests]]',
    	list1 = mark('[[Steward_requests/CheckUser|CheckUser]]', checkuser)..'・'..
    		mark('[[Steward_requests/Global|Global]]', global)..'・'..
    		mark('[[Steward_requests/(Un)deletions|(Un)deletions]]', deletions)..'・'..
    		mark('[[Steward_requests/Restricted changes|Restricted]]', restricted)..'・'..
    		mark('[[Steward_requests/Permissions|Permissions]]', permissions)..'・'..
    		mark('[[Steward_requests/Wiki reports|Reports]]', reports)..'・'..
    		mark('[[Steward_requests/Discussion closure|Discuss closure]]', closure)..'・'..
    		mark('[[Steward_requests/Requests for reopening wikis|Reopen wikis]]', reopen)..'・'..
    		mark('[[Steward_requests/Miscellaneous|Miscellaneous]]', misc)..' '..totaltext,
    	group2 = '[[Tech:Volunteers|Tech requests]] actions',
    	list2 = '[[Special:RequestImportQueue|Requested import dump]]・[[Special:RequestSSLQueue|Requested SSL certs]]・[[phab:|Phorge]]',
    	group3 = 'Other',
    	list3 = mark('[[Meta:Administrators\' noticeboard|Admins\' noticeboard]]', an)..'・[[Special:RequestWikiQueue|Requested wikis]]・[[Special:GlobalRenameQueue|Global rename]]'..iswc,
    	state = 'uncollapsed',
		bodystyle = 'background-color:var(--background-color-base, #fff), width:100%; vertical-align:middle; display:inherit;',
		titlestyle = 'background-color:rgba(85, 85, 255, 0.38); padding-left:1em; padding-right:1em; text-align:center;',
		abovestyle = 'background-color:rgba(85, 85, 255, 0.25); padding-left:1em; padding-right:1em; text-align:center;',
		belowstyle = 'background-color:rgba(85, 85, 255, 0.25); padding-left:1em; padding-right:1em; text-align:center;',
		groupstyle = 'background-color:rgba(85, 85, 255, 0.25); padding-left:1em; padding-right:1em; text-align:right;',
		liststyle = 'background:transparent; text-align:left/center;',
		oddstyle = 'background:transparent;',
		evenstyle = 'background-color:var(--background-color-neutral-subtle, #f8f9fa);'
    } }

    return navbox
end

return p
Cookies help us deliver our services. By using our services, you agree to our use of cookies.