]> source.dussan.org Git - redmine.git/commitdiff
Adds a project specific css class to body (#14767).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 29 Sep 2013 15:34:25 +0000 (15:34 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 29 Sep 2013 15:34:25 +0000 (15:34 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@12170 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/helpers/application_helper.rb
test/functional/projects_controller_test.rb

index 3cac90d04f6c646f4e13e5c7899892dd5e3954de..4b33e15f318e5c055f95e391275721911a620888 100644 (file)
@@ -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(' ')
index c8bd19c5e48ca974460af668ad026f4843c90da4..79721d589204a045b4a8b44e3b33e2fc32720cab 100644 (file)
@@ -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