Modul:Navbar: Perbedaan antara revisi

178 bita dihapus ,  9 bulan yang lalu
←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...'
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'] = 'v', ['full'] = 'view', ['html_title'] = 'View this template',
{ ['mini'] = 'l', ['full'] = 'lihat', ['html_title'] = 'Lihat templat ini',
['link'] = title.fullText, ['url'] = false },
['link'] = title.fullText, ['url'] = false },
{ ['mini'] = 't', ['full'] = 'talk', ['html_title'] = 'Discuss this template',
{ ['mini'] = 'b', ['full'] = 'bicara', ['html_title'] = 'Diskusikan templat ini',
['link'] = talkpage, ['url'] = false },
['link'] = talkpage, ['url'] = false },
{ ['mini'] = 'e', ['full'] = 'edit', ['html_title'] = 'Edit this template',
{ ['mini'] = 's', ['full'] = 'sunting', ['html_title'] = 'Sunting templat ini',
['link'] = title:fullUrl('action=edit'), ['url'] = true },
['link'] = title:fullUrl('action=edit'), ['url'] = true },
{ ['mini'] = 'h', ['full'] = 'hist', ['html_title'] = 'History of this template',
{ ['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'] = 'move', ['html_title'] = 'Move this template',
{ ['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'] = 'watch', ['html_title'] = 'Watch this template',  
{ ['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
local frame = mw.getCurrentFrame()
return mw.getCurrentFrame():extensionTag{
-- hlist -> navbar is best-effort to preserve old Common.css ordering.
return frame:extensionTag{
name = 'templatestyles', args = { src = cfg.hlist_templatestyles }
} .. frame:extensionTag{
name = 'templatestyles', args = { src = cfg.templatestyles }
name = 'templatestyles', args = { src = cfg.templatestyles }
} .. tostring(div:done())
} .. tostring(div:done())