Fix alignment of admin sidemenu enterprise badge

pull/11670/head
Dombi Attila 2 years ago
parent 58447a9171
commit a20410929a
  1. 3
      frontend/src/app/shared/components/sidemenu/sidemenu.component.sass
  2. 3
      frontend/src/global_styles/layout/_main_menu.sass
  3. 9
      lib/redmine/menu_manager/menu_helper.rb

@ -53,9 +53,6 @@
line-height: 30px
text-decoration: none
&--enterprise-badge
margin-left: 0.25rem
&--item-icon
font-size: 24px
margin-right: 8px

@ -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)

@ -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:)

Loading…
Cancel
Save