first version of the foodsoft_wiki plugin

This commit is contained in:
wvengen 2013-10-29 22:22:24 +01:00
parent fde7904c1a
commit 6d0ba985aa
6 changed files with 86 additions and 0 deletions

View file

@ -0,0 +1,4 @@
require "foodsoft_wiki/engine"
module FoodsoftWiki
end

View file

@ -0,0 +1,14 @@
module FoodsoftWiki
class Engine < ::Rails::Engine
def navigation(primary, ctx)
primary.item :wiki, I18n.t('navigation.wiki.title'), '#', id: nil do |subnav|
subnav.item :wiki_home, I18n.t('navigation.wiki.home'), ctx.wiki_path, id: nil
subnav.item :all_pages, I18n.t('navigation.wiki.all_pages'), ctx.all_pages_path, id: nil
end
# move this last added item to just after the foodcoop menu
if i = primary.items.index(primary[:foodcoop])
primary.items.insert(i+1, primary.items.delete_at(-1))
end
end
end
end

View file

@ -0,0 +1,3 @@
module FoodsoftWiki
VERSION = "0.0.1"
end