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.

Open source admin storefront nav partial

Łukasz Adamczyk4c8e52abaf74
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
new file mode 100644
index 0000000000..d226565114
--- /dev/null
+++ b/admin/app/views/spree/admin/shared/sidebar/_storefront_nav.html.erb
@@ -0,0 +1,21 @@
+<li class="nav-item">
+ <% storefront_active = %w[themes posts pages storefront].include?(controller_name) %>
+ <%= active_link_to_with_icon('building-store', Spree.t(:storefront), spree.admin_themes_path, class: 'nav-link', active: storefront_active) %>
+
+ <% if storefront_active %>
+ <ul class="ml-4 font-size-base pl-1 mb-3 nav-submenu flex-column mt-1">
+ <li class="nav-item">
+ <%= active_link_to Spree.t(:themes), spree.admin_themes_path, class: 'nav-link' %>
+ </li>
+ <li class="nav-item">
+ <%= active_link_to Spree.t(:pages), spree.admin_pages_path, class: 'nav-link' %>
+ </li>
+ <li class="nav-item">
+ <%= active_link_to Spree.t(:posts), spree.admin_posts_path, class: 'nav-link' %>
+ </li>
+ <li class="nav-item">
+ <%= active_link_to Spree.t(:settings), spree.edit_admin_storefront_path, class: 'nav-link' %>
+ </li>
+ </ul>
+ <% end %>
+</li>
diff --git a/core/config/locales/en.yml b/core/config/locales/en.yml
index f1b011b15b..0e5254ab4a 100644
--- a/core/config/locales/en.yml
+++ b/core/config/locales/en.yml
@@ -1245,6 +1245,7 @@ en:
overview: Overview
package_from: package from
page: Page
+ pages: Pages
page_not_found: Sorry! Page you are looking can’t be found.
page_blocks:
buttons:
@@ -1338,6 +1339,7 @@ en:
please_define_payment_methods: Please define some payment methods first.
please_enter_reasonable_quantity: Please enter a reasonable quantity.
populate_get_error: Something went wrong. Please try adding the item again.
+ posts: Posts
powered_by: Powered by
pre_tax_refund_amount: Pre-Tax Refund Amount
pre_tax_amount: Pre-Tax Amount
@@ -1806,6 +1808,7 @@ en:
test_mode: Test Mode
this_menu_already_has_a_root_item: This Menu already has a root item
thank_you_for_your_order: Thank you for your business. Please print out a copy of this confirmation page for your records.
+ themes: Themes
theme_copied: Theme has been successfully copied.
theme_not_copied: "Theme could not be copied with errors: %{error}"
theme_duplicating: Theme is still duplicating