الفرق بين المراجعتين لصفحة: «وحدة:Lua banner»
تم حذف المحتوى تمت إضافة المحتوى
لا ملخص تعديل |
لا ملخص تعديل |
||
سطر 1:
-- This module implements the {{lua}} template.
local yesno = require('
local mList = require('
local mTableTools = require('
local mMessageBox = require('
local p = {}
سطر 18:
return p._main(args)
end
function p._main(args)
السطر 24 ⟵ 23:
local box = p.renderBox(modules)
local trackingCategories = p.renderTrackingCategories(args, modules)
▲ return box .. (trackingCategories or '')
end
السطر 35 ⟵ 29:
local boxArgs = {}
if #modules < 1 then
boxArgs.text = '<strong class="error">
else
local moduleLinks = {}
السطر 44 ⟵ 38:
boxArgs.text = 'This ' ..
(mw.title.getCurrentTitle():inNamespaces(828,829) and 'module' or 'template') ..
'
end
boxArgs.type = 'notice'
السطر 61 ⟵ 55:
-- Error category
if #modules < 1 then
cats[#cats + 1] = '
end
السطر 78 ⟵ 72:
if not category then
local categories = {
['
['
['
['
}
categories['
category = modules[1] and categories[modules[1]]
category = category or 'Lua-based templates'
السطر 93 ⟵ 87:
templateeditor = 3,
sysop = 4
}
local currentProt = titleObj.protectionLevels["edit"][1]
السطر 108 ⟵ 94:
if moduleProt == nil then moduleProt = 0 else moduleProt = protLevels[moduleProt] end
if moduleProt < currentProt then
cats[#cats + 1] = "
break
end
|