Module:Documentation: Difference between revisions
Jump to navigation
Jump to search
m>Mr. Stradivarius comment tweaks |
m>Mr. Stradivarius more comment tweaks |
||
Line 368: | Line 368: | ||
function p.protectionTemplate(env) | function p.protectionTemplate(env) | ||
-- Generates the padlock icon in the top right. | |||
-- @env - environment table containing title objects, etc., generated with p.getEnvironment | |||
-- Messages: | |||
-- 'protection-template' --> 'pp-template' | |||
-- 'protection-template-args' --> {docusage = 'yes'} | |||
local title = env.title | local title = env.title | ||
local protectionTemplate = message('protection-template') | local protectionTemplate = message('protection-template') | ||
Line 399: | Line 404: | ||
function p._startBox(args, env) | function p._startBox(args, env) | ||
-- | --[[ | ||
-- This function generates the start box. | |||
-- @args - a table of arguments passed by the user | |||
-- @env - environment table containing title objects, etc., generated with p.getEnvironment | |||
-- | |||
-- The actual work is done by p.makeStartBoxLinksData and p.renderStartBoxLinks which make | |||
-- the [view] [edit] [history] [purge] links, and by p.makeStartBoxData and p.renderStartBox | |||
-- which generate the box HTML. | |||
--]] | |||
local links | local links | ||
local content = args.content | local content = args.content | ||
Line 420: | Line 433: | ||
function p.makeStartBoxLinksData(args, env) | function p.makeStartBoxLinksData(args, env) | ||
--[[ | |||
-- Does initial processing of data to make the [view] [edit] [history] [purge] links. | |||
-- @args - a table of arguments passed by the user | |||
-- @env - environment table containing title objects, etc., generated with p.getEnvironment | |||
-- | |||
-- Messages: | |||
-- 'view-link-display' --> 'view' | |||
-- 'edit-link-display' --> 'edit' | |||
-- 'history-link-display' --> 'history' | |||
-- 'purge-link-display' --> 'purge' | |||
-- 'file-docpage-preload' --> 'Template:Documentation/preload-filespace' | |||
-- 'docpage-preload' --> 'Template:Documentation/preload' | |||
-- 'create-link-display' --> 'create' | |||
--]] | |||
local data = {} | local data = {} | ||
-- Get title objects. | -- Get title objects. | ||
Line 449: | Line 476: | ||
function p.renderStartBoxLinks(data) | function p.renderStartBoxLinks(data) | ||
-- | --[[ | ||
-- Generates the [view][edit][history][purge] or [create] links from the data table. | |||
-- @data - a table of data generated by p.makeStartBoxLinksData | |||
--]] | |||
local ret | local ret | ||
local docTitle = data.docTitle | local docTitle = data.docTitle |