Skip to content

armgit / spree

Public Imported from GitHub
0

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.

Small sidebar imrovements

Damian Legawiecc68deed78a2a
diff --git a/admin/app/views/spree/admin/shared/sidebar/_integrations_nav.html.erb b/admin/app/views/spree/admin/shared/sidebar/_integrations_nav.html.erb
new file mode 100644
index 0000000000..0277301658
--- /dev/null
+++ b/admin/app/views/spree/admin/shared/sidebar/_integrations_nav.html.erb
@@ -0,0 +1,7 @@
+<li class="nav-item">
+ <span class="nav-link d-flex align-items-center pr-1 cursor-default with-tip" title="Connect your store to third-party services to automate your business processes.">
+ <%= icon 'plug' %>
+ <span><%= Spree.t(:integrations) %></span>
+ <span class="badge ml-auto rounded-pill">Coming soon!</span>
+ </span>
+</li>
\ No newline at end of file
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.erb
index c1c9e8928c..3606a1b040 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
@@ -137,31 +137,15 @@
<%= render 'spree/admin/shared/sidebar/custom_nav' %>
<%= render 'spree/admin/shared/sidebar/storefront_nav' %>
+ <%= render 'spree/admin/shared/sidebar/integrations_nav' %>
- <% if spree.respond_to?(:admin_emails_path) %>
- <li class="nav-item">
- <%= active_link_to_with_icon('send', Spree.t(:emails), spree.admin_emails_path, class: 'nav-link') %>
- </li>
- <% end %>
- <% if defined?(Spree::Integration) %>
- <%= render 'spree/admin/shared/sidebar/integrations_nav' %>
- <% else %>
- <li class="nav-item">
- <span class="nav-link d-flex align-items-center pr-1 cursor-default with-tip" title="Connect your store to third-party services to automate your business processes.">
- <%= icon 'plug' %>
- <span><%= Spree.t(:integrations) %></span>
- <span class="badge ml-auto rounded-pill">Coming soon!</span>
- </span>
- </li>
- <% end %>
-
+ <li class="nav-item border-top border-top-dashed pt-2">
+ <%= active_link_to_with_icon('settings', Spree.t(:settings), spree.edit_admin_store_path(section: 'general-settings'), class: 'nav-link', active: params[:section] == 'general-settings') %>
+ </li>
<% if defined?(current_account) && current_account.present? %>
<li class="nav-item">
<%= active_link_to_with_icon 'users', Spree.t(:account_members), main_app.account_members_path(current_account), class: 'nav-link' %>
</li>
<% end %>
- <li class="nav-item border-top border-top-dashed pt-2">
- <%= active_link_to_with_icon('settings', Spree.t(:settings), spree.edit_admin_store_path(section: 'general-settings'), class: 'nav-link', active: params[:section] == 'general-settings') %>
- </li>
</ul>
<% end %>
diff --git a/admin/app/views/spree/admin/shared/sidebar/_storefront_nav.html.erb b/admin/app/views/spree/admin/shared/sidebar/_storefront_nav.html.erb
index e004f4134c..f78be98f26 100644
--- a/admin/app/views/spree/admin/shared/sidebar/_storefront_nav.html.erb
+++ b/admin/app/views/spree/admin/shared/sidebar/_storefront_nav.html.erb
@@ -1,4 +1,4 @@
-<li class="nav-item">
+<li class="nav-item border-top border-top-dashed pt-2">
<% storefront_active = %w[themes posts post_categories pages storefront].include?(controller_name) %>
<%= active_link_to_with_icon('building-store', Spree.t('admin.storefront'), spree.admin_themes_path, class: 'nav-link', active: storefront_active) %>