Commit 0757181ef0165467e3f273d10157bb1971c091f2

Authored by AntonioTerceiro
1 parent 4a6afb41

ActionItem79: using LanguageHelper in layout to translate TinyMCE



git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@601 3f533792-8f58-4932-b0fe-aaf55b0a4547
app/controllers/application.rb
@@ -3,6 +3,7 @@ @@ -3,6 +3,7 @@
3 class ApplicationController < ActionController::Base 3 class ApplicationController < ActionController::Base
4 4
5 helper :document 5 helper :document
  6 + helper :language
6 7
7 design :holder => 'environment' 8 design :holder => 'environment'
8 9
app/views/layouts/application.rhtml
@@ -13,6 +13,12 @@ @@ -13,6 +13,12 @@
13 mode : "textareas", 13 mode : "textareas",
14 theme : "advanced", 14 theme : "advanced",
15 theme_advanced_toolbar_location : "top", 15 theme_advanced_toolbar_location : "top",
  16 + theme_advanced_layout_manager: 'SimpleLayout',
  17 + theme_advanced_buttons1 : "bold,italic,underline,strikethrough,separator,undo,redo,separator,formatselect,separator,bullist,numlist,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,link,unlink,image,table,separator,cleanup,code,separator,help",
  18 + theme_advanced_buttons2 : "",
  19 + theme_advanced_buttons3 : "",
  20 + apply_source_formatting : true,
  21 + language: <%= language.inspect %>,
16 }); 22 });
17 </script> 23 </script>
18 24
config/environment.rb
@@ -81,6 +81,7 @@ Comatose.configure do |config| @@ -81,6 +81,7 @@ Comatose.configure do |config|
81 config.admin_includes << :authenticated_system 81 config.admin_includes << :authenticated_system
82 config.admin_helpers << :application_helper 82 config.admin_helpers << :application_helper
83 config.admin_helpers << :document_helper 83 config.admin_helpers << :document_helper
  84 + config.admin_helpers << :language_helper
84 config.default_filter = '[No Filter]' 85 config.default_filter = '[No Filter]'
85 end 86 end
86 Comatose::AdminController.design :holder => 'environment' 87 Comatose::AdminController.design :holder => 'environment'