Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.
Ruby b2b-commercee-commerceecommerceecommerce-apiecommerce-frameworkecommerce-platformheadlessheadless-commerceheadless-ecommercemarketplacemulti-tenantmulti-vendormulti-vendor-ecommerceopen-sourcespree-commerce
Improve Enterprise Edition checks in the admin (#12727)
Damian Legawiec1a9f5c21f5a6
diff --git a/admin/app/helpers/spree/admin/base_helper.rb b/admin/app/helpers/spree/admin/base_helper.rbindex e446421d3c..95ff61c718 100644--- a/admin/app/helpers/spree/admin/base_helper.rb+++ b/admin/app/helpers/spree/admin/base_helper.rb@@ -10,7 +10,7 @@ module Spreeenddef enterprise_edition?- defined?(Vendo)+ defined?(SpreeEnterprise)enddef spree_updaterdiff --git a/admin/app/views/spree/admin/dashboard/_top_products.html.erb b/admin/app/views/spree/admin/dashboard/_top_products.html.erbindex a56ed631d4..318d65ebb2 100644--- a/admin/app/views/spree/admin/dashboard/_top_products.html.erb+++ b/admin/app/views/spree/admin/dashboard/_top_products.html.erb@@ -47,7 +47,7 @@<%= product.name %><% end %></td>- <% if enterprise_edition? && defined?(vendor_logo_link) && !@vendor %>+ <% if defined?(vendor_logo_link) && !@vendor %><td><%= vendor_logo_link(product.vendor) if product.vendor.present? %></td>diff --git a/admin/app/views/spree/admin/shared/sidebar/_store_nav.html.erb b/admin/app/views/spree/admin/shared/sidebar/_store_nav.html.erbindex 57cb42e2ef..cd74415d87 100644--- a/admin/app/views/spree/admin/shared/sidebar/_store_nav.html.erb+++ b/admin/app/views/spree/admin/shared/sidebar/_store_nav.html.erb@@ -43,7 +43,7 @@<% end %><% if can?(:manage, Spree::Store) %>- <% if enterprise_edition? %>+ <% if spree.respond_to?(:admin_audits_path) %><%= nav_item(Spree.t('admin.audit_log'), spree.admin_audits_path, icon: 'history', active: %w[audits exports imports].include?(controller_name)) %><% else %><li class="nav-item">