Actions
Feature #28531
closedAdd css to distinguish when a main menu is present or not
Start date:
Due date:
% Done:
0%
Estimated time:
Resolution:
Fixed
Description
We have a theme with a styling dependent on knowing when a main menu is present. We previously used a body[class*="project-"]
selector to test when a project is shown, but as there is now a global main menu in some cases this doesn't work anymore.
We would suggest the following addition:
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -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')
Actions