Module:Documentation: Difference between revisions

more comment tweaks
(comment tweaks)
(more comment tweaks)
Line 368:
 
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 protectionTemplate = message('protection-template')
Line 399 ⟶ 404:
 
function p._startBox(args, env)
--[[
-- Generate [view][edit][history][purge] or [create] links.
-- 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 content = args.content
Line 420 ⟶ 433:
 
function p.makeStartBoxLinksData(args, env)
--[[
-- RenderDoes initial processing of data to make the [view] [edit] [history][purge] or [createpurge] 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 = {}
-- Get title objects.
Line 449 ⟶ 476:
 
function p.renderStartBoxLinks(data)
--[[
-- Render the [view][edit][history][purge] or [create] links.
-- GenerateGenerates the [view][edit][history][purge] or [create] links from the data table.
-- @data - a table of data generated by p.makeStartBoxLinksData
--]]
local ret
local docTitle = data.docTitle