Difference between revisions 51834 and 51835 on wikimaniawiki

-- This module implements {{documentation}}.

-- Get required modules.
local getArgs = require('Module:Arguments').getArgs
local htmlBuilder = require('Module:HtmlBuilder')
local messageBox = require('Module:Message box')

-- Get the config table.
(contracted; show full)		ret = '[%s] [%s] [%s] [%s]'
		ret = ret:gsub('%[', '[') -- Replace square brackets with HTML entities.
		ret = ret:gsub('%]', ']')
		ret = mw.ustring.format(ret, viewLink, editLink, historyLink, purgeLink)
	else
		ret = makeUrlLink(docTitle:fullUrl{action = 'edit', preload = data.preload}, data.createLinkDisplay)
	end

	return ret
end

function p.makeStartBoxData(args, env, links)
	--[=[
	-- Does initial processing of data to pass to the start-box render function, p.renderStartBox.
	-- @args - a table of arguments passed by the user
	-- @env - environment table containing title objects, etc., generated with p.getEnvironment
	-- @links - a string containing the [view][edit][history][purge] links - could be nil if there's an error.
(contracted; show full)	if message('display-strange-usage-category', nil, 'boolean') and (subpage == message('doc-subpage') or subpage == message('testcases-subpage')) then
		local sort = (title.namespace == 0 and message('strange-usage-category-mainspace-sort') or '') .. title.prefixedText -- Sort on namespace.
		ret = ret .. makeCategoryLink(message('strange-usage-category'), sort)
	end
	return ret
end

return p