##// END OF EJS Templates
Added css classes to the HTML body based on the theme, controller, and action. #819...
Eric Davis -
r3797:a544a1e57cd6
parent child
Show More
@@ -393,6 +393,19 module ApplicationHelper
393 end
393 end
394 end
394 end
395
395
396 # Returns the theme, controller name, and action as css classes for the
397 # HTML body.
398 def body_css_classes
399 css = []
400 if theme = Redmine::Themes.theme(Setting.ui_theme)
401 css << 'theme-' + theme.name
402 end
403
404 css << 'controller-' + params[:controller]
405 css << 'action-' + params[:action]
406 css.join(' ')
407 end
408
396 def accesskey(s)
409 def accesskey(s)
397 Redmine::AccessKeys.key_for s
410 Redmine::AccessKeys.key_for s
398 end
411 end
@@ -19,7 +19,7
19 <!-- page specific tags -->
19 <!-- page specific tags -->
20 <%= yield :header_tags -%>
20 <%= yield :header_tags -%>
21 </head>
21 </head>
22 <body>
22 <body class="<%= body_css_classes %>">
23 <div id="wrapper">
23 <div id="wrapper">
24 <div id="wrapper2">
24 <div id="wrapper2">
25 <div id="top-menu">
25 <div id="top-menu">
General Comments 0
You need to be logged in to leave comments. Login now