1
0
mirror of https://github.com/meineerde/redmine.git synced 2025-12-24 09:21:12 +00:00

Add CSS to distinguish when a main menu is present or not (#28531).

Patch by Felix Schäfer.


git-svn-id: http://svn.redmine.org/redmine/trunk@17303 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA 2018-04-23 05:16:25 +00:00
parent 543e20947f
commit fe7e8f1d3b
2 changed files with 8 additions and 0 deletions

View File

@ -592,6 +592,7 @@ module ApplicationHelper
end
css << 'project-' + @project.identifier if @project && @project.identifier.present?
css << 'has-main-menu' if display_main_menu?(@project)
css << 'controller-' + controller_name
css << 'action-' + action_name
css << 'avatars-' + (Setting.gravatar_enabled? ? 'on' : 'off')

View File

@ -77,4 +77,11 @@ class MenuManagerTest < Redmine::IntegrationTest
get '/login'
assert_select '#main-menu', 0
end
def test_body_should_have_main_menu_css_class_if_main_menu_is_present
get '/projects'
assert_select 'body.has-main-menu'
get '/'
assert_select 'body.has-main-menu', 0
end
end