Better cmtool integration

This commit is contained in:
2015-02-25 12:54:07 +01:00
parent 6a47ecb0eb
commit fd9afb9d53
15 changed files with 110 additions and 72 deletions
+17 -2
View File
@@ -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)