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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Make spot_icon helper accept only icon name
Oliver Güntherdeb6f5209652
diff --git a/app/helpers/icons_helper.rb b/app/helpers/icons_helper.rbindex 0e5a49621c7..dc2a4ed3abc 100644--- a/app/helpers/icons_helper.rb+++ b/app/helpers/icons_helper.rb@@ -36,7 +36,8 @@ module IconsHelper%(<i class="#{classnames}" #{title} aria-hidden="true"></i>).html_safeend- def spot_icon(classnames, title: nil)+ def spot_icon(icon_name, title: nil)+ classnames = "spot-icon spot-icon_#{icon_name}"content_tag(:span, title, class: classnames.to_s)enddiff --git a/app/views/common/upsale.html.erb b/app/views/common/upsale.html.erbindex 0543813035c..94145a2fab9 100644--- a/app/views/common/upsale.html.erb+++ b/app/views/common/upsale.html.erb@@ -52,7 +52,7 @@aria: {label: t('admin.enterprise.buttons.upgrade')},target: '_blank',title: t('admin.enterprise.buttons.upgrade')}) do %>- <span class="spot-icon spot-icon_enterprise-badge"></span>+ <%= spot_icon('enterprise-badge') %><span class="button--text"><%= t('admin.enterprise.buttons.upgrade') %></span><% end %><free-trial-button></free-trial-button>diff --git a/app/views/homescreen/blocks/_upsale.html.erb b/app/views/homescreen/blocks/_upsale.html.erbindex 5660b67f0e8..9903b7c69b1 100644--- a/app/views/homescreen/blocks/_upsale.html.erb+++ b/app/views/homescreen/blocks/_upsale.html.erb@@ -3,7 +3,7 @@<div class="widget-box--blocks--upsale-description"><div class="widget-box--blocks--upsale-title">- <%= spot_icon('spot-icon spot-icon_enterprise-badge') %>+ <%= spot_icon('enterprise-badge') %><span><%= t('homescreen.blocks.upsale.title') %></span><p class="widget-box--blocks--upsale-description">@@ -37,7 +37,7 @@aria: {label: t('admin.enterprise.buttons.upgrade')},target: '_blank',title: t('admin.enterprise.buttons.upgrade')}) do %>- <%= spot_icon('spot-icon spot-icon_enterprise-badge') %>+ <%= spot_icon('enterprise-badge') %><span class="button--text"><%= t('admin.enterprise.buttons.upgrade') %></span><% end %>diff --git a/lib/redmine/menu_manager/menu_helper.rb b/lib/redmine/menu_manager/menu_helper.rbindex 87dd11348e2..a64cefe2d97 100644--- a/lib/redmine/menu_manager/menu_helper.rb+++ b/lib/redmine/menu_manager/menu_helper.rb@@ -171,7 +171,7 @@ module Redmine::MenuManager::MenuHelper''.html_safe + caption + badge_for(item)endif item.enterprise_feature.present? && !EnterpriseToken.allows_to?(item.enterprise_feature)- link_text << (' '.html_safe + spot_icon('spot-icon spot-icon_enterprise-badge'))+ link_text << (' '.html_safe + spot_icon('enterprise-badge'))endlink_text << (' '.html_safe + op_icon(item.icon_after)) if item.icon_after.present?html_options = item.html_options(selected:)