preferred theme

This commit is contained in:
Andreas Stephanides
2015-06-03 08:28:09 +02:00
parent 6c2238e740
commit d3e97ff422
5 changed files with 27 additions and 13 deletions

View File

@@ -113,4 +113,17 @@ m.save
url.path=path
return url
end
def get_theme_help(u)
# if params[:theme]== "default" || params[:theme]=="2003" || params[:theme].nil?
# params[:theme]="blue1"
# end
if ! u.try(:preferredtheme).nil? and ThemesForRails.available_theme_names.include?(u.preferredtheme)
u.preferredtheme
else
"blue1"
end
end
end