Adds a project specific css class to body (#14767).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@12170 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
2012e635b0
commit
481a1311b7
|
@ -488,6 +488,7 @@ module ApplicationHelper
|
|||
css << 'theme-' + theme.name
|
||||
end
|
||||
|
||||
css << 'project-' + @project.identifier if @project && @project.identifier.present?
|
||||
css << 'controller-' + controller_name
|
||||
css << 'action-' + action_name
|
||||
css.join(' ')
|
||||
|
|
|
@ -589,4 +589,9 @@ class ProjectsControllerTest < ActionController::TestCase
|
|||
assert_response :success
|
||||
assert_template 'show'
|
||||
end
|
||||
|
||||
def test_body_should_have_project_css_class
|
||||
get :show, :id => 1
|
||||
assert_select 'body.project-ecookbook'
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue