Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Fix alignment of admin sidemenu enterprise badge

Dombi Attilaa20410929a80
diff --git a/frontend/src/app/shared/components/sidemenu/sidemenu.component.sass b/frontend/src/app/shared/components/sidemenu/sidemenu.component.sass
index b456f22e6b7..bffe86bf486 100644
--- a/frontend/src/app/shared/components/sidemenu/sidemenu.component.sass
+++ b/frontend/src/app/shared/components/sidemenu/sidemenu.component.sass
@@ -53,9 +53,6 @@
line-height: 30px
text-decoration: none
- &--enterprise-badge
- margin-left: 0.25rem
-
&--item-icon
font-size: 24px
margin-right: 8px
diff --git a/frontend/src/global_styles/layout/_main_menu.sass b/frontend/src/global_styles/layout/_main_menu.sass
index 5221a869ff3..f23c3498929 100644
--- a/frontend/src/global_styles/layout/_main_menu.sass
+++ b/frontend/src/global_styles/layout/_main_menu.sass
@@ -226,7 +226,8 @@ a.main-menu--parent-node
display: list-item
.main-menu--children-menu-header
display: none
-
+ .spot-icon_enterprise-badge
+ margin-left: 0.25rem
.hidden-navigation
.main-menu
width: var(--main-menu-folded-width)
diff --git a/lib/redmine/menu_manager/menu_helper.rb b/lib/redmine/menu_manager/menu_helper.rb
index a64cefe2d97..3cf6572aff7 100644
--- a/lib/redmine/menu_manager/menu_helper.rb
+++ b/lib/redmine/menu_manager/menu_helper.rb
@@ -168,10 +168,11 @@ module Redmine::MenuManager::MenuHelper
link_text << content_tag(:span,
class: "#{menu_class}--item-title #{item.badge(project).present? ? "#{menu_class}--item-title_has-badge" : ''}",
lang: menu_item_locale(item)) do
- ''.html_safe + caption + badge_for(item)
- end
- if item.enterprise_feature.present? && !EnterpriseToken.allows_to?(item.enterprise_feature)
- link_text << (' '.html_safe + spot_icon('enterprise-badge'))
+ title_text = ''.html_safe + caption + badge_for(item)
+ if item.enterprise_feature.present? && !EnterpriseToken.allows_to?(item.enterprise_feature)
+ title_text << (' '.html_safe + spot_icon('enterprise-badge'))
+ end
+ title_text
end
link_text << (' '.html_safe + op_icon(item.icon_after)) if item.icon_after.present?
html_options = item.html_options(selected:)