Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Theme selection not showing up with Redmine 2.4 #2

Open
GurvanLd opened this issue Feb 7, 2014 · 0 comments
Open

Theme selection not showing up with Redmine 2.4 #2

GurvanLd opened this issue Feb 7, 2014 · 0 comments

Comments

@GurvanLd
Copy link

GurvanLd commented Feb 7, 2014

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:
spree/deface#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 => '

<%= pref_fields.select :ui_theme, Redmine::Themes.themes.collect {|t| [t.name, t.id]}, { :include_blank => true } %>

')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant