move wiki functionality to plugin
This commit is contained in:
parent
d4dccbc646
commit
70c12b7c1f
19 changed files with 4 additions and 16 deletions
3
Gemfile
3
Gemfile
|
@ -37,12 +37,13 @@ gem 'twitter-bootstrap-rails'
|
||||||
gem 'simple-navigation'
|
gem 'simple-navigation'
|
||||||
gem 'simple-navigation-bootstrap'
|
gem 'simple-navigation-bootstrap'
|
||||||
gem 'meta_search'
|
gem 'meta_search'
|
||||||
gem 'acts_as_versioned', git: 'git://github.com/technoweenie/acts_as_versioned.git' # Use this instead of rubygem
|
|
||||||
gem 'acts_as_tree'
|
gem 'acts_as_tree'
|
||||||
gem "rails-settings-cached", "0.2.4"
|
gem "rails-settings-cached", "0.2.4"
|
||||||
gem 'resque'
|
gem 'resque'
|
||||||
gem 'whenever', require: false # For defining cronjobs, see config/schedule.rb
|
gem 'whenever', require: false # For defining cronjobs, see config/schedule.rb
|
||||||
|
|
||||||
|
# we use the git version of acts_as_versioned, and need to include it in this Gemfile
|
||||||
|
gem 'acts_as_versioned', git: 'git://github.com/technoweenie/acts_as_versioned.git'
|
||||||
gem 'foodsoft_wiki', path: 'lib/foodsoft_wiki'
|
gem 'foodsoft_wiki', path: 'lib/foodsoft_wiki'
|
||||||
|
|
||||||
group :production do
|
group :production do
|
||||||
|
|
|
@ -22,6 +22,7 @@ PATH
|
||||||
remote: lib/foodsoft_wiki
|
remote: lib/foodsoft_wiki
|
||||||
specs:
|
specs:
|
||||||
foodsoft_wiki (0.0.1)
|
foodsoft_wiki (0.0.1)
|
||||||
|
acts_as_versioned
|
||||||
rails (~> 3.2.15)
|
rails (~> 3.2.15)
|
||||||
|
|
||||||
GEM
|
GEM
|
||||||
|
|
|
@ -21,11 +21,6 @@ SimpleNavigation::Configuration.run do |navigation|
|
||||||
subnav.item :tasks, I18n.t('navigation.tasks'), tasks_path, id: nil
|
subnav.item :tasks, I18n.t('navigation.tasks'), tasks_path, id: nil
|
||||||
end
|
end
|
||||||
|
|
||||||
primary.item :wiki, I18n.t('navigation.wiki.title'), '#', id: nil do |subnav|
|
|
||||||
subnav.item :wiki_home, I18n.t('navigation.wiki.home'), wiki_path, id: nil
|
|
||||||
subnav.item :all_pages, I18n.t('navigation.wiki.all_pages'), all_pages_path, id: nil
|
|
||||||
end
|
|
||||||
|
|
||||||
primary.item :orders, I18n.t('navigation.orders.title'), '#', id: nil do |subnav|
|
primary.item :orders, I18n.t('navigation.orders.title'), '#', id: nil do |subnav|
|
||||||
subnav.item :ordering, I18n.t('navigation.orders.ordering'), group_orders_path, id: nil
|
subnav.item :ordering, I18n.t('navigation.orders.ordering'), group_orders_path, id: nil
|
||||||
subnav.item :ordering_archive, I18n.t('navigation.orders.archive'), archive_group_orders_path, id: nil
|
subnav.item :ordering_archive, I18n.t('navigation.orders.archive'), archive_group_orders_path, id: nil
|
||||||
|
|
|
@ -29,16 +29,6 @@ Foodsoft::Application.routes.draw do
|
||||||
match '/home/ordergroup' => 'home#ordergroup', :as => 'my_ordergroup'
|
match '/home/ordergroup' => 'home#ordergroup', :as => 'my_ordergroup'
|
||||||
match '/home/cancel_membership' => 'home#cancel_membership', :as => 'cancel_membership'
|
match '/home/cancel_membership' => 'home#cancel_membership', :as => 'cancel_membership'
|
||||||
|
|
||||||
############ Wiki
|
|
||||||
|
|
||||||
resources :pages do
|
|
||||||
get :all, :on => :collection
|
|
||||||
get :version, :on => :member
|
|
||||||
get :revert, :on => :member
|
|
||||||
end
|
|
||||||
match '/wiki/:permalink' => 'pages#show', :as => 'wiki_page' # , :constraints => {:permalink => /[^\s]+/}
|
|
||||||
match '/wiki' => 'pages#show', :defaults => {:permalink => 'Home'}, :as => 'wiki'
|
|
||||||
|
|
||||||
############ Orders, ordering
|
############ Orders, ordering
|
||||||
|
|
||||||
resources :orders do
|
resources :orders do
|
||||||
|
|
|
@ -17,6 +17,7 @@ Gem::Specification.new do |s|
|
||||||
s.test_files = Dir["test/**/*"]
|
s.test_files = Dir["test/**/*"]
|
||||||
|
|
||||||
s.add_dependency "rails", "~> 3.2.15"
|
s.add_dependency "rails", "~> 3.2.15"
|
||||||
|
s.add_dependency 'acts_as_versioned' # need git version, make sure that is included in foodsoft's Gemfile
|
||||||
|
|
||||||
s.add_development_dependency "sqlite3"
|
s.add_development_dependency "sqlite3"
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue