From: Eric Davis Date: Thu, 19 Aug 2010 04:30:48 +0000 (+0000) Subject: Merged r3911 from trunk. X-Git-Tag: 1.0.1~57 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b02463184a1fca124fc2aab42e1704939d5c21b2;p=redmine.git Merged r3911 from trunk. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3961 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index e40758969..d6fd16a6e 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -393,6 +393,19 @@ module ApplicationHelper end end + # Returns the theme, controller name, and action as css classes for the + # HTML body. + def body_css_classes + css = [] + if theme = Redmine::Themes.theme(Setting.ui_theme) + css << 'theme-' + theme.name + end + + css << 'controller-' + params[:controller] + css << 'action-' + params[:action] + css.join(' ') + end + def accesskey(s) Redmine::AccessKeys.key_for s end diff --git a/app/views/layouts/base.rhtml b/app/views/layouts/base.rhtml index 9521457d6..2daae7cb9 100644 --- a/app/views/layouts/base.rhtml +++ b/app/views/layouts/base.rhtml @@ -19,7 +19,7 @@ <%= yield :header_tags -%> - +