redmine_user_specific_theme
redmine_user_specific_theme copied to clipboard
Theme selection not showing up with Redmine 2.4
I installed plugin with Redmine 2.4.0, but couldn't see the selection window in User preferences menu. I found following error in logs:
Started GET "/my/account" for 127.0.0.1 at 2014-02-07 16:42:41 +0100 Processing by MyController#account as HTML Current user: admin (id=1) Rendered users/_mail_notifications.html.erb (105.8ms) Deface: [WARNING] No :original defined for 'user_ui_theme_preference', you should change its definition to include:
Found related entry at: https://github.com/spree/deface/pull/105
I solved by applying following to plugin code:
diff --git a/Gemfile b/Gemfile
index e89ad92..1e876ba 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1,4 +1,4 @@
-gem 'deface'
+gem 'deface', '~> 1.0.0'
group :development do
gem 'diffy'
diff --git a/app/overrides/users/_preferences.rb b/app/overrides/users/_preferences.rb
index a7fb739..97f9bf0 100644
--- a/app/overrides/users/_preferences.rb
+++ b/app/overrides/users/_preferences.rb
@@ -1,5 +1,5 @@
Deface::Override.new(
:virtual_path => 'users/_preferences',
:name => 'user_ui_theme_preference',
- :insert_before => 'code:contains("end"):last',
+ :insert_before => 'erb:contains("end"):last',
:text => ' true } %>
')