در حال ویرایش پودمان:Navbar
این ویرایش را میتوان خنثی کرد. لطفاً تفاوت زیر را بررسی کنید تا تأیید کنید که این چیزی است که میخواهید انجام دهید، سپس تغییرات زیر را ذخیره کنید تا خنثیسازی ویرایش را به پایان ببرید.
نسخهٔ فعلی | متن شما | ||
خط ۱: | خط ۱: | ||
local p = {} | local p = {} | ||
local cfg = mw.loadData('Module:Navbar/configuration') | local cfg = mw.loadData('Module:Navbar/configuration') | ||
local function get_title_arg(is_collapsible, template) | local function get_title_arg(is_collapsible, template) | ||
خط ۱۹: | خط ۱۸: | ||
show[3] = false | show[3] = false | ||
local index = {t = 2, d = 2, e = 3, h = 4, m = 5, w = 6, | local index = {t = 2, d = 2, e = 3, h = 4, m = 5, w = 6, | ||
talk = 2, edit = 3, hist = 4, move = 5, watch = 6} | |||
talk = 2, edit = 3, hist = 4, move = 5, watch = 6 | |||
-- TODO: Consider removing TableTools dependency. | -- TODO: Consider removing TableTools dependency. | ||
for _, v in ipairs(require ('Module:TableTools').compressSparseArray(args)) do | for _, v in ipairs(require ('Module:TableTools').compressSparseArray(args)) do | ||
خط ۶۸: | خط ۶۳: | ||
-- link_descriptions should be easier... | -- link_descriptions should be easier... | ||
local link_descriptions = { | local link_descriptions = { | ||
{ ['mini'] = ' | { ['mini'] = 'v', ['full'] = 'view', ['html_title'] = 'View this template', | ||
['link'] = title.fullText, ['url'] = false }, | ['link'] = title.fullText, ['url'] = false }, | ||
{ ['mini'] = ' | { ['mini'] = 't', ['full'] = 'talk', ['html_title'] = 'Discuss this template', | ||
['link'] = talkpage, ['url'] = false }, | ['link'] = talkpage, ['url'] = false }, | ||
{ ['mini'] = ' | { ['mini'] = 'e', ['full'] = 'edit', ['html_title'] = 'Edit this template', | ||
['link'] = ' | ['link'] = title:fullUrl('action=edit'), ['url'] = true }, | ||
{ ['mini'] = ' | { ['mini'] = 'h', ['full'] = 'hist', ['html_title'] = 'History of this template', | ||
['link'] = ' | ['link'] = title:fullUrl('action=history'), ['url'] = true }, | ||
{ ['mini'] = ' | { ['mini'] = 'm', ['full'] = 'move', ['html_title'] = 'Move this template', | ||
['link'] = mw.title.new(' | ['link'] = mw.title.new('Special:Movepage'):fullUrl('target='..title.fullText), ['url'] = true }, | ||
{ ['mini'] = ' | { ['mini'] = 'w', ['full'] = 'watch', ['html_title'] = 'Watch this template', | ||
['link'] = title:fullUrl('action=watch'), ['url'] = true } | ['link'] = title:fullUrl('action=watch'), ['url'] = true } | ||
} | } | ||
خط ۹۶: | خط ۹۱: | ||
function p._navbar(args) | function p._navbar(args) | ||
-- TODO: We probably don't need both fontstyle and fontcolor... | -- TODO: We probably don't need both fontstyle and fontcolor... | ||
خط ۱۶۴: | خط ۱۵۱: | ||
end | end | ||
return mw.getCurrentFrame():extensionTag{ | |||
name = 'templatestyles', args = { src = cfg.templatestyles } | name = 'templatestyles', args = { src = cfg.templatestyles } | ||
} .. tostring(div:done()) | } .. tostring(div:done()) |