モジュール:Gerrit dashboard/Multimedia

提供: ひつじ小屋別館2代目
移動先: 案内検索

このモジュールについての説明文ページを モジュール:Gerrit dashboard/Multimedia/doc に作成できます

local dashboard = require( 'Module:Gerrit dashboard' )
local link_to_dashboard = dashboard._link_to_dashboard

local team_members = {}
local projects = {}

local dashboard_def = {}

local add_ext = function ( ext, limit )
	local proj = 'mediawiki/extensions/' .. ext
	
	limit = limit or 10

	table.insert( dashboard_def, { ext, {
		{ 'project', proj },
		{ 'status', 'open' },
		{ 'limit', limit }
	} } )
	
	table.insert( projects, proj )
end

local add_team_member = function ( member, name )
	table.insert( dashboard_def, { member .. ' core', {
		{ 'project', 'mediawiki/core' },
		{ 'status', 'open' },
		{ 'owner', name }
	} } )
	
	table.insert( team_members, { member, name } )
end

local get_all_possible_constraints = function ()
	local constrs = {}
	
	for _, tm in ipairs( team_members ) do
		table.insert( constrs, { 'owner', tm[2] } )
	end
	
	for _, p in ipairs( projects ) do
		table.insert( constrs, { 'project', p } )
	end
	
	return constrs
end

add_ext( 'BetaFeatures' )
add_ext( 'MultimediaViewer' )
add_ext( 'CommonsMetadata' )

add_team_member( 'marktraceur', 'MarkTraceur' )
add_team_member( 'bd808', 'BryanDavis' )
add_team_member( 'Gergő Tisza', '"Gergő Tisza"' )

add_ext( 'UploadWizard' )

table.insert( dashboard_def, { 'Recently merged', {
	{ 'status', 'merged' },
	{ 'NOT', { 'owner', 'L10n-bot' } },
	{ 'OR', get_all_possible_constraints() },
	{ 'limit', 20 }
} } )

return {
	link = function ( frame )
		return link_to_dashboard( dashboard_def, 'Multimedia', 'Multimedia dashboard on Gerrit' ) .. ' <sup>[[Module:Gerrit dashboard/Multimedia|(source)]]</sup>'
	end
}