Better cmtool integration
This commit is contained in:
+17
-2
@@ -74,8 +74,8 @@ module Qwaiter
|
||||
|
||||
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
||||
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
||||
config.i18n.default_locale = :nl
|
||||
config.i18n.available_locales = [:nl, :en]
|
||||
config.i18n.default_locale = :en
|
||||
config.i18n.available_locales = [:en, :nl]
|
||||
|
||||
# Configure the default encoding used in templates for Ruby 1.9.
|
||||
config.encoding = "utf-8"
|
||||
@@ -86,6 +86,21 @@ module Qwaiter
|
||||
# Enable escaping HTML in JSON.
|
||||
config.active_support.escape_html_entities_in_json = true
|
||||
|
||||
initializer 'mozo.cmtool', after: 'cmtool.build_menu' do
|
||||
Cmtool::Menu.register do
|
||||
before :users do
|
||||
group label: :mozo do # Allow other tools to inject into the mozo menu
|
||||
title 'Mozo'
|
||||
resource_link UserFeedback, scope: 'Admin'
|
||||
resource_link Supplier, scope: 'Admin'
|
||||
resource_link Section, scope: 'Admin'
|
||||
resource_link Table, scope: 'Admin'
|
||||
engine_link Rails.application, title: 'Go to the website', path: '/'
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
config.handlebars.templates_root = %w[supplier/app/templates waiter/app/templates user/app/templates] if defined?(Ember::Rails) && defined?(Handlebars)
|
||||
|
||||
|
||||
+7
-7
@@ -1,4 +1,4 @@
|
||||
ALLOWED_LOCALES = /nl|be|de|fr|en/
|
||||
ALLOWED_LOCALES = /nl|de|fr|en|es/
|
||||
Qwaiter::Application.routes.draw do
|
||||
devise_for :users, controllers: { omniauth_callbacks: "users/omniauth_callbacks" }
|
||||
#devise_for :suppliers, controllers: { confirmations: 'confirmations', registrations: 'registrations' }
|
||||
@@ -172,12 +172,12 @@ Qwaiter::Application.routes.draw do
|
||||
|
||||
mount Cmtool::Engine => '/cmtool'
|
||||
|
||||
root :to => 'pages#home', defaults: {locale: 'nl'}
|
||||
get '/:locale' => 'pages#home', constraints: {locale: ALLOWED_LOCALES}
|
||||
devise_scope :supplier do
|
||||
get '/:locale/suppliers/sign_up' => 'registrations#new', constraints: {locale: ALLOWED_LOCALES}
|
||||
end
|
||||
scope '(/:locale)', constraints: {locale: ALLOWED_LOCALES}, defaults: { locale: 'nl' } do
|
||||
#get '/:locale' => 'pages#home', constraints: {locale: ALLOWED_LOCALES}
|
||||
#devise_scope :supplier do
|
||||
#get '/:locale/suppliers/sign_up' => 'registrations#new', constraints: {locale: ALLOWED_LOCALES}
|
||||
#end
|
||||
scope '(/:locale)', constraints: {locale: ALLOWED_LOCALES}, defaults: { locale: 'en' } do
|
||||
root to: 'pages#home'
|
||||
get "/:name" => "pages#show", constraints: {name: /.*/}, as: :go_to
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user