11.314
suntingan
dw>Izno (add templatestyles for hlist) |
(←Membuat halaman berisi 'local p = {} local cfg = mw.loadData('Module:Navbar/configuration') local function get_title_arg(is_collapsible, template) local title_arg = 1 if is_collapsible then title_arg = 2 end if template then title_arg = 'template' end return title_arg end local function choose_links(template, args) -- The show table indicates the default displayed items. -- view, talk, edit, hist, move, watch -- TODO: Move to configuration. local show = {true, true, true, fals...') |
||
Baris 63: | Baris 63: | ||
-- link_descriptions should be easier... | -- link_descriptions should be easier... | ||
local link_descriptions = { | local link_descriptions = { | ||
{ ['mini'] = ' | { ['mini'] = 'l', ['full'] = 'lihat', ['html_title'] = 'Lihat templat ini', | ||
['link'] = title.fullText, ['url'] = false }, | ['link'] = title.fullText, ['url'] = false }, | ||
{ ['mini'] = ' | { ['mini'] = 'b', ['full'] = 'bicara', ['html_title'] = 'Diskusikan templat ini', | ||
['link'] = talkpage, ['url'] = false }, | ['link'] = talkpage, ['url'] = false }, | ||
{ ['mini'] = ' | { ['mini'] = 's', ['full'] = 'sunting', ['html_title'] = 'Sunting templat ini', | ||
['link'] = title:fullUrl('action=edit'), ['url'] = true }, | ['link'] = title:fullUrl('action=edit'), ['url'] = true }, | ||
{ ['mini'] = ' | { ['mini'] = 'r', ['full'] = 'riwayat', ['html_title'] = 'Riwayat templat ini', | ||
['link'] = title:fullUrl('action=history'), ['url'] = true }, | ['link'] = title:fullUrl('action=history'), ['url'] = true }, | ||
{ ['mini'] = 'm', ['full'] = ' | { ['mini'] = 'm', ['full'] = 'pindah', ['html_title'] = 'Pindahkan templat ini', | ||
['link'] = mw.title.new('Special:Movepage'):fullUrl('target='..title.fullText), ['url'] = true }, | ['link'] = mw.title.new('Special:Movepage'):fullUrl('target='..title.fullText), ['url'] = true }, | ||
{ ['mini'] = 'w', ['full'] = ' | { ['mini'] = 'w', ['full'] = 'pantau', ['html_title'] = 'Pantau templat ini', | ||
['link'] = title:fullUrl('action=watch'), ['url'] = true } | ['link'] = title:fullUrl('action=watch'), ['url'] = true } | ||
} | } | ||
Baris 151: | Baris 151: | ||
end | end | ||
return mw.getCurrentFrame():extensionTag{ | |||
name = 'templatestyles', args = { src = cfg.templatestyles } | name = 'templatestyles', args = { src = cfg.templatestyles } | ||
} .. tostring(div:done()) | } .. tostring(div:done()) |